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: Documented means an official docs page names the switch. Undocumented means only the program shows it. Differs means the docs and the program disagree. Gated means a flag or a server gate is needed.
At a Glance
You can use every prompt here: the answer to "Can you use it?" is ✅ Yes for all of them. Where a page adds a condition, it is in parentheses after the name.
| 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 |
| 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 |
| 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 |
| 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 |
| Simple Prompt Switch on Sonnet | ✅ Yes. Set or unset the env var. | CLAUDE_. | Environment variable. | Documented |
| Simple Prompt Switch on Haiku | ✅ Yes. Set or unset the env var. | CLAUDE_. | Environment variable. | Documented |
| Simple Prompt Switch on Opus | ✅ Yes. Set or unset the env var. | CLAUDE_. | Environment variable. | Documented |
| Bare Mode | ❌ No. The two lines are fixed. | -- or CLAUDE_. | Command-line flag. | Documented |
| Simple Mode Env Var | ❌ No. The two lines are fixed. | CLAUDE_. | Environment variable. | Documented |
| Exclude Dynamic Sections | ❌ No. It only moves text. | --. | Command-line flag. | Documented |
| Exclude Dynamic Sections, Full Prompt | ❌ No. It only moves text. | --. | Command-line flag. | Documented |
| Output Style, Explanatory | Not the built-in text. You can write a custom style. | / or the output setting. | output in any settings scope. | Documented |
| Output Style, Learning | Not the built-in text. You can write a custom style. | / or the output setting. | output in any settings scope. | Documented |
| Output Style, Proactive | Not the built-in text. You can write a custom style. | / or the output setting. | output in any settings scope. | Documented |
| Output Style, Concise | Not the built-in text. You can write a custom style. | / or the output setting. | output in any settings scope. | Documented |
| Custom Output Style | ✅ Yes. You write the file. | / or the output setting. | ~/. or .. | Documented |
| Custom Output Style on the Full Prompt | ✅ Yes. You write the file. | / or the output setting. | ~/. or .. | Documented |
| Custom Output Style with Keep Coding Instructions | ✅ Yes. You write the file. | keep- in the style's front matter. | ~/. or .. | Documented |
| Custom Output Style with Keep Coding Instructions, Lean Prompt | ✅ Yes. You write the file. | keep- in the style's front matter. | ~/. or .. | Documented |
| Append System Prompt | ✅ Yes. You give the text. | -- or --. | Command-line flags. | Documented |
| Replace System Prompt | ✅ Yes. You give the text. | -- or --. | Command-line flags. | Documented |
| Replace and Append Together | ✅ Yes. You give the text. | The two flags. | Command-line flags. | Documented |
| With a CLAUDE.md File | ✅ Yes. You write the file. | Add or remove the file. CLAUDE_ skips them. | CLAUDE., ., ~/.. | Documented |
| 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 |
| Main Thread Custom Agent | ✅ Yes. You write the agent file. | -- or the agent setting. | . or ~/.. | Documented |
| Permission Mode, Plan | ❌ No. | -- or default in settings. | Flag or settings. | Documented |
| Permission Mode, Accept Edits | ❌ No. | -- or default in settings. | Flag or settings. | Documented |
| Permission Mode, Don't Ask | ❌ No. | -- or default in settings. | Flag or settings. | Documented |
| Brief Mode | ❌ No. | --. | Command-line flag. | Undocumented |
| Compaction Prompt | Partly. You can add focus text after /. | /, or automatic when the context fills. | Built into the program. | Undocumented |
| 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 |
| Subagent, Explore (The model starts subagents) | Not the built-in text. You can write custom agents. | -- stops all subagents. | Built into the program. | Undocumented |
| Subagent, Plan (The model starts subagents) | Not the built-in text. You can write custom agents. | -- stops all subagents. | Built into the program. | Undocumented |
| Subagent, Custom Agent | ✅ Yes. You write the agent file. | Add or remove the file. | . or ~/.. | Documented |
| 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 |
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.304) 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 hi, 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.304 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,501 | 12 | Harness, Session-, Memory, Environment, Context management |
| Default, Sonnet 5.5 | Default on Sonnet 5.5 | 15,507 | 12 | Harness, Session-, Memory, Environment, Context management |
| Default, Haiku 5.5 | Default on Haiku 5.5 | 18,296 | 12 | Harness, Session-, Memory, Environment, Context management |
| Full Prompt | CLAUDE_ | 36,885 | 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,507 | 12 | Harness, Session-, Memory, Environment, Context management |
| Simple Prompt Switch on Haiku (same text as default-haiku) | CLAUDE_ on Haiku | 18,296 | 12 | Harness, Session-, Memory, Environment, Context management |
| Simple Prompt Switch on Opus (same text as default-lean) | CLAUDE_ on Opus | 15,501 | 12 | Harness, Session-, Memory, Environment, Context management |
| Bare Mode | -- | 362 | 3 | none |
| Simple Mode Env Var (same text as bare) | CLAUDE_ | 362 | 3 | none |
| Exclude Dynamic Sections | -- | 15,396 | 12 | Harness, Environment, Context management |
| Exclude Dynamic Sections, Full Prompt | -- plus the full prompt | 36,895 | 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,688 | 12 | Harness, Session-, Memory, Environment, Context management |
| Output Style, Learning | Output style Learning | 20,547 | 12 | Harness, Session-, Memory, Environment, Context management |
| Output Style, Proactive | Output style Proactive | 17,007 | 12 | Harness, Session-, Memory, Environment, Context management |
| Output Style, Concise | Output style Concise | 17,041 | 12 | Harness, Session-, Memory, Environment, Context management |
| Custom Output Style | Custom style file | 15,719 | 12 | Harness, Session-, Memory, Environment, Context management |
| Custom Output Style on the Full Prompt | Custom style, full prompt | 33,782 | 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,103 | 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,719 | 12 | Harness, Session-, Memory, Environment, Context management |
| Append System Prompt | -- | 15,558 | 12 | Harness, Session-, Memory, Environment, Context management |
| Replace System Prompt | -- | 9,900 | 12 | none |
| Replace and Append Together | -- plus -- | 9,957 | 12 | none |
| With a CLAUDE.md File | A CLAUDE. file | 15,890 | 12 | Harness, Session-, Memory, Environment, Context management |
| Inside a Git Repository | A git repository | 16,117 | 12 | Harness, Session-, Memory, Environment, Context management |
| Main Thread Custom Agent | -- | 10,002 | 12 | none |
| Permission Mode, Plan | -- | 20,380 | 12 | Harness, Session-, Memory, Environment, Context management |
| Permission Mode, Accept Edits (same text as default-lean) | -- | 15,501 | 12 | Harness, Session-, Memory, Environment, Context management |
| Permission Mode, Don't Ask (same text as default-lean) | -- | 15,501 | 12 | Harness, Session-, Memory, Environment, Context management |
| Brief Mode (same text as default-lean) | -- | 15,501 | 12 | Harness, Session-, Memory, Environment, Context management |
| Compaction Prompt | / | 21,969 | 12 | Harness, Session-, Memory, Environment, Context management |
| Subagent, General Purpose | Agent tool, general- | 10,919 | 8 | none |
| Subagent, Explore | Agent tool, Explore | 11,449 | 5 | none |
| Subagent, Plan | Agent tool, Plan | 11,756 | 5 | none |
| Subagent, Custom Agent | Custom agent file | 9,543 | 8 | none |
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. |
<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/ (not committed). Normalized text goes to tools/capture-prompts/out/. The variant list is in tools/capture-prompts/variants.ts. For a new release, change the binary path in capture.ts and run it again.