Claude Code’s system prompt is built from ~15 contributing modules — base instructions, skills, tool listings, environment hints, MCP-discovered tools, etc. Different teams own different parts. The prompt as a whole has to be split into a static prefix (org-stable, cacheable across all users) and a dynamic suffix (session-unique).
The split is implemented as a literal string sentinel: '__SYSTEM_PROMPT_DYNAMIC_BOUNDARY__'. Anywhere in the prompt-building pipeline, find that sentinel, place a cache_control breakpoint, and continue. Concatenation is the only requirement.
Why a string and not a typed marker
A marker object would require every contributor to use a typed builder. The reality is some sections are produced by Markdown skills that get inlined as strings; some are stitched in from MCP responses. A string survives every transform — .toString(), JSON serialize, template literal, network round-trip — all preserve it.
What this enables
- Cross-organization cache reuse. Everything before the sentinel is reusable across users — Anthropic dedups it.
- Refactor safety. A new section can be added anywhere, by anyone, without the boundary moving unintentionally.
- Auditability. You can grep for the sentinel and immediately see the static/dynamic split point.
When you’d copy this
Any time a system prompt is assembled by multiple authors and you want a single, refactor-resistant cache boundary. The 24-character string costs nothing; the typed alternative requires architectural buy-in.
Sources
-
claude-code/04-agent-loop-and-llm.md:114? unverified -
claude-code/07-prompts-guardrails.md:103? unverified