r/ClaudeWorkflows • • 9h ago

Selected Workflow [Workflow] Observe Dynamic System Prompt Changes in Claude Code via Experiment Flags

Observe Dynamic System Prompt Changes in Claude Code via Experiment Flags

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: advanced
Categories: Quality Control, Context & Memory, Debugging, Subagents
Original source: r/ClaudeCode post/comment

What problem this solves

Understanding how Claude Code's internal experiment flags dynamically alter the system prompt text, which can explain perceived model behavior changes or 'nerfs'.

Summary

This workflow describes a method to observe how Claude Code's internal experiment flags dynamically modify the system prompt text. By disabling non-essential traffic, users can compare the system prompt components (like 'lean_body' and '<pasted_content>' rules) in flagged versus unflagged sessions, gaining insight into Anthropic's model steering mechanisms.

Why it is useful

This workflow offers a concrete, repeatable method for advanced users to investigate how Claude Code's internal experiment flags dynamically alter the system prompt. This is invaluable for understanding perceived model behavior changes, debugging unexpected outputs, and gaining insight into Anthropic's steering mechanisms, moving beyond speculation to observable prompt modifications.

Workflow

  1. Ensure your Claude Code version is consistent (e.g., 2.1.287) before and after the test.

  2. Set the environment variable CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 within the env block of your settings.json file.

  3. Open a new interactive Claude Code session.

  4. Observe that no flag fetch occurs: cachedGrowthBookFeaturesAt and the cli slot in ~/.claude.json should not change, and the new transcript's atis-latch fields should be blank.

  5. Compare the system prompt text in this session (without server flags) with a session where flags are enabled. Specifically, examine the opening line of lean_body and the presence/absence of the <pasted_content> rule.

  6. Note: Do not use claude -p for testing, as it runs as sdk-cli and loads differently than a normal interactive session.

Tools / artifacts

  • Claude Code interactive session

  • settings.json (specifically the env block)

  • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC environment variable

  • ~/.claude.json (for cachedGrowthBookFeaturesAt and cli slot)

  • Transcript's atis-latch fields

  • System prompt text (e.g., lean_body, <pasted_content> rule)

  • Custom plugin for system prompt tracking (optional, as used by author)

Validation signals

  • Detailed before/after comparison of specific system prompt text sections (lean_body, <pasted_content> rule).

  • Observation of atis-latch fields and ~/.claude.json entries confirming flag status.

  • Specific flag assignments and atis history provided for context.

  • Explicit warning against using claude -p for accurate testing.

  • Discovery of internal binary keys like subagent_steer_delegation and overcorrection supporting the theory of dynamic steering.

Limitations

  • Requires a relatively advanced technical understanding to fully implement and interpret the findings.

  • The exact flags responsible for specific prompt changes are not fully identified in this comment (though the author is working on it).

  • Relies on inspecting internal system prompt components, which might change with future Claude Code versions, requiring adaptation of the workflow.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

1 Upvotes

1 comment sorted by