Repository navigation
fix(permission): 在 Claude 桌面版里答过的权限请求,卡片不再挂到这一轮结束 - #389
Merged
wxtsky merged 2 commits intoOct 28, 2026
Merged
Conversation
…all finishes Claude Code's PermissionRequest carries no tool_use_id, so its card is taken down by a later step of the agent that asked (wxtsky#216), and a step naming a tool call must have the request's tool name and input (wxtsky#147). Answered in the Claude app, a propose_branch request outlived its own call's PostToolUse and was dropped two minutes later by the next UserPromptSubmit. With the same agent and tool, only the input can have differed: the call finishes with other input than it was asked with (the tool's schema keeps `_setupAnswer` for the app). The call's PreToolUse carries its tool_use_id and the input it was asked with, and the PostToolUse names the same id. A step now counts as the request's call when either its own input or that PreToolUse's input is the request's. The agent and tool name must still match, and the request is still answered with no decision. resolveOrphanPermissionsOnActivity runs before resolveToolUseIfCompleted, which forgets the PreToolUse once the call is done; the two take disjoint requests (without and with a tool_use_id).
…lUse past the cache TTL A request with no tool_use_id is now matched to its call through the input that call's PreToolUse recorded, but the cleanup tick forgets PreToolUse records 15 minutes after they arrive, whether or not a request still waits on that call. Answered in the Claude app after more than 15 minutes, propose_branch's card again outlived its call's PostToolUse and stayed until the next prompt or the end of the turn. A card's records now stay while a request without a tool_use_id waits in it; once nothing waits there, the next tick prunes them as before. Records of other cards are pruned on the same 15-minute TTL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wxtsky
added a commit
that referenced
this pull request
Oct 28, 2026
… idle removal and more Unreleased notes for this round: the island's 20 fps clock (#381, #391), "Always allow" holding in its session and Codex rules Codex can use (#380), shortcuts and pinned displays with a second monitor (#384), pi and Oh My Pi ringing once a task (#386), the Claude Desktop answer and background compaction fixes (#389, #388), removing idle cards (#385), the Codex Desktop thread jump (#387), the DeepSeek whale (#390) and the Grok / DeepSeek Harness sections in Group by CLI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
|
感谢 @Junyu06!定位很准:Claude Code 的 PermissionRequest 不带 tool_use_id。在桌面版里答完 我在你的提交上面加了一个维护者提交(6c61531):
单独跑全量测试、和这次其他改动合在一起跑全量测试,都通过了。已 squash 合并,会随下个版本发布。 |
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.
在 Claude 桌面版里答过
propose_branch(问改动放哪个分支)之后,刘海上的「待处理」卡要等这一轮结束才消失。答完以后,这次调用结束时的tool_input跟请求里的不一样了,同一个调用的PostToolUse就对不上请求(#216 要求输入相同)。相关:#388
改了什么
拿这次调用在
PreToolUse时的输入(按tool_use_id记在pendingToolUses里)跟请求比,对上了就算同一个调用。agent 和工具名照旧要相同。验证
swift test只有 main 上本来就失败的CodexTmuxRoutingTests.testProbeAgainstIsolatedTmuxServer。propose_branch:1.0.40 上卡片留到下一条消息才消失,这个分支上答完就消失。