Skip to content

feat(router): A Switched Session Resumes With Its Brief, And Every Handoff Says It Moved - #108

Merged
AndrewTKent merged 1 commit into
mainfrom
andrew/handoff-resumes-with-a-brief
Sep 29, 2026
Merged

AndrewTKent merged 1 commit into
mainfrom
andrew/handoff-resumes-with-a-brief

Conversation

@AndrewTKent

Copy link
Copy Markdown
Owner

Executive Summary

A handoff to another account relaunched the session idle, with its in-process workflows gone. Nothing picked the work back up unless someone typed into the pane. Now every handoff relaunches with a first message saying the session moved. A session can also leave itself a brief, a one-line prompt plus a model, that its next relaunch runs with. A planned switch while nobody is at the keyboard resumes its work with nothing typed into the terminal.

Developer Summary

  • Notice on by default. ACCOUNTS_HANDOFF_NOTICE now defaults to on, and 0 turns it off. The supervisor reads it at each handoff instead of once at start.
  • accounts brief <session-id> --prompt "..." [--model M] writes ~/.accounts/handoff-briefs/<id>.json with mode 0600.
  • The supervisor uses the brief once, at all three handoff sites: a session wall, a routing or mode change, and a hold. The prompt follows the notice as the relaunch's single positional prompt, and the model replaces the running one.
  • Tests: a brief is read once and removed; the brief follows the notice; an end-to-end accounts set switch relaunches on the new account with the brief's prompt and model; the notice defaults to on; accounts brief writes the file the router reads. Each new branch was broken once, and each break failed exactly one test.
  • Validation: the CI pytest set passed, 520 tests. One timing test in the statusline-identity group failed once in an earlier full run and passed on the rerun and three times alone. This change doesn't touch it.

…ndoff Says It Moved

A handoff relaunches the session on --resume and leaves it idle at the
prompt, with every in-process workflow gone. Unattended, nothing picks the
work back up.

- The handoff notice is on by default (ACCOUNTS_HANDOFF_NOTICE=0 turns it
  off) and is read at each handoff instead of once at supervisor start.
- `accounts brief <session-id> --prompt "..." [--model M]` writes
  ~/.accounts/handoff-briefs/<id>.json. The supervisor uses it once, on the
  next handoff of any kind: the prompt follows the notice as the relaunch's
  first message, and the model replaces the running one.
@AndrewTKent
AndrewTKent merged commit f926028 into main Sep 29, 2026
5 checks passed
@AndrewTKent
AndrewTKent deleted the andrew/handoff-resumes-with-a-brief branch September 29, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant