Approval-gated action interrupted before its result is saved can never be retried
I maintainer di solito rispondono entro 2 giorni
@DerekChia ci sta già lavorando.
Dal 10/10/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start with the action receipt and the claimAction/finishAction flow around the mcp_actions table and the POST /api/conversations/thread/connection-actions endpoint. Also trace the approval action card’s polling and retry controls, using the 60-second ConnectionService timeout as the stale-run threshold. Done means an interrupted result-less run can be reclaimed only by its original approval, fresh claims still receive 409, saved results remain protected, and the UI exposes a successful retry.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
If the server stops between claiming an approval-gated MCP action (claimAction) and saving its result (finishAction), that (threadId, toolCallId) is bricked: every retry returns 409 This action is already running. forever, because mcp_actions rows have no expiry and there is no code path that clears a result-less running row.
Worse, the owner has no way to retry from the UI: the action card polls the receipt every 2s, sees status: running, shows "Running / This action is still running on the server.", and hides the Approve buttons while running is true. The card sits on "Running" forever with no affordance.
Reproduction
- Start OpenDots (local
npm run dev, Node v22.23.1) with a Dot that has an MCP connection with a gated (non-read-only) tool. - Have the Dot call the gated tool so the owner gets an approval card.
- Approve it, and kill the server process after the claim INSERT but before the result UPDATE lands (equivalently:
INSERT INTO mcp_actions(threadId,toolCallId,connectionId,tool,status,result,createdAt,approvalId) VALUES('thread','tc1','c','tool','running',NULL,<now>,'<approvalId>');). - Restart the server and open the conversation.
- The card shows "Running" forever; approving/refreshing never completes.
POST /api/conversations/thread/connection-actionswith the same approval returns409 {"error":"This action is already running."}on every attempt, until the approval itself expires an hour later.
Expected: after the in-flight run is demonstrably gone, the receipt should surface the interruption and the same approval should be able to run the stored request again (the request is already bound to its exact connection/tool/arguments, and only that approval may reclaim it).
Actual: misleading "already running" 409 with no self-healing and no owner retry path.
Notes
- MCP tool calls are bounded to 60s (
ConnectionServicetimeout), so a result-less claim older than a few minutes cannot belong to a live run. - The fix must preserve the double-claim guard: a fresh
runningrow must still 409 (double click / retried request must not execute twice), a saved result must still be returned only to its own approval, and a different approval must never steal the claim.
- Lingua principale
- TypeScript
- Stelle
- 4.8k
- Fork
- 690
- Merge medio
- 1g 15h
- PR unite (30g)
- 43
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CopilotKit/OpenDots
-
Page conversation panel overflows horizontallyForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CopilotKit/OpenDots#69 ·
I maintainer di solito rispondono entro 2 giorni
-
Long page titles are clipped in the page editorForse già presa @charan-rathore l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
CopilotKit/OpenDots#68 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 25/100
CopilotKit/OpenDots#127 ·
I maintainer di solito rispondono entro 2 giorni
-
Space library retains pages deleted in another browser tabForse già presa @HaningZS l’ha presa 3 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
CopilotKit/OpenDots#125 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 Più di una settimana Idoneità per principianti 8/100
CopilotKit/OpenDots#123 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di CopilotKit/OpenDots
Issue simili
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
alunduil/projects-v2-sync#21 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
testcontainers/testcontainers-node#1539 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
christopher-buss/eslint-plugin-flawless#72 ·
I maintainer di solito rispondono entro 1 giorno
-
cleanName keeps a state code that's joined to the word before it (SavannahGa → "Savannah Ga")Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
openwatersio/slackwater-database#281 ·
I maintainer di solito rispondono entro 1 giorno