Captured System Prompts
A system prompt is the text that Claude Code sends to the model before your first message. It tells the model who it is, how to behave, and what the session looks like. The model reads it on every request.
Claude Code has no single system prompt. It builds one from parts. The parts depend on the model, on flags, on env vars, on your output style, and on whether the request comes from the main agent or a subagent. This section shows every variant that you can pick, in full, with a diff against the default.
The text on these pages is Anthropic's. It is shown here only to describe how the program works. See the notice on the home page.
Status badges:
Every Prompt and How to Change It
A condition in parentheses after a prompt name is the condition that makes the prompt apply.
| Prompt | Can You Change It? | Turn On or Off | Where It Lives | Status |
|---|---|---|---|---|
| Default, Lean Prompt (Every session on a lean model gets it) | Yes. Use the flags and settings on the other pages. | CLAUDE_ switches to the full prompt. | Built into the program. Nothing on disk. | Undocumented: Only the program shows this item. It can change without notice. |
| Default, Sonnet 5.5 (Every Sonnet 5.5 session gets it) | Yes. Use the flags and settings on the other pages. | CLAUDE_ switches to the full prompt. | Built into the program. Nothing on disk. | Documented: An official docs page names this item. |
| Default, Haiku 5.5 (Every Haiku 5.5 session gets it) | Yes. Use the flags and settings on the other pages. | CLAUDE_ switches to the full prompt. | Built into the program. Nothing on disk. | Undocumented: Only the program shows this item. It can change without notice. |
| Full Prompt | Yes. Set or unset the env var. | CLAUDE_ (also false, no, off). | Environment variable. Put it under env in settings. to keep it. | Documented: An official docs page names this item. |
| Simple Prompt Switch on Sonnet | Yes. Set or unset the env var. | CLAUDE_. | Environment variable. | Documented: An official docs page names this item. |
| Simple Prompt Switch on Haiku | Yes. Set or unset the env var. | CLAUDE_. | Environment variable. | Documented: An official docs page names this item. |
| Simple Prompt Switch on Opus | Yes. Set or unset the env var. | CLAUDE_. | Environment variable. | Documented: An official docs page names this item. |
| Bare Mode | No. The two lines are fixed. | -- or CLAUDE_. | Command-line flag. | Documented: An official docs page names this item. |
| Simple Mode Env Var | No. The two lines are fixed. | CLAUDE_. | Environment variable. | Documented: An official docs page names this item. |
| Exclude Dynamic Sections | No. It only moves text. | --. | Command-line flag. | Documented: An official docs page names this item. |
| Exclude Dynamic Sections, Full Prompt | No. It only moves text. | --. | Command-line flag. | Documented: An official docs page names this item. |
| Output Style, Explanatory | Not the built-in text. You can write a custom style. | / or the output setting. | output in any settings scope. | Documented: An official docs page names this item. |
| Output Style, Learning | Not the built-in text. You can write a custom style. | / or the output setting. | output in any settings scope. | Documented: An official docs page names this item. |
| Output Style, Proactive | Not the built-in text. You can write a custom style. | / or the output setting. | output in any settings scope. | Documented: An official docs page names this item. |
| Output Style, Concise | Not the built-in text. You can write a custom style. | / or the output setting. | output in any settings scope. | Documented: An official docs page names this item. |
| Custom Output Style | Yes. You write the file. | / or the output setting. | ~/. or .. | Documented: An official docs page names this item. |
| Custom Output Style on the Full Prompt | Yes. You write the file. | / or the output setting. | ~/. or .. | Documented: An official docs page names this item. |
| Custom Output Style with Keep Coding Instructions | Yes. You write the file. | keep- in the style's front matter. | ~/. or .. | Documented: An official docs page names this item. |
| Custom Output Style with Keep Coding Instructions, Lean Prompt | Yes. You write the file. | keep- in the style's front matter. | ~/. or .. | Documented: An official docs page names this item. |
| Append System Prompt | Yes. You give the text. | -- or --. | Command-line flags. | Documented: An official docs page names this item. |
| Replace System Prompt | Yes. You give the text. | -- or --. | Command-line flags. | Documented: An official docs page names this item. |
| Replace and Append Together | Yes. You give the text. | The two flags. | Command-line flags. | Documented: An official docs page names this item. |
| With a CLAUDE.md File | Yes. You write the file. | Add or remove the file. CLAUDE_ skips them. | CLAUDE., ., ~/.. | Documented: An official docs page names this item. |
| Inside a Git Repository (It happens on its own) | No. | include in settings controls the git rules. The status text always appears in a repo. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Main Thread Custom Agent | Yes. You write the agent file. | -- or the agent setting. | . or ~/.. | Documented: An official docs page names this item. |
| Permission Mode, Plan | No. | -- or default in settings. | Flag or settings. | Documented: An official docs page names this item. |
| Permission Mode, Accept Edits | No. | -- or default in settings. | Flag or settings. | Documented: An official docs page names this item. |
| Permission Mode, Don't Ask | No. | -- or default in settings. | Flag or settings. | Documented: An official docs page names this item. |
| Brief Mode | No. | --. | Command-line flag. | Undocumented: Only the program shows this item. It can change without notice. |
| Compaction Prompt | Partly. You can add focus text after /. | /, or automatic when the context fills. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Subagent, General Purpose (The model starts subagents) | Not the built-in text. You can write custom agents. | -- stops all subagents. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Subagent, Explore (The model starts subagents) | Not the built-in text. You can write custom agents. | -- stops all subagents. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Subagent, Plan (The model starts subagents) | Not the built-in text. You can write custom agents. | -- stops all subagents. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Subagent, Custom Agent | Yes. You write the agent file. | Add or remove the file. | . or ~/.. | Documented: An official docs page names this item. |
| Subagent, Statusline Setup | Yes. A user agent file with the same name replaces it. | -- stops all subagents. | Built into the program. Override in .. | Undocumented: Only the program shows this item. It can change without notice. |
| Subagent, Claude (FleetView) | Yes. A user agent file with the same name replaces it. | -- stops all subagents. | Built into the program. Override in .. | Undocumented: Only the program shows this item. It can change without notice. |
| Subagent, Web Fetch | Yes. A user agent file with the same name replaces it. | CLAUDE_ adds it. CLAUDE_ removes it. | Built into the program. Override in .. | Undocumented: Only the program shows this item. It can change without notice. |
| Subagent, Claude Code Guide | Yes. A user agent file with the same name replaces it. | Not offered in - or the SDK entry points. -- stops all subagents. | Built into the program. Override in .. | Undocumented: Only the program shows this item. It can change without notice. |
| Override a Built-in Agent with a File | Yes. You write the agent file. | Add or remove the file. | . or ~/.. | Undocumented: Only the program shows this item. It can change without notice. |
| Override a Built-in Agent with --agents | Yes. You give the JSON. | --. | Command-line flag. | Documented: An official docs page names this item. |
| Append to Every Subagent Prompt | Yes. You give the text. | -- or -- (print mode only). | Command-line flags. | Undocumented: Only the program shows this item. It can change without notice. |
| Turn Off the Explore and Plan Agents | Yes. It removes text. | CLAUDE_. | Environment variable. | Undocumented: Only the program shows this item. It can change without notice. |
| Turn Off All Built-in Agents | Yes. It removes text. | CLAUDE_. | Environment variable. | Undocumented: Only the program shows this item. It can change without notice. |
| Command, /init | Yes. A command or skill file with the same name may replace it. | Type /. | Built into the program. | Documented: An official docs page names this item. |
| Command, /security-review | Yes. A command or skill file with the same name may replace it. | Type /. | Built into the program. | Documented: An official docs page names this item. |
| Skill, /simplify | Yes. A command or skill file with the same name may replace it. | Type /. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Skill, /debug | Yes. A command or skill file with the same name may replace it. | Type /. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Override /init with a Command File | Yes. A command or skill file with the same name may replace it. | Type /. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Override /simplify with a Skill File | Yes. A command or skill file with the same name may replace it. | Type /. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Prompt Hook Request | Partly. You write the prompt and pick the model. The system text is fixed. | Add or remove the hook. | hooks in any settings scope. | Documented: An official docs page names this item. |
| Agent Hook Request | Partly. You write the prompt and pick the model. The system text is fixed. | Add or remove the hook. | hooks in any settings scope. | Documented: An official docs page names this item. |
| Auto Mode Classifier | Partly. The auto setting edits the rule lists. | -- or default. | auto in user, flag, or managed settings. | Documented: An official docs page names this item. |
| Auto Mode Classifier, Custom Rules | Yes. You write the rules. | auto setting. | auto in user, flag, or managed settings. | Documented: An official docs page names this item. |
| Compaction Prompt, Custom Instructions | Yes. You add focus text. The base summary rules stay. | /. | The command line, CLAUDE., or a Pre hook. | Documented: An official docs page names this item. |
| Plan Mode, Custom Workflow | Yes. You give the workflow text. The read-only rules and the Exit rule stay. | --. | Command-line flag. | Undocumented: Only the program shows this item. It can change without notice. |
| Git Instructions Turned Off | Yes. It removes text. | include or CLAUDE_. | Any settings scope, or an environment variable. | Documented: An official docs page names this item. |
| Auto Memory Turned Off | Yes. It removes text. | CLAUDE_ or auto. | Environment variable or any settings scope. | Documented: An official docs page names this item. |
| Custom Output Style with a Built-in Name | Yes. You write the file. | / or the output setting. | ~/. or .. | Undocumented: Only the program shows this item. It can change without notice. |
| Subagent with --system-prompt and --append-system-prompt | Not for the subagent. Use --. | The flags. | Command-line flags. | Undocumented: Only the program shows this item. It can change without notice. |
| Prompt Hook on Stop | Partly. You write the prompt and pick the model. The system text is fixed. | Add or remove the hook. | hooks in any settings scope. | Documented: An official docs page names this item. |
| All Tools Sent Upfront | Yes. It adds the deferred tools to the request. | ENABLE_. | Environment variable, or env in any settings scope. | Documented: An official docs page names this item. |
| Override a Prompt | Yes. The page lists each prompt you can replace, append to, or turn off. | Per prompt. See the page. | Flags, env vars, settings, and files. | Undocumented: Only the program shows this item. It can change without notice. |
| Tool Descriptions (Every request carries them) | Yes. A Mod API tool. hook replaces a description. | ENABLE_, --, --. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
| Built-In Skills (The main agent reads one line for each) | Yes. A skill or command with the same name replaces one. | --. | Built into the program. Override in .. | Documented: An official docs page names this item. |
| Built-In Agents (The main agent reads one line for each) | Yes. An agent with the same name replaces one. | CLAUDE_, CLAUDE_. | Built into the program. Override in .. | Documented: An official docs page names this item. |
| Tools per Variant (Every request carries the list) | Yes. Use --, --, --, or settings. | -- and CLAUDE_ cut the list to three tools. | Built into the program. | Undocumented: Only the program shows this item. It can change without notice. |
How the Captures Were Made
Every prompt on these pages was captured offline, with no model call and no cost.
- A script starts the installed program (version 2.1.312) in print mode (
-p) once per variant. - The program talks to a small fake Messages API on
127.0.0.1. The fake server writes each request body to a file and sends back a canned reply. - The run uses a fake API key, a dead proxy (
HTTPS_PROXYandHTTP_PROXYpoint to a closed port),CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1,DISABLE_TELEMETRY=1, and a temporary home, config folder, and project folder. No login token is used. The script checks that every request went to the local server. - A second script reads the saved request bodies, replaces machine-specific values with placeholders, and writes these pages. It makes the diffs with
diff -u, not by hand.
For the subagent pages, the fake server answers the first turn with an Agent tool call. The program then starts a real subagent and sends its request to the fake server.
For the compaction page, the script runs twice in the same folders: once with Reply with 'OK'., then with --continue and /compact.
The Three System Blocks
Each request has a system field with three blocks, then messages. This is what the captures show.
| Block | What it holds | Cache marker |
|---|---|---|
system[0] | A billing header line with the program version and entry point (cc_ in - mode). | None |
system[1] | The identity line. | ephemeral |
system[2] | The body: the rules, the memory section, and your appended text. | ephemeral |
Not everything that the model reads as instructions is in system. Claude Code also sends the following in the messages list, before your own text:
- A reminder with the git attribution lines (first user message).
- Project memory files, git status, and (with
--exclude-dynamic-system-prompt-sections) the memory section. - A message with the role
system. It holds the environment details, the output style text, the agent types, the skills list, and the date.
Every variant page shows all of these parts, in the order they are sent, with a === line before each part.
Identity Line
In -p mode the identity line is the SDK line: You are a Claude agent, built on Anthropic's Claude Agent SDK. Every capture here uses -p, so every page shows that line, except pages where it changes (see below).
The program has three identity lines. Two more appear in its text:
You are Claude Code, Anthropic's official CLI for Claude.This is the line for the interactive terminal app. It could not be captured offline: the full-screen app did not accept typed input in the test harness, so no request was sent. SettingCLAUDE_CODE_ENTRYPOINT=cliin-pmode does not change the line.You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK.Print mode sends this one when you use--append-system-prompt. See Append System Prompt.
How Claude Code Picks the Variant
The chart shows what the captures prove. The order of the first three checks was not tested with every combination of flags.
Subagents skip this chart. They get their own body and notes (see Subagent, general-purpose).
Captures disagree with the old wiki in one place: the wiki says models with sonnet or haiku in the name get the full prompt. In 2.1.312 they get the lean prompt, and only CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 gives the full one.
All Variants
Size is the number of characters in everything shown on the variant page, after placeholders are in place. The last column lists the # headings found in the system body.
| Variant | How to select it | Characters | Tools | Sections |
|---|---|---|---|---|
| Default, Lean Prompt | Default on Opus 5.5 | 15,721 | 12 | Harness, Session-, Memory, Environment, Context management |
| Default, Sonnet 5.5 | Default on Sonnet 5.5 | 15,727 | 12 | Harness, Session-, Memory, Environment, Context management |
| Default, Haiku 5.5 | Default on Haiku 5.5 | 18,516 | 12 | Harness, Session-, Memory, Environment, Context management |
| Full Prompt | CLAUDE_ | 37,105 | 12 | System, Doing tasks, Executing actions with care, Using your tools, Tone and style, Text output (does not apply to tool calls), Session-, auto memory, Environment, Context management |
| Simple Prompt Switch on Sonnet (same text as default-sonnet) | CLAUDE_ on Sonnet | 15,727 | 12 | Harness, Session-, Memory, Environment, Context management |
| Simple Prompt Switch on Haiku (same text as default-haiku) | CLAUDE_ on Haiku | 18,516 | 12 | Harness, Session-, Memory, Environment, Context management |
| Simple Prompt Switch on Opus (same text as default-lean) | CLAUDE_ on Opus | 15,721 | 12 | Harness, Session-, Memory, Environment, Context management |
| Bare Mode | -- | 376 | 3 | none |
| Simple Mode Env Var (same text as bare) | CLAUDE_ | 376 | 3 | none |
| Exclude Dynamic Sections | -- | 15,616 | 12 | Harness, Environment, Context management |
| Exclude Dynamic Sections, Full Prompt | -- plus the full prompt | 37,115 | 12 | System, Doing tasks, Executing actions with care, Using your tools, Tone and style, auto memory, Text output (does not apply to tool calls), Session-, Environment, Context management |
| Output Style, Explanatory | Output style Explanatory | 16,908 | 12 | Harness, Session-, Memory, Environment, Context management |
| Output Style, Learning | Output style Learning | 20,767 | 12 | Harness, Session-, Memory, Environment, Context management |
| Output Style, Proactive | Output style Proactive | 17,227 | 12 | Harness, Session-, Memory, Environment, Context management |
| Output Style, Concise | Output style Concise | 17,261 | 12 | Harness, Session-, Memory, Environment, Context management |
| Custom Output Style | Custom style file | 15,939 | 12 | Harness, Session-, Memory, Environment, Context management |
| Custom Output Style on the Full Prompt | Custom style, full prompt | 34,002 | 12 | System, Executing actions with care, Using your tools, Tone and style, Text output (does not apply to tool calls), Session-, auto memory, Environment, Context management |
| Custom Output Style with Keep Coding Instructions | Custom style with keep- | 37,323 | 12 | System, Doing tasks, Executing actions with care, Using your tools, Tone and style, Text output (does not apply to tool calls), Session-, auto memory, Environment, Context management |
| Custom Output Style with Keep Coding Instructions, Lean Prompt (same text as style-custom) | Custom style with keep-, lean | 15,939 | 12 | Harness, Session-, Memory, Environment, Context management |
| Append System Prompt | -- | 15,778 | 12 | Harness, Session-, Memory, Environment, Context management |
| Replace System Prompt | -- | 10,120 | 12 | none |
| Replace and Append Together | -- plus -- | 10,177 | 12 | none |
| With a CLAUDE.md File | A CLAUDE. file | 16,110 | 12 | Harness, Session-, Memory, Environment, Context management |
| Inside a Git Repository | A git repository | 16,337 | 12 | Harness, Session-, Memory, Environment, Context management |
| Main Thread Custom Agent | -- | 10,222 | 12 | none |
| Permission Mode, Plan | -- | 20,600 | 12 | Harness, Session-, Memory, Environment, Context management |
| Permission Mode, Accept Edits (same text as default-lean) | -- | 15,721 | 12 | Harness, Session-, Memory, Environment, Context management |
| Permission Mode, Don't Ask (same text as default-lean) | -- | 15,721 | 12 | Harness, Session-, Memory, Environment, Context management |
| Brief Mode (same text as default-lean) | -- | 15,721 | 12 | Harness, Session-, Memory, Environment, Context management |
| Compaction Prompt | / | 22,575 | 12 | Harness, Session-, Memory, Environment, Context management |
| Subagent, General Purpose | Agent tool, general- | 11,135 | 8 | none |
| Subagent, Explore | Agent tool, Explore | 11,665 | 5 | none |
| Subagent, Plan | Agent tool, Plan | 11,972 | 5 | none |
| Subagent, Custom Agent | Custom agent file | 9,759 | 8 | none |
| Subagent, Statusline Setup | Agent tool, statusline- | 15,535 | 2 | none |
| Subagent, Claude (FleetView) | Agent tool, claude | 11,534 | 8 | none |
| Subagent, Web Fetch | CLAUDE_, Agent tool, web- | 5,525 | 1 | none |
| Subagent, Claude Code Guide | Interactive session, Agent tool, claude- | 29,062 | 4 | none |
| Override a Built-in Agent with a File | Agent file with a built-in name | 9,772 | 8 | none |
| Override a Built-in Agent with --agents | -- with a built-in name | 9,753 | 8 | none |
| Append to Every Subagent Prompt | -- | 11,693 | 5 | none |
| Turn Off the Explore and Plan Agents | CLAUDE_ | 14,816 | 12 | Harness, Session-, Memory, Environment, Context management |
| Turn Off All Built-in Agents | CLAUDE_ | 14,083 | 12 | Harness, Session-, Memory, Environment, Context management |
| Command, /init | / | 17,366 | 12 | Harness, Session-, Memory, Environment, Context management |
| Command, /security-review | / | 16,246 | 12 | Harness, Session-, Memory, Environment, Context management |
| Skill, /simplify | / | 18,598 | 12 | Harness, Session-, Memory, Environment, Context management |
| Skill, /debug | / | 17,368 | 12 | Harness, Session-, Memory, Environment, Context management |
| Override /init with a Command File | / | 15,830 | 12 | Harness, Session-, Memory, Environment, Context management |
| Override /simplify with a Skill File | / | 15,783 | 12 | Harness, Session-, Memory, Environment, Context management |
| Prompt Hook Request | Hook type: | 1,478 | 0 | none |
| Agent Hook Request | Hook type: | 2,362 | 10 | none |
| Auto Mode Classifier | -- | 140,718 | 0 | none |
| Auto Mode Classifier, Custom Rules | auto setting | 76,028 | 0 | none |
| Compaction Prompt, Custom Instructions | /, CLAUDE.md, or Pre hook | 23,085 | 12 | Harness, Session-, Memory, Environment, Context management |
| Plan Mode, Custom Workflow | -- | 17,217 | 12 | Harness, Session-, Memory, Environment, Context management |
| Git Instructions Turned Off | include | 15,083 | 12 | Harness, Session-, Memory, Environment, Context management |
| Auto Memory Turned Off | CLAUDE_ | 13,658 | 12 | Harness, Session-, Environment, Context management |
| Custom Output Style with a Built-in Name | Style file with a built-in name | 15,936 | 12 | Harness, Session-, Memory, Environment, Context management |
| Subagent with --system-prompt and --append-system-prompt | Prompt flags plus a subagent | 11,697 | 5 | none |
| Prompt Hook on Stop | Hook type: on Stop | 12,622 | 0 | none |
| All Tools Sent Upfront | ENABLE_ | 15,352 | 21 | Harness, Session-, Memory, Environment, Context management |
See also Tools per Variant.
Placeholders
| Placeholder | Replaces |
|---|---|
<cwd> | The project folder (a temporary folder in each run). |
<config- | The Claude config folder (CLAUDE_, a temporary folder). |
<home> | The home folder (a temporary folder). |
<project- | The project folder name as used inside the config folder, with / and . turned into -. |
<config- | The same kind of name for the config folder. |
<date> | Any date such as the day of the run. |
<platform>, <shell>, <os- | Your operating system, shell, and OS version. |
<build> | The build suffix of cc_ in the billing header. |
<sha> | A git commit hash. |
<uuid-, <uuid-, ... | A random id, such as a session id, numbered by first use in each capture. The same number is the same id. |
<robot- | A robot emoji in the pull request line of the attribution reminder. The site shows no emojis. |
<plan- | The random plan file name in plan mode. |
Strings such as PROBE-CUSTOM-STYLE-TEXT and APPENDED-TEXT-FROM-FLAG are test text that the script supplies, so you can see where your own text lands.
How to Regenerate
Run these from the repository root. Both steps use bun only.
bun tools/capture-prompts/capture.ts # capture every variant, then write the pages
bun tools/capture-prompts/capture.ts --only default-lean,bare # capture some variants
bun tools/capture-prompts/render.ts # rebuild the pages from saved captures
Raw requests go to captures/<version>/prompts/ (not committed). Normalized text goes to tools/capture-prompts/out/. The variant list is in tools/capture-prompts/variants.ts. For a new release, update src/version.ts (or pass --bin and --out) and run it again.