DEV Community

Rotem Kasahun
Rotem Kasahun

Posted on AI-assisted

AI Coding Agents Forget Your Fixes. Make the Repository Remember.

AI coding agents can fix a bug in one session and reintroduce it in the next. The missing ingredient is not another clever prompt: it is a small, repository-native handoff.

The loop

Keep four things in the project:

  1. Context: what the project is, where the relevant code lives, and which constraints matter.
  2. Memory: decisions, history, and unresolved work in Markdown.
  3. Verification: the checks that actually ran, plus what remains unknown.
  4. Handoff: a short receipt for the next session.

A useful handoff answers:

  • What changed?
  • Why was it changed?
  • What evidence passed?
  • What is still unverified?

Example:

# Handoff: stale checkout regression

## Changed
- Rejected an empty API response instead of treating it as success.
- Added a regression test for the empty response.

## Verified
- Unit tests: 14 passed
- Browser/manual flow: not run

## Still unknown
- Whether production returns the same shape under rate limiting.
- Whether an older client depends on the fallback.
Enter fullscreen mode Exit fullscreen mode

That last section matters. Tests can pass while the real browser flow, deployment, permissions, or external service remains unverified. Recording that boundary stops the next agent from overstating confidence.

A practical QA contract

Put a short checklist close to the code:

## Before calling a bug fix done

  • [ ] Reproduce the original failure or explain why it is unavailable.
  • [ ] Add or update a regression test.
  • [ ] Run the narrow test and relevant broader checks.
  • [ ] Inspect the changed diff.
  • [ ] Record automated and browser/manual coverage separately.
  • [ ] Record blockers and unknowns explicitly.
Enter fullscreen mode Exit fullscreen mode

Keep decisions append-only

When a choice changes, record the new decision and what it supersedes. Do not silently rewrite history. Future sessions can then answer why a behavior exists without reconstructing an old chat.

I published a free ProjectOS starter with repository-native rules, memory, QA, visual QA, code review, and handoff structure: https://rotem-e.com/knowledge-base/make-your-ai-remember-and-improve-its-results?utm_source=devto&utm_medium=article&utm_campaign=pmqa_distribution_20261011

If you want the packaged version, Project Memory + QA Lite is available here: https://rotemka.gumroad.com/l/project-memory-qa-lite?utm_source=devto&utm_medium=article&utm_campaign=pmqa_distribution_20261011

Disclosure: I created the free starter and also work on the paid Project Memory + QA Lite product. The free starter is enough to try the method; the paid product is a separate packaged option.

The goal is not to make an agent remember every conversation. It is to make the project carry the decisions and evidence the next session actually needs.

What do you record today when a bug fix must survive a handoff?

Top comments (1)

Collapse
 
brethofai profile image
BrethofAI •

The 'still unknown' section is the part most handoffs skip, and it's the one that stops the next session from overstating confidence. One thing I'd add after running this pattern for a while: put the date next to each append-only decision. 'Superseded' without a date makes it hard to tell which of two notes the agent should trust when both look current.