Skip to content
BENIBIX Learn

--exclude-dynamic-system-prompt-sections

Also known as claude --exclude-dynamic-system-prompt-sections, Exclude dynamic system prompt sections flag

It makes the prompt the same for each user.

Think of it like

It is like each book has the same cover. The names are written inside.

Example

Jack runs the same check for fifty people on fifty machines. With this flag, the prompt matches on all of them, so most of it is read from the cache.

Why it matters

Cached prompt text is cheaper and faster, and here many runs can share it.

Definition

--exclude-dynamic-system-prompt-sections moves the parts of the system prompt that change per person into the first user message. Where auto memory lives is one such part. Then the rest of the prompt is the same for each person and machine. So the prompt cache can be shared by all of them. It only works with the default prompt, and is meant for -p.

Example code

bash
claude -p --exclude-dynamic-system-prompt-sections "Check the build"
Keep the prompt the same across machines.

Common mistake

Adding it with --system-prompt. It only works on the default prompt and is ignored then.

Key takeaways

  1. 1
    Per-user parts. Move to the first message.
  2. 2
    Same prompt. Shared cache.
  3. 3
    Default prompt only. With -p.

Learn it properly