Skip to main content

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.

PromptCan You Change It?Turn On or OffWhere It LivesStatus
Default, Lean Prompt (Every session on a lean model gets it)✅ Yes. Use the flags and settings on the other pages.CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 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_CODE_SIMPLE_SYSTEM_PROMPT=0 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_CODE_SIMPLE_SYSTEM_PROMPT=0 switches to the full prompt.Built into the program. Nothing on disk.Undocumented
Full Prompt✅ Yes. Set or unset the env var.CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 (also false, no, off).Environment variable. Put it under env in settings.json to keep it.Documented
Simple Prompt Switch on Sonnet✅ Yes. Set or unset the env var.CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=1.Environment variable.Documented
Simple Prompt Switch on Haiku✅ Yes. Set or unset the env var.CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=1.Environment variable.Documented
Simple Prompt Switch on Opus✅ Yes. Set or unset the env var.CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=1.Environment variable.Documented
Bare Mode❌ No. The two lines are fixed.--bare or CLAUDE_CODE_SIMPLE=1.Command-line flag.Documented
Simple Mode Env Var❌ No. The two lines are fixed.CLAUDE_CODE_SIMPLE=1.Environment variable.Documented
Exclude Dynamic Sections❌ No. It only moves text.--exclude-dynamic-system-prompt-sections.Command-line flag.Documented
Exclude Dynamic Sections, Full Prompt❌ No. It only moves text.--exclude-dynamic-system-prompt-sections.Command-line flag.Documented
Output Style, ExplanatoryNot the built-in text. You can write a custom style./output-style or the outputStyle setting.outputStyle in any settings scope.Documented
Output Style, LearningNot the built-in text. You can write a custom style./output-style or the outputStyle setting.outputStyle in any settings scope.Documented
Output Style, ProactiveNot the built-in text. You can write a custom style./output-style or the outputStyle setting.outputStyle in any settings scope.Documented
Output Style, ConciseNot the built-in text. You can write a custom style./output-style or the outputStyle setting.outputStyle in any settings scope.Documented
Custom Output Style✅ Yes. You write the file./output-style or the outputStyle setting.~/.claude/output-styles/*.md or .claude/output-styles/*.md.Documented
Custom Output Style on the Full Prompt✅ Yes. You write the file./output-style or the outputStyle setting.~/.claude/output-styles/*.md or .claude/output-styles/*.md.Documented
Custom Output Style with Keep Coding Instructions✅ Yes. You write the file.keep-coding-instructions in the style's front matter.~/.claude/output-styles/*.md or .claude/output-styles/*.md.Documented
Custom Output Style with Keep Coding Instructions, Lean Prompt✅ Yes. You write the file.keep-coding-instructions in the style's front matter.~/.claude/output-styles/*.md or .claude/output-styles/*.md.Documented
Append System Prompt✅ Yes. You give the text.--append-system-prompt or --append-system-prompt-file.Command-line flags.Documented
Replace System Prompt✅ Yes. You give the text.--system-prompt or --system-prompt-file.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_CODE_DISABLE_CLAUDE_MDS=1 skips them.CLAUDE.md, .claude/CLAUDE.md, ~/.claude/CLAUDE.md.Documented
Inside a Git Repository (It happens on its own)❌ No.includeGitInstructions 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.--agent or the agent setting..claude/agents/*.md or ~/.claude/agents/*.md.Documented
Permission Mode, Plan❌ No.--permission-mode or defaultMode in settings.Flag or settings.Documented
Permission Mode, Accept Edits❌ No.--permission-mode or defaultMode in settings.Flag or settings.Documented
Permission Mode, Don't Ask❌ No.--permission-mode or defaultMode in settings.Flag or settings.Documented
Brief Mode❌ No.--brief.Command-line flag.Undocumented
Compaction PromptPartly. You can add focus text after /compact./compact, 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.--disallowedTools Agent stops all subagents.Built into the program.Undocumented
Subagent, Explore (The model starts subagents)Not the built-in text. You can write custom agents.--disallowedTools Agent stops all subagents.Built into the program.Undocumented
Subagent, Plan (The model starts subagents)Not the built-in text. You can write custom agents.--disallowedTools Agent stops all subagents.Built into the program.Undocumented
Subagent, Custom Agent✅ Yes. You write the agent file.Add or remove the file..claude/agents/*.md or ~/.claude/agents/*.md.Documented
Tools per Variant (Every request carries the list)✅ Yes. Use --tools, --allowedTools, --disallowedTools, or settings.--bare and CLAUDE_CODE_SIMPLE=1 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.

  1. A script starts the installed program (version 2.1.304) in print mode (-p) once per variant.
  2. 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.
  3. The run uses a fake API key, a dead proxy (HTTPS_PROXY and HTTP_PROXY point 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.
  4. 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.

BlockWhat it holdsCache marker
system[0]A billing header line with the program version and entry point (cc_entrypoint=sdk-cli in -p 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. Setting CLAUDE_CODE_ENTRYPOINT=cli in -p mode 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.

VariantHow to select itCharactersToolsSections
Default, Lean PromptDefault on Opus 5.515,50112Harness, Session-specific guidance, Memory, Environment, Context management
Default, Sonnet 5.5Default on Sonnet 5.515,50712Harness, Session-specific guidance, Memory, Environment, Context management
Default, Haiku 5.5Default on Haiku 5.518,29612Harness, Session-specific guidance, Memory, Environment, Context management
Full PromptCLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=036,88512System, Doing tasks, Executing actions with care, Using your tools, Tone and style, Text output (does not apply to tool calls), Session-specific guidance, auto memory, Environment, Context management
Simple Prompt Switch on Sonnet (same text as default-sonnet)CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=1 on Sonnet15,50712Harness, Session-specific guidance, Memory, Environment, Context management
Simple Prompt Switch on Haiku (same text as default-haiku)CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=1 on Haiku18,29612Harness, Session-specific guidance, Memory, Environment, Context management
Simple Prompt Switch on Opus (same text as default-lean)CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=1 on Opus15,50112Harness, Session-specific guidance, Memory, Environment, Context management
Bare Mode--bare3623none
Simple Mode Env Var (same text as bare)CLAUDE_CODE_SIMPLE=13623none
Exclude Dynamic Sections--exclude-dynamic-system-prompt-sections15,39612Harness, Environment, Context management
Exclude Dynamic Sections, Full Prompt--exclude-dynamic-system-prompt-sections plus the full prompt36,89512System, Doing tasks, Executing actions with care, Using your tools, Tone and style, auto memory, Text output (does not apply to tool calls), Session-specific guidance, Environment, Context management
Output Style, ExplanatoryOutput style Explanatory16,68812Harness, Session-specific guidance, Memory, Environment, Context management
Output Style, LearningOutput style Learning20,54712Harness, Session-specific guidance, Memory, Environment, Context management
Output Style, ProactiveOutput style Proactive17,00712Harness, Session-specific guidance, Memory, Environment, Context management
Output Style, ConciseOutput style Concise17,04112Harness, Session-specific guidance, Memory, Environment, Context management
Custom Output StyleCustom style file15,71912Harness, Session-specific guidance, Memory, Environment, Context management
Custom Output Style on the Full PromptCustom style, full prompt33,78212System, Executing actions with care, Using your tools, Tone and style, Text output (does not apply to tool calls), Session-specific guidance, auto memory, Environment, Context management
Custom Output Style with Keep Coding InstructionsCustom style with keep-coding-instructions37,10312System, Doing tasks, Executing actions with care, Using your tools, Tone and style, Text output (does not apply to tool calls), Session-specific guidance, auto memory, Environment, Context management
Custom Output Style with Keep Coding Instructions, Lean Prompt (same text as style-custom)Custom style with keep-coding-instructions, lean15,71912Harness, Session-specific guidance, Memory, Environment, Context management
Append System Prompt--append-system-prompt15,55812Harness, Session-specific guidance, Memory, Environment, Context management
Replace System Prompt--system-prompt9,90012none
Replace and Append Together--system-prompt plus --append-system-prompt9,95712none
With a CLAUDE.md FileA CLAUDE.md file15,89012Harness, Session-specific guidance, Memory, Environment, Context management
Inside a Git RepositoryA git repository16,11712Harness, Session-specific guidance, Memory, Environment, Context management
Main Thread Custom Agent--agent <name>10,00212none
Permission Mode, Plan--permission-mode plan20,38012Harness, Session-specific guidance, Memory, Environment, Context management
Permission Mode, Accept Edits (same text as default-lean)--permission-mode acceptEdits15,50112Harness, Session-specific guidance, Memory, Environment, Context management
Permission Mode, Don't Ask (same text as default-lean)--permission-mode dontAsk15,50112Harness, Session-specific guidance, Memory, Environment, Context management
Brief Mode (same text as default-lean)--brief15,50112Harness, Session-specific guidance, Memory, Environment, Context management
Compaction Prompt/compact21,96912Harness, Session-specific guidance, Memory, Environment, Context management
Subagent, General PurposeAgent tool, general-purpose10,9198none
Subagent, ExploreAgent tool, Explore11,4495none
Subagent, PlanAgent tool, Plan11,7565none
Subagent, Custom AgentCustom agent file9,5438none

See also Tools per Variant.

Placeholders​

PlaceholderReplaces
<cwd>The project folder (a temporary folder in each run).
<config-dir>The Claude config folder (CLAUDE_CONFIG_DIR, a temporary folder).
<home>The home folder (a temporary folder).
<project-slug>The project folder name as used inside the config folder, with / and . turned into -.
<config-slug>The same kind of name for the config folder.
<date>Any date such as the day of the run.
<platform>, <shell>, <os-version>Your operating system, shell, and OS version.
<build>The build suffix of cc_version in the billing header.
<sha>A git commit hash.
<robot-emoji>A robot emoji in the pull request line of the attribution reminder. The site shows no emojis.
<plan-name>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.