Hand over and restart

A fresh context for your agent,
without losing the thread

Three hours into a task, the context is full of old logs and abandoned attempts, and the agent starts forgetting what it decided. You want it to start over clean, but not from zero.

Hand over and restart does the handoff for you: the agent writes where it stands in a file of the project, then its console starts a new conversation in the same tab, and the first message tells it to read that file and carry on. One click, one confirmation, on Claude Code, Codex and every agent CLI that has the AgentsRoom tools.

AgentsRoom agent right-click menu open on a running agent, with Hand over and restart under Fork and its description, the agent writes its handover, then starts over on a fresh conversation
Right-click a running agent: Hand over and restart sits in its menu, on the computer and on the phone.

Long sessions wear out. Every file the agent read, every test log it printed and every approach it tried and dropped stays in its context window. At some point the useful part, the decisions and the plan, is buried under the rest, and the answers get worse.

The usual fix is a manual handoff: ask the agent to write a summary to a file, type /clear, then paste a first message that tells the new conversation to read the summary. It works, and people write handoff skills and prompts to make it faster, but it still takes you away from your work, three steps per agent, every time.

In AgentsRoom it is one menu entry. The agent writes its handover itself, because it knows what matters in its own context, and restarts on its own once its turn is over. You stay in control of one thing: the first message the new conversation starts with.

Filmed in the real app: a Claude Code agent does steps 1 and 2 of a three-step refactor, then a right-click on it, Hand over and restart and one confirmation. It writes where it stands, what it decided and what is left in a file of the project, and its console starts over in the same tab on a new conversation. It reads that file, goes on with step 3, and 5 tests out of 5 pass.

Watch on YouTube

What Hand over and restart does

A clean context that starts from what the agent knew, not from zero.

One click instead of three steps

Right-click a running agent, pick Hand over and restart, confirm. No /clear to type, no summary to request, no prompt to paste. The console starts over in the same tab, with the same role, the same CLI and the same model.

A handover written by the agent

The agent writes where it stands, the decisions it made and what is left to do, in a file of the project: its own handover file if its routine keeps one, otherwise .handoff/latest.md. The file stays on disk, so you can read it too.

Your first message, saved per agent

The new conversation opens with "Read your handover and continue" followed by the path of the file. Change it in the dialog and it is saved for that agent, on every computer of your account and on the phone.

Messages wait for the new conversation

From the moment the agent starts its handover, messages sent to it by you or by other agents are held and delivered to its next conversation, so nothing lands in the old one at the last second.

A coordinator can ask, never decide

The coordinator agent of a project can ask for a hand over on a teammate, for example when its context is full. The same dialog opens with the coordinator's name and its reason, and nothing happens until you click Hand over and restart.

Every CLI with the AgentsRoom tools

The restart goes through the AgentsRoom tools, not through a command of one CLI, so it works the same on Claude Code, Codex and the other agent CLIs that load them. A CLI without them says so, and you type /clear in its console instead.

How it works

Four steps, and you only do the first two.

  1. 1

    Open the agent menu

    Right-click an agent that is running on this computer and pick Hand over and restart. On the phone, long-press the agent and pick the same entry.

  2. 2

    Check the first message

    The dialog shows the First message of the next conversation, "Read your handover and continue" by default. Edit it if this agent needs something else, it is kept for next time, then click Hand over and restart.

  3. 3

    The agent writes its handover

    AgentsRoom asks the agent to write its handover in a file of the project and to end its turn. Messages for it now wait for its next conversation.

  4. 4

    The console starts over

    Once the turn is over, the console restarts on a new conversation in the same tab. The first message, followed by the path of the handover file, is sent for you, and the agent picks the work up where it left it.

AgentsRoom Hand over and restart dialog: the agent will write its handover in a file of the project, then start over in the same tab, a First message of the next conversation field set to Read your handover and continue, Cancel and Hand over and restart buttons
One confirmation. The first message of the next conversation is saved for this agent, and the agent adds the path of its handover file.

Hand over, /compact or /clear?

/clear throws the whole conversation away. It is the right tool when the task is finished and the next one has nothing to do with it, and the wrong one in the middle of a task, because everything the agent knew goes with it.

/compact replaces the conversation with a summary the CLI writes, in the same session. You do not choose what survives, the summary lives only in the context, and a long session compacted several times keeps a summary of a summary.

Hand over and restart sits between the two. The agent writes its own handover, in a file you can read and edit, and the new conversation starts with nothing else in its context. It is the move for a task that is not finished but whose context is worn out. What the agent does not write down is gone with the old conversation, so it is worth a look at the file when the stakes are high.

Limits

  • The agent needs the AgentsRoom tools (MCP) to restart itself. A CLI that does not load them cannot, and the action tells you to type /clear instead.
  • The restart waits for the end of the agent's turn. If the agent is busy and the action says it cannot restart now, try again once it has answered.
  • It is refused, with a message that says why, for a step of a running Agent Team, during a QA run, and while the project's terminals are shown in another window: bring them back to the main window first.
  • One restart every 2 minutes and 6 per hour per agent, so a routine stuck in a loop cannot restart an agent over and over.
  • The entry shows only for an agent running on this computer: not for an agent running on another machine of your account, and not for the project assistant.
  • Anything the agent does not write in its handover is lost with the old conversation.

Frequently asked questions

Ask us something else
How do I give a Claude Code agent a fresh context without losing its progress?
Right-click the agent in AgentsRoom and pick Hand over and restart. The agent writes its handover to a file of the project, then its console restarts on a new conversation that starts by reading that file. You do not type /clear or paste a prompt, and the same action works on Codex and the other agent CLIs that load the AgentsRoom tools.
What is the difference with /compact?
/compact asks the CLI to replace the conversation with its own summary, in the same session, and you do not choose what survives. Hand over and restart has the agent write its handover to a file you can read, then starts a clean conversation that reads it. Use /compact to keep going quickly, and a hand over when the context is worn out and you want to control what carries over.
Where does the handover file go?
In the project. The agent uses its own handover file if its routine keeps one, otherwise .handoff/latest.md, and the path is added to the first message of the new conversation. It stays on disk after the restart, so you can open it, correct it, or point another agent to it.
Can I change the first message of the new conversation?
Yes. The dialog has a First message of the next conversation field, "Read your handover and continue" by default. What you type there is saved for that agent and follows you on every computer of your account and on the phone. Leave it empty to go back to the default.
Can an agent hand over and restart on its own?
An agent can restart its own console with the agents_restart tool of the AgentsRoom tools, for example from a routine that writes a checkpoint when its context gets too full. The coordinator agent of a project can also ask for a hand over on a teammate, but only you can approve it: the dialog shows who asks and why, and the coordinator is not told your choice.
Does it work with Codex and the other CLIs?
Yes, with every agent CLI that loads the AgentsRoom tools, because the restart goes through those tools and not through a command specific to one CLI. When a CLI does not load them, the action says so and you can type /clear in its console yourself.
Why does it say the agent cannot restart now?
The message gives the reason. The agent may be in the middle of a turn: wait for its answer. It may be a step of a running Agent Team or a QA run, which are refused. Its terminals may be shown in another window: bring them back to the main window. Or it hit the limit of one restart every 2 minutes and 6 per hour.

Further reading

You may also like

DevOps EngineerWriterFrontend DeveloperSales RepresentativeBackend DeveloperCoach & TrainerSoftware ArchitectLegal CounselQA EngineerFinance & AdminFull-Stack DeveloperCreative DesignerMobile DeveloperResearcherSecurity EngineerHR & Recruiting
Project ManagerTranslatorGit ExpertData AnalystSEO SpecialistAccountantLocalization SpecialistCommunications & PRBrainstormerOperations & LogisticsMarketing SpecialistCustomer SupportProject assistantProcurement BuyerCommunity ManagerPersonal Assistant

Give your agents a fresh start that remembers

Hand over and restart is in AgentsRoom on macOS, Windows and Linux, free to download.

Download AgentsRoomFree

Companion app: monitor your agents on the go

Bring your own: Claude, Codex, Antigravity CLI, or other AI provider.

Get the extension
Chrome Web Store

Push bugs and requests straight to your public backlog.

Agents you read like a conversation

Each agent has a role, a face, and a thread you read like a messaging app.

Conversation view

AgentsRoom conversation view: an AI coding agent's work shown as a chat thread
Multiple projects
Multi-provider
Multiple agents
Live status
File diff & commit
Mobile companion
Live preview
Agent teams
Browser automation
Backlog-driven dev
Prompt Library
Skills Library
View all features