Skip to content

feat(desktop): switch agent from the runner panel (TM-977 B3) - #934

Merged
acrossoffwest merged 4 commits into
masterfrom
feat/tm-977-desktop-switch
Nov 16, 2026
Merged

acrossoffwest merged 4 commits into
masterfrom
feat/tm-977-desktop-switch

Conversation

@acrossoffwest

Copy link
Copy Markdown
Collaborator

Third part of TM-977 stage B. Stacked on #933 (needs its tmgr-session switch module and parent_session field); merge #933 first, then this PR applies cleanly.

  • Tauri command runner_switch_agent: refuses non-local, queue, link and team sessions; confirm dialog (skipped only for the auto path); stops the old session through the runner with reason 'handed to '; builds the handoff note with tmgr_session::switch; starts the new run through the desktop's own gated start pipeline (same bundle, folder pin and caps checks as Run with agent) with the note as the first message and the old session as parent_session. The new run starts in the default ask mode in the sandbox. The panel shows the safe-mode line when the old session ran in bypass or without the sandbox.
  • Opt-in auto-switch: runner_auto_switch / runner_set_auto_switch (stored in the desktop runner config, off by default). The panel switches a limit-hit session once, only while the desktop is running; the command refuses when the toggle is off or the task was already switched twice.
  • Panel: Limit reached label, Switch agent button, auto-switch checkbox, result notice. No CLI is spawned; nothing is sent from the server.
  • RunnerSession gains limit and handoffFrom. New permissions in runner-main.json.
  • Not covered: end-to-end run with real agents. Desktop runs do not record agent work (existing behaviour of runner_start_run), so the cancelled/parent bookkeeping applies to CLI runs only.
  • Desktop release needed after merge; proposed desktop-v0.9.x per the next free tag (check ls-remote before tagging).

@acrossoffwest
acrossoffwest force-pushed the feat/tm-977-desktop-switch branch from 71bbded to 748018d Compare November 16, 2026 08:47
@acrossoffwest
acrossoffwest force-pushed the feat/tm-977-desktop-switch branch from 748018d to 5736757 Compare November 16, 2026 08:50
@acrossoffwest
acrossoffwest merged commit 3f08384 into master Nov 16, 2026
19 of 20 checks passed
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