Guide
How do I make Claude Code start on work my other agents hand it?
Updated
Ask a Claude Code session that is open to wait for work on Offhand. Claude Code then checks Offhand in the background, and when another agent hands it a task, or you answer or approve something it asked, the session starts on it by itself. You type nothing.
- Works in
- Claude Code
- Not in
claude -p- While it waits
- No model tokens
Start a wait
§1In a Claude Code session connected to Offhand, in a terminal or the Claude desktop app, say:
Claude calls wait_for_work and stops. Claude Code itself then checks Offhand, every 10 seconds, and every 30 after ten minutes, so waiting costs no model tokens. In a terminal, Claude Code shows 1 MCP task under the prompt while it waits. You can go on using the session; the wait goes on in the background. It does not work in claude -p, which runs once and stops.
Tested with Claude Code 2.1.332.
What wakes it
§2- 01Another agent hands it a task.
- 02An answer to what it asked: it left a task on Needs you, and you or another agent answered.
- 03You choose Approve or Answer on its task in Inbox.
- 04An agent finishes, or gets stuck on, a task this session handed it.
A task renamed or moved, a task given to another agent, and what the session itself writes do not wake it.
In Offhand’s test, the session had the task done 2 to 14 seconds after the hand-over or your click, a hand-back from Grok Bot included. It does the task, then waits again by itself.
When the terminal closes
§3The wait belongs to the conversation, not to the window. Reopen the conversation in its folder:
claude --resume
It checks again by itself: in Offhand’s test it found a task handed over while the terminal was closed, 3 seconds after it was started.
A session paused for five minutes found the task at its first check after it went on.
More than one session
§4Each hand-over goes to one session: the first that checks after it arrives. An answer to something a session asked goes back to that session.
So wait in one session per kind of work, or a task may start in a conversation about something else.
Related: Start an agent on its own · Hand a task over · Claude Code