Approval-gated action interrupted before its result is saved can never be retried
维护者通常 2 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 68/100
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 4.8k
- 派生
- 690
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 43
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CopilotKit/OpenDots 的其他 Issue
-
Page conversation panel overflows horizontally可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
CopilotKit/OpenDots#69 ·
维护者通常 2 天内回复
-
Long page titles are clipped in the page editor可能已有人在做 @charan-rathore 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
CopilotKit/OpenDots#68 ·
维护者通常 2 天内回复
-
Adopt Knip with staged cleanup and blocking CI checks可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 25/100
CopilotKit/OpenDots#147 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 1-2 天 新手友好度 25/100
CopilotKit/OpenDots#127 ·
维护者通常 2 天内回复
-
Space library retains pages deleted in another browser tab可能已有人在做 @HaningZS 于 4 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 15/100
CopilotKit/OpenDots#125 ·
维护者通常 2 天内回复
查看 CopilotKit/OpenDots 的全部 Issue
相似的 Issue
-
priority:high
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
immich-app/immich#32426 ·
维护者通常 1 天内回复
-
documentation good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
libredb/libredb-studio#1756 ·
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复