My Coding Agent Remembered Sessions, Not Work

A coding agent can keep a thread alive and still feel forgetful.

I ran into this issue while building CliGate. I fixed session continuity, but repeated tasks stayed slow.

The agent remembered the conversation, but it did not remember the work.

Session continuity solves one problem. It allows follow-up commands like:

  • continue
  • do the same for this file
  • retry that
  • explain the error

This matters for flow. But it fails when you repeat a workflow days later.

If an agent learns which button works or which step is a dead end, a single open session is not enough. The agent needs to recall what made the last run succeed.

The first run is the most expensive. That is when the agent finds tiny details:

  • a specific menu hides an action
  • an editor is an iframe
  • a project requires specific reply styles
  • an environment URL differs from production

Before my fix, these details were just raw logs. The agent had history, but not reusable memory. It had to rediscover the same facts every time. That is not intelligence. That is paying the same cost twice.

The wrong approach is to save more history and hope the model uses it. This creates noise.

I needed a smaller, reusable layer. I moved from saving everything to saving:

  • procedures: the best steps and known dead ends
  • facts: URLs, rules, or settings
  • directives: how you want things done
  • references: where documentation lives

This changed the system. Instead of reading a giant transcript, the assistant uses a file-based memory layer.

I did not want a perfect replay because interfaces change and buttons move. I wanted a loop:

  • recall the previous best procedure
  • try it first
  • verify each step
  • if it fails, go back to exploration
  • update memory after success

I also separated standing rules from session history. Rules like "do not touch production data" are not conversation context. They are operating rules. Separating them makes the assistant predictable.

The result: repeat tasks got shorter. The assistant moves faster because it does not start with an empty tactical model.

If you build coding agents, do not confuse a thread with learning.

  • A session helps with continuity.
  • Memory helps with repeated work.

The session keeps the conversation alive. The memory layer keeps the lessons alive.

Is your system remembering the thread, or is it remembering the successful procedure?

Source: https://dev.to/codekingai/my-coding-agent-remembered-sessions-not-work-that-was-the-bug-2fig