The transcript is one part of the state.
Agent tools now preserve longer sessions across windows, restarts, reconnects, and compaction. That makes continuity useful. It also gives a restored transcript more authority than it deserves.
Claude Code 2.1.288 fixed several distinct resume faults. Its notes mention files and context dropped after compaction, a last response that was not saved, a transcript cut short during a concurrent rewrite, and earlier thinking lost across versions.[1] One button labeled Resume covered several storage and reconstruction paths.
A session is restored only when its conversation and its outside effects agree.
Uncertain delivery needs a third state.
OpenAI Codex 0.160.0 fixed queued messages after reconnect. The client now waits for uncertain submissions to resolve before it resumes unsent input, which avoids duplicate sends.[2] That is the right model for every action near a broken connection.
Do not force a disconnected tool call into only failed or completed. Keep an UNKNOWN state until you read the remote result, inspect the target, or prove that the action is safe to repeat. Retrying an unknown read wastes time. Retrying an unknown write can duplicate work.
Compaction changes the evidence path.
Zed 1.22 added automatic subagent compaction and model selection when a new subagent starts.[3] Compaction can keep work moving. It also means the live context is no longer the full transcript. A useful restore record names the checkpoint, the compacted summary, and the source records that remain available.
Model and runtime settings belong in that record too. Codex 0.160.0 says its terminal interface now preserves the server provider, reasoning summary, and verbosity settings across resume and fork history.[2] A restored task on a different provider or policy is a new run, even if the transcript looks familiar.
One session can span more than one screen.
VS Code 1.140 runs its Copilot harness in a dedicated agent-host process and lets several editor windows connect to the same session.[4] The release also lets users archive one finished chat inside a larger session and later restore its title and transcript.[4] Those are useful controls. They make single-writer authority and current workspace identity visible requirements.
Before a resumed session writes, show which client holds action authority. Show the exact repository, worktree, and revision. If two clients can send input, mark queued and accepted messages with IDs so the operator can tell what the runtime received.
Run a five-line restore check.
- Record the last accepted user input and its message ID.
- Record the last completed assistant turn and checkpoint ID.
- Pin the repository, worktree, revision, and dirty-file summary.
- List tool calls near the break as completed, failed, or unknown.
- Read back the provider, model, permission mode, and client that owns the next action.
If any line is unknown, resume in review mode. Inspect before the runtime gets another write.