Handoffs
A Claude Code session in spekterm can hand work off to another repository in your workspace. Say an agent
in api-server changes an endpoint, and the client in web-app needs updating. The agent writes a
handoff, and spekterm opens a new claude session in web-app, gives it the handoff, and sends its first
prompt. The new session remembers where it came from and reports back when it is done.
How an agent knows it can hand off
Section titled “How an agent knows it can hand off”When a claude session starts, spekterm tells the agent that it is running inside spekterm, which
repositories in the workspace it can hand off to, and how to deliver a handoff. You do not need to set
anything up. Ask in plain words:
Hand the client-side changes off to web-app.
The agent writes a short title and a body that describes the work. spekterm reads the handoff, finds the target repository by name in your workspace, and starts the session there.
Unlike inbox items from Slack, a handoff opens without asking you first: an agent in your own session
wrote its text, not a third party. Its first prompt is sent as soon as the new agent is ready. Rarely, the
CLI does not take the submit key. The session then shows A prompt is waiting to be sent, and you press
Enter yourself; spekterm does not send it a second time.
When a session is already on it
Section titled “When a session is already on it”Before an agent hands work off, it looks at every agent session in your workspace: which repository each is in, its label, whether it is running, what it is doing (working, waiting for you, idle, or done), how full its conversation is, and what it reported when it finished. If a running session in the target repository is already on the same work, the agent sends the work to that session with Claude Code’s own messaging instead of opening a new one, and tells you which session got it. No new tab opens, and there is no handoff card or completion notification for it: follow it in that session’s tab.
- A session whose conversation is nearly full does not take new work. At 70% or more, a new session opens instead, so the work is not compacted halfway through.
- A session you never named says little. Its label is only its fixed name, so the agent asks it what it is doing, or asks you, before sending it anything. Naming your own sessions helps.
- A dormant session is woken only if it is related. The agent can wake its own parent, siblings and the sessions it handed off; for any other dormant session, it tells you the session exists and asks whether to wake it or open a new one.
- Asking for a new session wins. “Open a new session for this” opens one, whatever else is running.
- Scheduled and repeating handoffs always open a new session.
Handing work off to a later time
Section titled “Handing work off to a later time”A change often takes days to finish: the last steps wait for a deploy, for data to pile up, or for a review. Ask the agent to hand the rest off to a later time:
Hand the verification off to this repo for tomorrow at 9.
The agent adds the time to the handoff. spekterm checks the handoff right away, while the agent is still there: a target that does not exist, a body that is too long, or a time it cannot use is refused at once. An accepted handoff waits in the inbox under Scheduled, and its session opens when the time comes. It is always a new session, opened the same way as a handoff that opens immediately.
- It runs only while spekterm runs. If spekterm is closed at that time, the handoff opens at the next start, without asking. The new agent is told when the handoff was meant to start and when it actually did, so it can judge what changed in between.
- A scheduled handoff waits quietly. It sends no notification and adds no count to the inbox entry until it opens. Then it notifies you like any arriving handoff.
- It waits for the network, too. Before any handoff opens by itself, spekterm checks that your agent’s service answers (see Data and network). Closed lid, no Wi-Fi yet, or no network at all: the handoff keeps waiting, and the inbox says so, instead of opening an agent that cannot run. It opens once the service answers. This applies to every handoff that opens by itself, scheduled or not.
- What piled up opens one at a time. Handoffs that waited for the network, and handoffs found overdue when spekterm starts, open oldest first, one every 15 seconds. A handoff that arrives meanwhile does not wait behind them.
- Run now opens it at once, and Cancel drops it. A paired phone can do both. Run now, and accepting an item yourself, never wait for the network check.
- The time must include a time zone and can be at most 30 days ahead. A time that has already passed opens at once.
Each handoff opens by itself at most once. If that opening does not lead to a working session (its folder was removed, or the session could not start), the handoff stays in the inbox as an ordinary item for you to accept. spekterm does not try again.
Handing off work that repeats
Section titled “Handing off work that repeats”Some work comes back on a rhythm: a review every Wednesday evening, a check every weekday morning. Ask the agent for it:
Every Wednesday at 9 pm, open a session in this repo to write up the week’s review. Stop at the end of the year.
The agent writes a handoff with a repeat schedule in cron form, read in your computer’s time zone. For
example, 0 21 * * 3 is every Wednesday at 21:00. The agent can also set when the schedule starts and when
it ends. Without an end, it repeats until you stop it.
A repeating handoff is a proposal, not a schedule. Nothing opens until you approve it. It arrives in the inbox like any handoff, with a notification and a count, and waits under Schedules. There you see its schedule, the next times it would open, its end, and its full text. Approve it into the folder you choose, or Decline it. Approving opens nothing right away: the first session opens at the first time on the schedule.
- Each time opens a new session. Its agent is told that the handoff repeats, when this time was meant to start, and when it actually did.
- It runs only while spekterm runs. Times that pass while spekterm is closed (or the computer sleeps) run once at the next start, not once each. The agent is told which times it stands in for.
- One time at a time. The inbox lists only the next time. Run now opens it at once; that time is then done, and the one after it is next. Skip this time drops this time only.
- A time that cannot open pauses the schedule. That happens when its folder was removed or agent event reporting is off. The failed time stays in the inbox where you can see it, and no further time is created until you accept or dismiss it. Otherwise a schedule whose folder is gone would add a failed item every week.
- Stop repeating ends the schedule. You find it in the list of repeating handoffs under Schedules, and it asks you to confirm first. Sessions the schedule already opened stay.
- The schedule may open at most once an hour (the minute must be a single number), and it must have a time in the next four years.
- A paired phone can decline a proposal, and can run or skip a time. Approving and stopping happen only on the computer, or through an agent (next section).
Cancelling or changing what is scheduled
Section titled “Cancelling or changing what is scheduled”Plans change in conversation, so an agent can take back what is scheduled, too. Ask any agent session, not only the one that scheduled it:
Skip this week’s review. And move the nightly build check to Thursdays.
- What an agent can cancel is exactly what the Schedules tab lists: a scheduled handoff (it never opens), one time of a repeating handoff (it is skipped, and the schedule continues), a proposal (it is declined), or a repeating handoff (it stops repeating). Stopping through an agent does not ask for confirmation; the agent is told to check with you which item it means.
- A handoff whose session has started is not cancelled. Close its session instead.
- There is no “edit”. To change a time or a schedule, the agent writes the new handoff first and cancels the old one only after the new one is accepted. A changed repeating handoff is a new proposal you approve again; the old one keeps running until you do.
- Every cancel an agent makes is listed quietly under Schedules, in Cancelled by an agent, for 7 days: what it was, what was done, and which session did it. There is no notification. A cancel that could not be carried out notifies you like any refused delivery.
The agent finds what it can cancel in a file spekterm keeps up to date (schedules.json, beside the agent’s
outbox), with each item’s id, title, target, time and the start of its text. The receipt of a scheduled or
repeating handoff carries the same id.
Following a handed-off session
Section titled “Following a handed-off session”- The new session’s tab is named after the handoff’s title. Open handoff brief shows the handoff text and the latest result at any time.
- In the same repository, a handed-off session is indented under the session it came from on the rail. Across repositories, the child shows From its parent, and the parent shows how many sessions it handed off. Click either one to jump to the other.
- Each handed-off session has a state, shown on both ends: Working, Waiting for you, or Done. Waiting for you follows the session’s dot: once you have looked at the session, it shows no state until it works again (see What the dots say).
When the child agent finishes, it writes a short report. spekterm marks the session Done, shows the summary in the brief, and sends a desktop notification; clicking the notification opens the brief. The child agent can also send its result straight to the parent agent (see below).
A Done session starts again if you give it more work. spekterm never closes it on its own, though an agent can when you ask it to (see below). Close completed sessions one at a time or all at once: from the parent’s list of handed-off sessions, or with the workspace-wide action that appears while at least one is done. Both ask first and list each session’s result.
Agents talking to each other
Section titled “Agents talking to each other”Every claude session in spekterm runs under a fixed name made of its rail item and a short code, for
example web-app-3f9a. The name stays the same across restarts and wakes. Agents use these names with
Claude Code’s own local session messaging. A child can tell its parent it is done, and siblings handed off
by the same parent can coordinate. spekterm keeps each agent’s list of relatives up to date: its parent, its
siblings, and its children together with the sessions they handed off, at every depth. Claude Code delivers
the messages.
A hibernated or dormant session has no process and cannot receive messages until it is woken: by you, by spekterm after a restart, or by an agent that needs to reach it. An agent can wake any session in its list of relatives (see below), and is told to message it once it is running, not to wake a parent only to report that it is done, and to ask you before waking a session again that went back to sleep.
Giving each session a fixed name has a side effect: Claude Code shows that name as the terminal title. To see a task name on the tab instead, rename the tab. Your name takes priority.
Asking an agent to close, hibernate, or rename sessions
Section titled “Asking an agent to close, hibernate, or rename sessions”An agent can close, hibernate, or rename its own session and any session it handed off, including the ones those sessions handed off in turn. Ask in plain words:
We’re done here — close this session.
Hibernate the handoffs you finished.
- Close ends the session and removes it from the workspace, like closing its tab. Hibernate ends its process and keeps it dormant until you wake it. Rename changes the tab’s label.
- Close and hibernate wait for the session’s current turn to end. A handed-off session that is still working closes when it stops, not midway. Rename happens at once.
- An agent never closes its own session by itself. When it asks to, it finishes its reply first. The session then shows The agent asked to close this session, with Close and Keep. The reply stays readable and scrollable underneath, and nothing closes until you choose Close. Typing into the session counts as keeping it. A paired phone shows the same offer and can answer it (Remote access). An answer on either side counts for both.
- Typing into that session cancels a waiting close or hibernate, because you have taken it back. Hibernating, closing, or waking it yourself does the same. A waiting command is also dropped when spekterm quits.
- An agent can close, hibernate, or rename only its own subtree. If you ask it to close its parent, a sibling, or an unrelated session, the command is refused, and you see the refusal as a notification and an entry in the inbox.
- An agent can also wake a dormant session in its list of relatives: its parent, its siblings, and the sessions it handed off. The session starts at once, without asking you, and resumes its conversation; one that is already running is left alone. This is how an agent reaches a relative you hibernated. Waking a session the agent is not related to is refused like any other command.
- Nothing moves on screen: the rail selection and your keyboard focus stay where they are.
The agent’s receipt for a command (see below) says whether the command was accepted or refused, not whether it was carried out. The agent can see the outcome in its list of relatives: gone, not running, running again, or renamed.
Handing work to a teammate
Section titled “Handing work to a teammate”When you are on a team with the feature on, an agent can also hand work to a person:
it writes "to": "<handle>" in place of the repository. Agents are told this, and told to read a small file
spekterm keeps with your teammates’ handles and display names and the rules, before writing one.
Nothing leaves your computer until you send it. A handoff to a teammate waits in the inbox’s Outgoing tab, counted in the inbox badge, with a desktop notification. The tab shows who it is for, which session wrote it, the title and the whole body as plain text with its length — exactly the text that will be sent. Choose Send or Discard. There is no setting that sends without asking.
- spekterm checks the handoff before asking you: a handle that is not on your team, your own handle, a title over 200 or a body over 20,000 characters is refused at once (and shown in the inbox), as is any handoff while you are on no team or the feature is off. A handoff to a teammate cannot be scheduled.
- At most 20 wait for you; an agent that writes more is held back until you send or discard one.
- After Send, spekterm sends it as soon as it is connected to the team server, and again with the same identity if the answer was lost, so the teammate gets it once. If the server’s hourly limit is reached, the tab shows when it is sent again. A refusal (for example, the teammate left the team) stays in the tab with its reason until you dismiss it.
- Sent means the team server stored it for your teammate. Their spekterm shows it in its inbox, at once if it is open and at its next start if not. If your teammate has no device yet, the tab says it waits until they add one.
- A handoff belongs to the team you were on when the agent wrote it. If you leave that team, it is not sent to another; one whose sending may already have reached the server is refused rather than sent twice.
Following what you sent
Section titled “Following what you sent”The inbox’s Sent tab lists every handoff you sent to a teammate and where it is now: waiting for delivery, delivered (their spekterm has it), taken (they started a session on it), declined, done (their agent reported), or expired (not delivered within 30 days). A decline reason or the latest report is shown there as plain text, with a Copy button. Handoffs you sent from another of your devices, or before you joined again, are listed too, without their title. A teammate who left the team is marked.
When one of your handoffs is done, declined or expires, the device you sent it from shows a desktop notification; your other devices update their list quietly. A handoff that stays delivered for a while is your cue to talk to your teammate: spekterm does not remind them for you.
The agent that sent it sees the status in its relations file, as it sees a session it handed off on this computer — but not the report or the reason: those are your teammate’s words, so spekterm shows them to you and leaves it to you to pass on what the agent needs.
When a handoff fails
Section titled “When a handoff fails”A handoff that cannot be delivered is not lost silently. That happens when the agent names a repository that is not in your workspace (or a name two folders share), or writes a body too long to review. spekterm then sends a notification and keeps an entry with the reason in the inbox until you clear it, even across restarts.
Receipts: what the agent learns
Section titled “Receipts: what the agent learns”For every file an agent writes to spekterm (a handoff, a completion report, a command, or a cancel), spekterm writes a receipt the agent can read. The receipt says one of:
- accepted;
- scheduled, with the time and the handoff’s id;
- proposed: a repeating handoff waiting for your approval, with its id;
- duplicate: nothing new happened (for a cancel: it was already cancelled);
- rejected, with the reason and whether trying again can help;
- held: not finished yet; the reason says what happens next;
- for a handoff to a teammate: awaiting confirmation while it waits for you, then sent, discarded, or rejected with the team server’s reason.
The agent is not told later whether you approved a proposal.
With receipts, an agent can say “the handoff was accepted” instead of “I wrote it”, and an agent about to be closed learns of a refusal while it can still fix it.
A receipt records what spekterm did when it read the file. It does not mean the new session finished the work; that is what the child’s own report is for. An accepted handoff is also checked once more when it opens. If its folder was removed by then, the failure is shown to you, not to the agent.
What a handoff is not
Section titled “What a handoff is not”- Not a security boundary. An agent with a shell can write a handoff whenever it decides to, just as it can run any command. Handoffs only ever open sessions in folders that are already in your workspace.
- Not limited in number. An agent can hand off as often as it chooses.
- Not for other people, unless you send it. A handoff to a repository opens a session on your own machine, in your own workspace. A handoff to a teammate goes only when you press Send.