DEV Community

Qingfeng
Qingfeng

Posted on

My AI assistant said "done." Then my config was gone.

Why long sessions quietly lose the constraints you gave them — and the three habits that fixed it for me.

Two hours into a session with an AI coding agent, I asked a lazy question: "what was that file called again?"

It answered immediately, in a confident voice, with a filename that did not exist. It wasn't lying. It genuinely didn't remember. The conversation had grown past the context window, and the earlier part of it had been compressed into a few lines of summary. The details were gone. The tone of certainty was not.

Most people meet this the same way: they decide the model is "dumb today" and move on. I did too, until it cost me something.

The failure that made me change my workflow

I was editing a config file. Ten minutes earlier I had said, clearly: don't touch this parameter.

Two hours later, the parameter was touched. When I scrolled back, my instruction was right there in the transcript. But from the model's point of view at that moment, my instruction no longer existed. What existed was a summary line: "user asked not to change key parameters (specifics not specified)."

That is the whole problem in one sentence. The thing you said is in the log. It is not in the working memory. Summaries preserve intent and drop specifics, and specifics are exactly what you needed kept.

Three habits that fixed it for me

None of these are clever. All of them are cheap.

1. Put constraints in a file, not in the chat.

If a rule matters for the next two hours, it does not belong in a message that will be compressed. It belongs in a file the agent reads before it acts — CONSTRAINTS.md, AGENTS.md, a comment header in the target module. Anything the agent can re-read is durable. Anything it must "remember" is not.

2. Make every step leave a file on disk.

If each step's output is a file, the next step's input is a file, and nothing needs to be recalled. Recollection is replaced with reading. This single change kills a whole class of "it forgot what the previous step produced" failures, because there is no recall step to fail.

3. Ask for the plan before it touches anything.

Not "go do it" but "which tools, which files, which lines, and why." Reviewing a plan is cheap; reviewing a diff that ran across forty files is not. It also catches the compression problem early, because a plan that references a nonexistent constraint reveals the gap before it costs you anything.

The test I now use

I judge an AI workflow by one question:

Start over from scratch — can it reproduce the same process?

Not the same wording. The same process: same files touched, same checks, same stops. If yes, the work is deliverable and reviewable. If no, you have a very productive assistant that cannot be trusted with anything you'd have to explain to a colleague.

Reproducibility is not a nice-to-have. It is the line between a toy and a tool.

What I actually run

I use an agent called GAL (agent-home.ai). Two things about it address the problem above rather than hiding it:

  • Per-call permission. Approval is not an all-session switch. Each tool call can be authorized on its own, so a mistake in step 3 doesn't inherit access from step 1.
  • Local and logged. It runs on your machine, and every action leaves a record. When the context is compressed, the facts are still on disk and can be pulled back out.

It is one binary, Windows/Mac/Linux. The release repo is here: https://github.com/gal-agent/gal-release

The uncomfortable takeaway

We talk about agent reliability as a model problem. Much of it is a memory architecture problem that we keep trying to solve with better prompting. The fix is duller than that: write the rules down, put the artifacts on disk, review the plan, and check that the process reproduces.

If your assistant says "I remember" — ask it what exactly. The answer is often "a summary of what you said," and that summary is not something you should build on.

Top comments (1)

🔴 Hot News: galagent/my ai assistant said done then my config was gone apa - Kapook Update 2025
 
alicexixi85 profile image
Dejun (Alice) Chen •

Habit 1 helps, but a file the agent reads is still a request it can misread later. For the one parameter that must not move, I'd turn the instruction into a check: a hook that compares those keys before and after every write and blocks the edit if they changed. Then it doesn't matter what survived the summary, because the rule no longer depends on the model's memory at all.