Make the supervise MCP non-blocking (async approval + proposal polling) #412
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The per-bottle supervise MCP server (
supervise_server.py) handlestools/callsynchronously: it writes the proposal to the queue and blocks the agent's tool call polling for the operator's response (handle_tools_call->wait_for_response, default 30s grace viaSUPERVISE_RESPONSE_TIMEOUT_SECONDS). On timeout it returnsstatus: pendingand leaves the proposal queued -- but the agent gets no proposal id back and there is no way to poll a specific pending proposal, so its only option is to re-propose, creating duplicates.This blocks two things:
Enforcement is unaffected either way -- the MCP tools only propose policy; the egress proxy / git-gate still enforce -- so returning early opens no hole.
Proposal (this issue)
Make the supervise MCP non-blocking and pollable:
proposal_idin thependingresponse so the agent can reference it.check-proposalMCP tool: non-blocking status lookup by proposal id (pending | approved | modified | rejected), so the agent resumes after an async decision instead of re-proposing.Follow-ups (tracked, not in this PR)
pre-receivepath: reject-fast + re-push instead of holding the push open (it cannot poll).PRD to follow in the implementing PR.