Keep context when an agent restarts
Free and Pro
After a restart, or after a compaction (when the AI tool shrinks a long conversation that has filled its context window), your agent picks up where it left off. You do not re-explain the task. The agent saves and reads back its own progress.
Before you start
Section titled “Before you start”- Install the Thrum plugin for Claude Code and run
thrum initin your repository. Install lists what your machine needs, and the quickstart covers both steps. - A snapshot is a note an agent writes before a restart or a compaction, with what it did and what is next. A briefing is the summary an agent reads when a session starts, with who it is, where the project stands and its own saved notes. Saving a snapshot and loading the briefing work in any session. tmux keeps each agent running in its own terminal session. An agent restarting itself, and the “free up context” command in the table below, need the agent to run in tmux. Your coordinator is the agent you talk to, which starts the other agents, hands out work and reports back to you. Agents your coordinator starts already do.
What it looks like
Section titled “What it looks like”This is an example conversation. Your agent’s wording will differ.
You: We're fixing the expired-token bug in the login handler. Next is a regression test.Agent: Understood. The token check is fixed. No test covers it yet.
You: Save where you are, then restart.Agent: Saved a restart snapshot with the fix, the open test and the next steps. Exit this session and start a new one in this folder.
(You exit and start Claude Code again in the same folder.)
Agent: @coord_my_app primed (coordinator/main). Resuming the login bug: add a regression test for expired tokens. Standing by.You: What were you working on?Agent: The expired-token check in the login handler. The fix is in. Next is the regression test, then the full test suite.You told the agent nothing about the login bug after the restart. The new session already knew.
How it works
Section titled “How it works”The agent does the saving, and Thrum hands the notes back.
- Before a restart, the agent writes a snapshot: a note with what it did, what is open and its numbered next steps.
- At the start of the next session, Thrum gives the agent a briefing, the summary it reads before anything else. The briefing includes the snapshot, so the agent starts with its own next steps.
- Project state is a shared note about where the project stands. Your coordinator agent keeps it up to date, and every new session starts from it. With one agent, ask that agent to update it.
- After a compaction, when Claude Code or Codex shrinks a conversation that has filled its window, Thrum loads the briefing again. Cursor, Copilot, opencode, Antigravity and Muse agents do not reload it after a compaction; they pick up from the snapshot when they restart.
When your agent’s context fills up
Section titled “When your agent’s context fills up”An agent forgets older parts of a long chat when its context window gets full. Thrum watches this for you and warns the agent early, so it can save its place first.
| Context used | What Thrum does |
|---|---|
| 50% | Tells the agent to save its place soon. |
| 60%, 70%, 80% | Reminds it at each step. |
| 90% | Claude Code, Codex, Cursor and opencode: types the compact command into the agent’s terminal, which starts a compaction. Muse, GitHub Copilot and Antigravity: a final reminder to restart. |
The agent then compacts or restarts and picks up from its snapshot. You do not have to do anything. To see how full each agent is, ask your coordinator: How full is everyone's context?
The daemon is Thrum’s background process on your machine. To change the points, ask your coordinator, for example: Tell agents about context at 40% instead of 50%. or Turn off the context reminders. Your coordinator applies the change and restarts the daemon.
What you can say
Section titled “What you can say”Say these in plain words. The agent uses the matching command of the Thrum plugin. Type them in the agent’s Claude Code session. Thrum’s web UI is the page you open in your browser to see your agents and their messages. On Pro, you can also type them in the agent’s Terminal tab in the Thrum web UI. On Free that tab is view-only.
| You say | What happens |
|---|---|
| “Save where you are, then restart.” | The agent writes a snapshot and checks that it saved. Then it tells you to exit and start a new session in the same folder. If the agent runs in tmux, it restarts itself. This is /thrum:restart. |
| “What were you working on?” | The agent answers from its briefing. Ask this in a new session. |
| “Update the project state.” | The agent updates the shared project-state note with what changed and what is next. This is /thrum:update-project. |
| “Free up context but keep this session going.” | The agent saves a snapshot, then compacts its own conversation. It needs to run in tmux. This is /thrum:compact. |
If the new session starts without the briefing, type /thrum:prime. It loads the briefing by hand.
Free and Pro
Section titled “Free and Pro”On every plan, the agent saves restart and compaction snapshots, and the next session’s briefing loads them automatically. Every plan also has the project state that the coordinator maintains. A restarted agent on Free still picks up from its last snapshot.
Pro lets an agent save three more things for itself. On Free you can read them, but agents cannot write them. The briefing loads the first two. Memory is not loaded; later sessions search it.
- Personal state is a short note an agent keeps about its own status and next actions.
- The work queue is the list of work an agent has committed to doing right now.
- Memory is a saved, titled note that later sessions and other agents in the project can search and read. On Pro, updating the project state also saves a session summary as a memory.
An agent can also use Thrum memory to keep its memory file short. See Make your agents remember what they learn.
- Ask for the snapshot before you restart yourself. If you exit without asking, the new session has no snapshot to read. It still gets the project state.
- Ask a new session what it was working on. The answer shows whether the briefing loaded.
Next steps
Section titled “Next steps”- Quickstart: install the plugin and start your first agents.
- Plan with a coordinator, build with an implementer: the loop from request to review.
- Make your agents remember what they learn: memory that later sessions can search.
- Run agents in tmux: what the sessions are and how to watch them.