Repository navigation
feat(remote): interrupt subagents from Aiden On The Go (contract revision 16) - #275
Conversation
Add POST /chats/{chatId}/agents/{agentId}/interrupt, gated by chat:write,
the negotiated agents:read grant, and the chat-agent-interrupt-v1 feature.
The router maps the public agentId back to the private run and reuses the
desktop subagent stop path through a trusted chat-scoped stopForChat.
Claim contract revision 16 with an agentInterrupt fixture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iOS and Android offer a confirmed "Stop agent" control in the agent detail sheet when the Mac advertises chat-agent-interrupt-v1 and the device holds chat:write plus agents:read (and Bot read/write for Bot chats). The control calls the revision-16 interrupt route, adopts the returned roster, and is hidden for finished agents or older turns. Fixture tests cover revision 16 and the stopped-roster contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes This initial review covers the Remote subagent interrupt contract and server path, the iOS and Android confirmation and roster flows, and the associated fixtures, documentation, and tests.
- Remote stop route. The new authenticated route checks write and agent-read authority, applies the retained Bot mutation gate, resolves only the public agent ID, and delegates to the main-owned chat/workspace-bound control path.
- Mobile controls. Both clients gate the confirmed Stop action on the advertised feature, grants, and current nonterminal roster, avoid automatic retries, and adopt the returned roster.
- Contract coverage. The OpenAPI route, shared and Android fixtures, protocol parsing, and focused server/client behavior are covered by the changes.
Local verification: npm run test:aiden-remote and focused Remote interrupt/control tests passed. The broader npm run test:subagents run could not complete on this Linux runner because native helper binaries are unavailable; iOS and Android suites were not run here.
GPT Luna | 𝕏
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes This incremental pass rechecked the merge from current main and the papercut-only cleanup after the last review.
- Merged Android updates. Verified the updated chat-screen selection flow and attachment send guards compose with the agent detail stop sheet; the stream-state gate remains intact.
- Dropped the papercut note. Confirmed
e584c56only removes the transient.papercutsentry and changes no runtime or contract behavior.
Focused verification: ./gradlew :app:testDebugUnitTest --tests sbtbiswas.AidenOnTheGo.AidenChatTest --rerun-tasks passed.
GPT Luna | 𝕏
Hermes Review BotConfidence: 5 Engine: SummaryPaired mobile devices running Aiden On The Go can now interrupt individual running delegated agents without stopping the parent chat run or sibling subagents. The host exposes an authenticated Remote route Confidence Score: 5/5The complete diff was inspected across macOS desktop services, iOS, Android, and contract fixtures, tracing the full lifecycle from mobile UI confirmation to main-process process termination, authorization boundaries, and state adoption. 📁 Important Files Changed
FindingsNo findings. 📊 Sequence DiagramsequenceDiagram
autonumber
actor User as User (Mobile)
participant Client as Mobile Client (iOS / Android)
participant Router as Aiden Remote Router
participant Progress as Chat Progress Service
participant MainControl as SubagentControlMainV2
participant Projector as Subagent Process
User->>Client: Tap "Stop agent" & confirm
Client->>Router: POST /chats/{chatId}/agents/{agentId}/interrupt (Bearer auth)
Router->>Router: Authorize chat:write, agents:read & classify chat
Router->>Progress: interruptAgent(deviceId, chatId, agentId)
Progress->>Progress: Resolve agentId to private runId & verify live
Progress->>MainControl: stopForChat({ chatId, workspaceId }, runId)
MainControl->>Projector: Abort execution signal & revoke approvals
MainControl->>MainControl: Persist stopped snapshot & settle
MainControl-->>Progress: Confirm stop
Progress->>Progress: Build updated ChatAgentRoster
Progress-->>Router: Refreshed ChatAgentRoster
Router-->>Client: 200 OK (ChatAgentRoster with stopped agent)
Client->>Client: Adopt roster, play haptic, clear in-flight state
Client-->>User: Update agent status to "Stopped"
Machine-Readable Findings[]
|
* docs(plans): refresh plan index and status for 0.51.0 Supersedes #274. Moves 22 completed plans into docs/plans/completed/, refreshes active plan status against main after 0.51.0, records unlinked shipped changes (#265, #275, #280), and updates .memory notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(plans): note #220/#223 superseded and Steer moved to #298 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(plans): record desktop and Telegram Steer shipped in #298 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Summary
This PR lets a paired phone stop one running delegated agent (subagent) from Aiden On The Go. It goes through the same Mac stop path the desktop agent panel uses. It adds an authenticated Remote route (contract revision 16, feature
chat-agent-interrupt-v1) and a confirmed Stop agent control in the iOS and Android agent sheets.Source: Hermex P1, Hermes subpage 6 (subagent interrupt from mobile).
Changes
Desktop / Remote server
SubagentControlMainV2.stopForChatresolves the owning chat document privately and reuses the existing desktop stop path.POST /chats/{chatId}/agents/{agentId}/interruptinaiden-remote-router.ts, wired throughaiden-remote-chat-progress.ts(interruptAgent) andaiden-remote-service-main.ts./server.featuresadvertises the route only when it is wired.chat:writeplus the negotiatedagents:readgrant, andbot:writefor retained Bot chats. Archived chats getmutation_blocked. There is no new capability and no Idempotency-Key.operation_stale: the run is legacy or unbound.interruptChatAgentand theAgentIdparameter), the shared fixture (agentInterrupt, revision 16), protocol parse validation for the fixture, and the Android fixture copy.iOS
AidenRemoteClient.interruptAgentvalidates the agent ID and the response's chat.AidenChatFeature.canInterruptAgents/canInterrupt(_:)/interruptAgent(_:)adopt the returned roster, play a haptic on stop, and show error copy for revoked or unconfirmed stops.AidenAgentDetailViewfollows the live roster and shows a destructive Stop with a confirmation dialog.Android
AidenRemoteClient.interruptAgentdoes not auto-retry on a dropped connection.AidenServer.supportsChatAgentInterruptgates the control.AidenChatViewModel.interruptAgenttracksinterruptingAgentIds.AidenAgentDetailSheetgainsAidenAgentStopControl(hidden, available or stopping) and an AlertDialog confirmation.Docs
docs/aiden-remote-api-v1.md: the route, the feature token and the child-control exception.docs/plans/README.md: a status row for this work..memory/remote-subagent-interrupt.md.papercuts/troubleshooting.mdTests run
npm run test:aiden-remote: pass. This covers the router route and authorization, the chat-progress interrupt, the OpenAPI inventory, the revision-16 fixture validation, and the operation contract.npm run test:subagents: pass. The first run had one failure whiletscran at the same time; two reruns passed. This is recorded in papercuts.npm run type-checkand eslint on the touched files: clean.xcodebuild teston the iPhone 17 simulator: 525 passed, exit 0. New tests:./gradlew testDebugUnitTest: pass. It adds a MockWebServer interrupt route test and revision-16/agentInterruptfixture assertions.Follow-ups
scripts/subagent-run-store.test.mjsload-sensitive flake (see papercuts).🤖 Generated with Claude Code