Inbox permission: an allow sent with `updatedInput` is ignored by Claude Code on its own safety checks

オープン 初心者向け
#4,046 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Raj1v がすでに取り組んでいます。

2026年11月25日 から。

  • #4048 @Raj1v による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
authorization

調査の方向性

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 a setMode update, 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分
マージ済み PR(30日)
772

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

backnotprop/plannotator のほかの issue

backnotprop/plannotator の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。