concord ai
← All guides

Survive compaction

Keep agent state after context compaction

When a coordinator or long-running agent compacts its context, task status and decisions shouldn't go with it. Keep them in the workspace, not the chat.

The problem

The coordinator knows which lane is done and why, but only in its context window. After compaction it summarises loosely or forgets, and the next turn starts from a guess.

What people try

Ask the agent to write a status summary before compacting
You have to remember to ask, and the summary is only as good as what the agent decides to keep.
A STATUS.md the coordinator keeps updated
Free-form, easy to skip, and other agents rarely read it before acting.

With Concord

  1. 01

    Record as you go

    Agents write intent, decisions, assumptions, blockers and findings to the task with update_work, while the reasoning is still fresh.

  2. 02

    Compact freely

    That record lives in the repo's local .concord/ store, not in any session, so compaction or a restart loses none of it.

  3. 03

    Rehydrate

    After compaction, inspect_work returns the active claims and the task's recorded memory. The agent picks up from facts, not its own summary.

Result

Compaction stops being a reset. Status and decisions come back from the workspace.

Common questions

Does this replace /compact or auto-compaction?
No. Compaction still manages the context window. Concord makes sure the facts that matter to other agents were written somewhere compaction can't touch.
Where is the state stored?
In a SQLite database under .concord/ at the repository root. It is local and gitignored by default.
Will the agent remember to re-read it?
concord setup writes instructions into CLAUDE.md, AGENTS.md and the other client configs telling agents to call inspect_work when resuming.

Further reading

Give your agents shared work-state.

npm install -g @concord-ai/concord-mcp

View on GitHub →