Skip to content

fix - #90

Merged
danielehrhardt merged 1 commit into
mainfrom
godmode/14-fix
Oct 6, 2026
Merged

fix#90
danielehrhardt merged 1 commit into
mainfrom
godmode/14-fix

Conversation

@danielehrhardt

Copy link
Copy Markdown
Contributor

I fixed the agent_delegate abort after 300s, and the fix holds up against the real Claude Code CLI: a 40-second tool call now completes where it used to be cut off.

Cause: Claude Code stops any MCP tool call that sends neither a result nor a progress update for 5 minutes. While agent_delegate waited for another agent, the Godmode gateway only sent blank "keepalive" lines every 15s. Those keep the connection open, but Claude Code doesn't count them as progress, so long delegations were cut off. The same applied to delegation_status with wait: true.

Fix (packages/core/src/mcp/http.ts): when Claude Code's request includes a progress ID (it always does), the gateway now sends a progress update every 15s ("Still working (Ns)"). Clients that don't send a progress ID still get the old keepalive lines. Waiting up to timeoutSeconds (max 3600) now works.

Tests

  • New test in packages/core/test/mcp.test.ts: a slow delegation gets numbered progress updates with the caller's ID, then the agent's answer. All 40 MCP tests pass and typecheck is clean.
  • Real CLI check (Claude Code 2.1.289), with the 5-minute limit lowered to 3s and a tool that takes 40s:
    • Keepalive lines only: sent no response or progress for 30s; aborting — the same error as in this ticket.
    • Progress updates: the call finished and returned its result.

I merged the latest main into the branch before committing (8146344, author ••••••••). Nothing was pushed.

What you need to do: after merging, reinstall the desktop app with the update script — the fix lives in the Godmode server inside the app, so the error keeps happening until then.


Task #14 · done by Godmode with Godmode Bot

Claude Code aborts a tool call that sends neither a response nor a
progress notification for 5 minutes; SSE keepalive comments don't count,
so agent_delegate waiting on a peer failed after 300s. The gateway now
sends notifications/progress for the call's progressToken instead.
@danielehrhardt
danielehrhardt merged commit 76f610c into main Oct 6, 2026
7 of 8 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