Skip to content

fix(core): cancel disconnected MCP interactions - #183

Merged
drewstone merged 3 commits into
mainfrom
fix/mcp-disconnect-interactions
Aug 15, 2026
Merged

fix(core): cancel disconnected MCP interactions#183
drewstone merged 3 commits into
mainfrom
fix/mcp-disconnect-interactions

Conversation

@drewstone

@drewstone drewstone commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Problem

Closing an MCP client left its pending broker request alive until timeout.
A late protocol response could replace an immediate retry.
Both attempts also reused one interaction ID, so a stale human answer could answer the retry.

Change

  • bind each MCP HTTP request to an abort signal
  • cancel the exact broker operation when its response disconnects
  • retain request generation across asynchronous protocol callbacks
  • serialize same-ID retries and discard superseded protocol responses
  • assign each retry a distinct human-interaction ID

Proof

  • both exact retry races failed before their fixes
  • the stale-answer retry passed 10 consecutive runs
  • built package: sameId=false, stale answer rejected, fresh answer accepted, fresh text returned
  • independent Luna review changed BLOCK to SHIP with 0 remaining findings
  • Agent Core passed 22 test files and 505 tests
  • TypeScript source and test checks passed
  • build passed
  • package artifact check passed for 9 packages, 28 exports, and 56 targets
  • merge simulation against current main passed

@tangletools tangletools left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — f0db1935

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

This approval is provisional. It rests on the audit running. If the audit cannot run — for example the CLI bridge rejects it — this approval is dismissed rather than left standing, so an unrun check never reads as a passing one.

tangletools · auto-approval · reason: drewstone_author · 2026-08-15T10:45:07Z

@tangletools

Copy link
Copy Markdown

⚠️ Review Interrupted — f0db1935

The review runner stopped before publishing a final verdict: webhook_restarted.

State Detail
Interrupted webhook restarted

No review verdict was produced for this run. Trigger a fresh review on the current PR head if the PR is still open.

tangletools · #183 · model: kimi-for-coding · updated 2026-08-15T11:23:37Z

@tangletools tangletools left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — ee034684

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

This approval is provisional. It rests on the audit running. If the audit cannot run — for example the CLI bridge rejects it — this approval is dismissed rather than left standing, so an unrun check never reads as a passing one.

tangletools · auto-approval · reason: drewstone_author · 2026-08-15T11:24:48Z

@drewstone
drewstone merged commit 101504f into main Aug 15, 2026
1 check 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.

2 participants