[DOCS] CLI docs missing `--exclude-dynamic-system-prompt-sections` for print mode

Resolved 💬 2 comments Opened Apr 9, 2026 by coygeek Closed Apr 11, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/cli-reference

Section/Topic

The print-mode CLI flag --exclude-dynamic-system-prompt-sections and how it affects prompt composition/caching.

Current Documentation

The CLI reference lists many print-mode flags such as:

--include-partial-messages — Include partial streaming events in output. Requires --print and --output-format stream-json

The headless/bare-mode docs currently say:

System prompt additions | --append-system-prompt, --append-system-prompt-file

There is no entry for --exclude-dynamic-system-prompt-sections in either page.

What's Wrong or Missing?

Claude Code v2.1.98 added --exclude-dynamic-system-prompt-sections for print mode, but users cannot discover it from the CLI docs.

That leaves three gaps:

A. Missing flag reference

The flag is absent from the canonical CLI flag table.

B. Missing scope/limitations

The docs do not say that this is a print-mode feature.

C. Missing behavior explanation

The release notes say it improves cross-user prompt caching, but the docs do not explain which dynamic sections are excluded or when someone should use the flag.

Suggested Improvement

Add a cli-reference row such as:

--exclude-dynamic-system-prompt-sections — Exclude dynamic sections from the generated system prompt in print mode to improve cache reuse across users/environments.

Also add a short note in headless describing:

  • that the flag applies only to print mode
  • what kinds of dynamic prompt content are removed
  • the tradeoff between better prompt-cache reuse and reduced built-in contextualization

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/cli-reference | 58-76 | Print-mode flags are documented here, but this new flag is missing |
| https://code.claude.com/docs/en/headless | 51-55 | Headless docs cover system-prompt additions for -p, but not the new exclusion flag |

Total scope: 2 pages affected

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗