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

Aperta Adatta ai principianti
#4,046 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Raj1v ci sta già lavorando.

Dal 25/11/2026.

  • #4048 di @Raj1v — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
authorization

Direzione di ricerca

Parti da packages/core/inbox-permission.ts, in inboxPermissionDecisionFor, dove ogni allow restituisce l'input dello strumento come updatedInput. La correzione consiste nel rimuovere questo campo dalla decisione allow lasciando invariato il percorso ExitPlanMode, che invece ne ha davvero bisogno. Leggi prima i test esistenti attorno a questo modulo ed eseguili. Poi conferma con un hook PermissionRequest sostitutivo che approva sempre, verificando che la decisione arrivi ancora a Claude Code. È completato quando un allow senza updatedInput viene accettato per Bash, Write e un aggiornamento setMode, e nessun test si aspetta l'input restituito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
8.7k
Fork
649
Merge medio
14h 26m
PR unite (30g)
772

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di backnotprop/plannotator

Tutte le issue di backnotprop/plannotator

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.