sakutto
生成AI

Claude Codeのautoモードが既定に|何が自動実行され何で止まるか

Claude CodeAnthropic開発環境
Claude Codeのautoモードが既定に|何が自動実行され何で止まるか

autoモードとは

autoモードの要点

審査役
人ではなく分類モデル(別のAI)
既定
Pro・Max・Teamで開始モード
例外
明示的なaskルールは必ず確認

autoモードとは Claude Code の権限モードの1つです。基礎は Claudeの解説ガイド にあります。

分類モデルが人の代わりに審査する

autoモードでは、毎回の許可確認を出さずに実行します。 代わりに分類モデルという別のAIが実行前に審査し、依頼の範囲を超えるもの、見知らぬインフラを対象にしたもの、読み込んだ悪意ある内容に誘導されたと見えるものを止めます。

公式情報を見る →
"Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit ask rules still force a prompt."(Eliminate permission prompts with auto mode の節)— Claude Code 公式ドキュメントより

Pro・Max・Teamでは既定の開始モード

Pro・Max・Teamの各プランでは、autoモードが組み込みの開始モードです。 ただし対象はターミナルとVS Code拡張のセッションで、claude -p やSDK経由、インストール直後の初回セッションはManualで始まります。版数もv2.1.228(Windowsはv2.1.233)以降が条件です。

公式情報を見る →
"On Pro, Max, and Team plans, auto mode is the built-in starting mode."(Eliminate permission prompts with auto mode の節)/"The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual."(Which mode a session starts in の節)— Claude Code 公式ドキュメントより

何で止まるのか

既定でブロックされる操作(抜粋)

外部実行
curl | bash 等のコード取得と実行
本番反映
本番デプロイとマイグレーション
破壊
ストレージ一括削除・force push
権限
IAM・リポジトリ権限の付与

線引きは公式が列挙しています。

既定でブロックされる代表例

分類モデルは作業ディレクトリと、セッション開始時のリモートだけを信頼し、他は外部として扱います。 既定でブロックされるのは、コード取得と実行、機微データの外部送信、本番デプロイとマイグレーション(DB構造の変更適用)、ストレージの一括削除、IAM(クラウドの権限管理)権限の付与、共有インフラの変更、既存ファイルの不可逆な破壊、force push(履歴の強制上書き)、git reset --hardterraform destroy など。

公式情報を見る →
"The classifier trusts your working directory and the remotes that were configured for it when the session started."(What the classifier blocks by default の節)/"Downloading and executing code, like `curl | bash`"/"Sending sensitive data to external endpoints"/"Production deploys and migrations"/"Mass deletion on cloud storage"/"Granting IAM or repo permissions"/"Modifying shared infrastructure"/"Irreversibly destroying files that existed before the session"/"Force push"/"`git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes"/"`terraform destroy`, `pulumi destroy`, `cdk destroy`, or `terragrunt destroy`, and applying a plan that destroys resources"(いずれも同節の Blocked by default 一覧)— Claude Code 公式ドキュメントより

「安全になる」わけではない

公式は「autoモードは許可確認を減らすが、安全を保証するものではない」と明記しています。 方向性を信頼できる作業向けで、機微な操作のレビューの代わりにはならない位置づけです。

公式情報を見る →
"Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations."(Eliminate permission prompts with auto mode の節の警告ボックス)— Claude Code 公式ドキュメントより

切り替えと無効化

切り替えの手段

セッション中
CLIはShift+Tabで循環。VS Code等はモード選択
既定を変える
~/.claude/settings.jsonpermissions.defaultMode
組織で禁止
管理設定の permissions.disableAutoModedisable

変えられないわけではありません。

自分の環境で切り替える

CLIはShift+Tabで循環でき、VS Code・デスクトップ・claude.ai ではモード選択から変えられます。 開始モードを変えるなら permissions.defaultMode ですが、v2.1.142以降、auto はリポジトリ内の .claude/settings.json.claude/settings.local.json からは効かないため、~/.claude/settings.json に置きます。

公式情報を見る →
"Cycle modes with Shift+Tab in the CLI or use the mode selector in VS Code, Desktop, and claude.ai."(ページ冒頭の説明)/"In Claude Code v2.1.142 and later, `auto` doesn't take effect from those files. Move it to `~/.claude/settings.json`."(Eliminate permission prompts with auto mode の節)— Claude Code 公式ドキュメントより

組織単位で止める

組織で開発者にautoモードを使わせない場合は、管理設定で permissions.disableAutoModedisable にします。 Shift+Tabの循環からautoが外れ、--permission-mode auto 指定でもManualで始まります。

公式情報を見る →
"Organization: on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in managed settings."(Requirements ブロック)/"To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in managed settings. This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead."(Auto mode on Bedrock, Agent Platform, or Foundry の節)— Claude Code 公式ドキュメントより

見出しや表の構造を保ったままマークダウンにして、手元で読みたいときは次のツールをどうぞ。

無料ツールURLマークダウン変換URL(ウェブページ)を入力するだけでマークダウン(Markdown)に変換。見出し・表・リスト・リンクを保持したままmd化でき、LLMやRAGの前処理、調査資料の整形にも最適な無料オンラインツール。今すぐ使ってみる →

よくある質問

Q. Claude Code の auto モードとは何ですか?
毎回の許可確認を省いて実行できるモードです。人が確認する代わりに、分類モデルと呼ばれる別のAIが実行前に操作を審査します。依頼の範囲を超える操作や、見知らぬインフラを対象にした操作などはブロックされます。
Claude Code 公式ドキュメント(Permission modes)
Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Claude Code 公式ドキュメント(Permission modes)
Q. auto モードは既定で有効になっていますか?
Pro・Max・Teamの各プランでは、autoモードが組み込みの開始モードです。ただし対象はターミナルとVS Code拡張のセッションで、claude -p やSDK経由、インストール直後の初回セッションはManualで始まります。版数もmacOS・Linux・WSLはv2.1.228以降、Windowsはv2.1.233以降が条件で、それ以前はManualが既定です。
Claude Code 公式ドキュメント(Permission modes)
On Pro, Max, and Team plans, auto mode is the built-in starting mode. / The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. Claude Code 公式ドキュメント(Permission modes)
Q. auto モードにすれば安全ということですか?
違います。公式は「許可確認は減るが安全が保証されるわけではない」と明記しています。方向性を信頼できる作業に使うもので、機微な操作のレビューを置き換えるものではないとされています。
Claude Code 公式ドキュメント(Permission modes)
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations. Claude Code 公式ドキュメント(Permission modes)

関連ツール

関連ツールカテゴリ

記事