CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT

環境変数

Claude Code の完全なシステムプロンプトと、ツール説明を簡略化した短いシステムプロンプトのどちらを使うかを選択する。未設定の場合、Haiku 4.5、Sonnet 5、Opus 4.7 およびこれらのファミリーの以前のモデルは既定で完全なプロンプトを使い、それより新しいモデルは短い方を使う。1 を設定すると任意のモデルで短いプロンプトを使う。0、false、no、off のいずれかを設定すると、実験やサーバー設定が短い方を選ぶように指定されている場合でも、任意のモデルで完全なプロンプトを使う。どちらのプロンプトでもツールセット、フック、MCP サーバー、CLAUDE.md の検出は完全に保たれる。

使い方・用途

  • 出力スタイルでカスタム指示を定義する際、keep-coding-instructions フィールドを機能させるためにフルシステムプロンプトを強制したい場合がある
  • CLAUDE.md や hooks・MCP サーバーを保ちつつ、簡略化されたツール説明の短いシステムプロンプトに切り替えたい場合がある
  • 実験やサーバー側の設定で短いシステムプロンプトが選ばれる状況でも、フルシステムプロンプトを確実に使いたい場合がある
英語原文

Choose between Claude Code's full system prompt and a shorter one with abbreviated tool descriptions. When unset, Haiku 4.5, Sonnet 5, Opus 4.7, and earlier models in those families use the full prompt by default, and newer models use the shorter one. Set to 1 to use the shorter prompt on any model. Set to 0, false, no, or off to use the full prompt on any model, even where an experiment or server configuration would otherwise select the shorter one. Either prompt keeps the full tool set, hooks, MCP servers, and CLAUDE.md discovery

関連する変更履歴

v2.1.312(1件)

Bedrock、Vertex、Foundry、Mantle について、Claude Code が認識しないモデル名(カスタムデプロイメント名や推論プロファイル ARN など)に対しては、Sonnet や Haiku を前面に置いている場合でも短いシステムプロンプトを使用するように変更した。完全なプロンプトを維持するには CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 を設定する
英語原文を表示
Changed Bedrock, Vertex, Foundry and Mantle to use the shorter system prompt for model names Claude Code doesn't recognize, such as custom deployment names and inference profile ARNs, even when they front Sonnet or Haiku; set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 to keep the full prompt

変更後

カスタムデプロイ名や推論プロファイル ARN など、Claude Code が認識しないモデル名を使っていても、実際のモデルに合わせた短いシステムプロンプトが適用され、トークン消費を抑えて動作させられる。