Skip to content

Fix coordinator control handoff#137

Open
brooksc wants to merge 1 commit into
johannesjo:mainfrom
brooksc:coordinator-control
Open

Fix coordinator control handoff#137
brooksc wants to merge 1 commit into
johannesjo:mainfrom
brooksc:coordinator-control

Conversation

@brooksc
Copy link
Copy Markdown
Contributor

@brooksc brooksc commented May 24, 2026

Problem

Coordinator control handoff could stall or diverge across UI/backend state. Releasing human control only notified the coordinator after a blocked send_prompt, not after wait_for_idle was interrupted. The renderer also persisted optimistic control state before backend acknowledgement, so frontend and backend ownership could drift.

Fix

Track idle waits interrupted by human control and stage the same resume notification when control returns to the coordinator. Make backend control changes fail loudly for missing coordinator state or unknown tasks. Persist renderer control state only after backend acknowledgement, with rollback on failure, and make auto-trust release wait for backend acknowledgement before updating UI state.

Verification

  • git diff --check
  • npm run check
  • npm test
  • Confirmed this branch is rebased on latest johannesjo/main
  • Confirmed the PR contains one commit touching only:
    • electron/ipc/register.ts
    • electron/mcp/coordinator.test.ts
    • electron/mcp/coordinator.ts
    • src/store/taskStatus.ts
    • src/store/tasks.test.ts
    • src/store/tasks.ts

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