Inbox permission: an allow sent with `updatedInput` is ignored by Claude Code on its own safety checks
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
从 packages/core/inbox-permission.ts 中的 inboxPermissionDecisionFor 开始,那里每个 allow 都会把工具输入原样作为 updatedInput 回传。修复方法是从 allow 决定中去掉该字段,同时保持确实需要它的 ExitPlanMode 路径不变。先阅读并运行该模块周围的现有测试。然后用一个始终放行的替身 PermissionRequest 钩子进行确认,检查决定仍能到达 Claude Code。完成的标准是:不带 updatedInput 的 allow 能被 Bash、Write 和 setMode 更新接受,并且没有任何测试期望回传的输入。
由索引模型根据 Issue 内容生成。
描述
What happens
A launched Claude Code session (auto mode) calls EnterWorktree with a worktree outside .claude/worktrees/. The Inbox shows the permission card, I pick "Allow once" within seconds, and the hook receives the decision. Claude Code still leaves its own permission dialog open in the terminal ("permission-root relocation … a model-supplied worktree outside .claude/worktrees/"). The agent stayed blocked for 31 minutes until I approved it in the terminal. The card looked answered the whole time.
Cause
inboxPermissionDecisionFor (packages/core/inbox-permission.ts) returns every allow with updatedInput: event.tool_input, i.e. the tool's own input echoed back. On Claude Code 2.1.332, an allow that carries updatedInput is ignored when Claude Code's own safety check asks for a human. Without updatedInput, the same allow goes through ("Allowed by PermissionRequest hook").
Repro (Claude Code 2.1.332, a stand-in PermissionRequest hook that always allows)
- Allow with
updatedInput: the dialog stays up, both when sent at once and after 25 s. - Allow without
updatedInput: allowed, both when sent at once and after 25 s. The same holds for asetModeupdate, Bash and Write.
Fix
Leave out updatedInput on allows. The hook only ever echoed the event's own input, so nothing is lost. ExitPlanMode, which does need updatedInput, never reaches this hook.
#3854 fixed a different case: a question withdrawn between hook polls. Here the question was never withdrawn; the decision was delivered and then ignored.
- 主要语言
- TypeScript
- 星标
- 8.7k
- 派生
- 649
- 平均合并
- 14 小时 26 分钟
- 30 天内合并 PR
- 772
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
backnotprop/plannotator 的其他 Issue
-
Codex routine preflight ignores project-level Inbox MCP registration可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
backnotprop/plannotator#4000 ·
维护者通常 1 天内回复
-
Code review: binary paths containing ` b/` are truncated and misclassified as renames可能已有人在做 @Guihakka2 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
backnotprop/plannotator#3936 ·
维护者通常 1 天内回复
-
PR description is hidden when a PR review opens on a phone可能已有人在做 @flipcyde101 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
backnotprop/plannotator#3667 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
backnotprop/plannotator#2643 · 1 个 reaction ·
维护者通常 1 天内回复
-
Annotate documentation omits per-file version history and privacy controls可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
backnotprop/plannotator#1086 · 2 条评论 ·
维护者通常 1 天内回复
查看 backnotprop/plannotator 的全部 Issue
相似的 Issue
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10可能已有人在做 @goranai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
traPtitech/knoQ_R-UI#290 ·
维护者通常 24 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 64/100
farion1231/cc-switch#9981 · 2 条评论 ·
维护者通常 1 天内回复
-
account bug course exam iris lecture
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100