Repository navigation
fix: recover interrupted approval-gated MCP actions - #155
Open
Twil3akine wants to merge 1 commit into
Open
Twil3akine wants to merge 1 commit into
Twil3akine wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #134.
Summary
Recover approval-gated MCP actions that were claimed but interrupted before their result was saved.
A stale result-less claim is now surfaced as interrupted and can be retried by the same approval and tool call. Fresh claims remain protected against duplicate execution.
Cause
mcp_actionspersisted arunningrow as soon as an approved action was claimed.If the server stopped after that claim but before
finishActionsaved the result, the row remainedrunningindefinitely. Every later attempt therefore returned409 This action is already running., while the UI continued to hide the approval controls.Fix
Retry & runaction.The five-minute recovery threshold leaves a margin above the existing 60-second MCP call timeout before a claim can be retried.
Validation
NODE_USE_ENV_PROXY=0 npm test: 54 files, 346 tests passed.npm run build: passed.npm run typecheck: passed.npm run lint: passed.npm run check-format: passed.Regression coverage includes stale-claim recovery, approval ownership, concurrent retry protection, fresh-claim rejection, saved-result handling, and the interrupted-action retry UI.
The environment had
NODE_USE_ENV_PROXY=1, which routed existing loopback HTTP tests through a proxy, so the full suite was run with environment proxy routing disabled.Prepared with AI assistance using gwitg.