Commit f42b0b4
feat(mcp): pilot/co-pilot control handoff for coordinated tasks
Adds explicit control handoff between the orchestrating agent and the
human user, modelled on a pilot/co-pilot system where control is always
unambiguously held by one party.
Each sub-task created by a coordinator has a new runtime field
`controlledBy: 'orchestrator' | 'human'`. The task panel shows a
persistent banner so the user always knows who has the stick:
- Orchestrator driving: subtle bar + "Take Control" button
- Human in control: amber warning banner "You have control —
orchestrator is paused" + "Return to Orchestrator" button
When the human holds control, the orchestrator's MCP tools are blocked:
- `send_prompt` throws immediately so the coordinator agent knows it
cannot proceed and must wait or work on other tasks
- `wait_for_idle` resolves immediately so the coordinator is not left
hanging; the status signals human control
Control returns to the orchestrator only via explicit user action —
never automatically. Returning control also fires any queued
`waitForIdle` resolvers so the coordinator can resume.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent e670022 commit f42b0b4
8 files changed
Lines changed: 1612 additions & 124 deletions
File tree
- electron
- ipc
- mcp
- src
- components
- store
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
1103 | 1110 | | |
1104 | 1111 | | |
1105 | 1112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
| |||
223 | 236 | | |
224 | 237 | | |
225 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
226 | 244 | | |
227 | 245 | | |
228 | 246 | | |
| |||
239 | 257 | | |
240 | 258 | | |
241 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
242 | 263 | | |
243 | 264 | | |
244 | 265 | | |
| |||
0 commit comments