anthropics / anthropics/claude-code

`ask` permission rules are silently overridden by the auto-mode classifier — breaking change to a safety contract (~2.1.236–238)

オープン
#88,604 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:permissions bug has repro platform:macos
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

**Environment:** Claude Code 2.1.238, macOS (darwin 25.5), API auth, `permissions.defaultMode: "auto"` with a machine-generated `autoMode` settings block.

**Expected:** For months, `ask` rules (`Bash(git push:*)`, `Bash(git -C*push:*)`, `Bash(gh pr create:*)`) produced an interactive approval prompt on every push/PR attempt **while running in auto mode** — ask and auto stacked. Hundreds of compound-shape pushes (`cd X && git push …`, `git -C X push … | tail`) in this machine's transcripts, all prompted.

**Actual:** After upgrading through 2.1.236 → 2.1.238 (and the new auto-mode config/environment-trust onboarding), push commands in those exact shapes execute with **no prompt**. The auto-mode classifier sometimes blocks unrelated commands (a `git commit` whose *message* contained the word "push") while letting real pushes through. The first silent push occurred 58 minutes after 2.1.238 was installed.

**Docs gap:** the permissions docs now say ask rules "are classified by the auto-mode classifier — safe operations proceed automatically." Nothing in the changelog or the auto-mode setup flow communicates that `ask` stops being an unconditional prompt in auto mode. Users who built safety workflows on ask-in-auto-mode (months of precedent behavior) get their gate removed silently.

**Repro:** auto mode + the ask rules above + `cd && git push origin main` → executes, no prompt.

**Supporting finding:** a PreToolUse hook returning `permissionDecision: "ask"` DOES appear to outrank the classifier — controlled headless A/B: identical `-p` auto-mode sessions with `--allowedTools Bash`; hook returning ask → command denied (never executed), hook silent → command executed. But whether hook-ask forces the interactive prompt in auto mode is also undocumented.

**Asks:**
1. Document the ask-rule/auto-mode interaction prominently (permissions docs, changelog, and the auto-mode onboarding flow).
2. Restore or provide an opt-in for hard-ask semantics in auto mode: an `ask` the user explicitly configured should never be waived by a model-driven classifier.
3. Document whether a PreToolUse hook's `permissionDecision: "ask"` is guaranteed to render the interactive prompt in auto mode.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Read the permissions documentation, changelog, and auto-mode onboarding flow, then run the listed reproduction with the ask rules and compound git push command. Compare that with the documented PreToolUse hook behavior. Done means the ask-rule interaction, hard-ask semantics, and hook prompt guarantee are explicitly resolved and documented.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, macos
領域
authorization, cli, documentation, security
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

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

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