claude-code - 💡(How to fix) Fix [DOCS] Prompt caching docs omit the startup warning shown when `DISABLE_PROMPT_CACHING*` disables caching [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48090Fetched 2026-04-15 06:33:31
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3
RAW_BUFFERClick to expand / collapse

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/env-vars

Section/Topic

The DISABLE_PROMPT_CACHING* environment variable entries and the prompt-caching configuration guidance that explains what users should expect at startup when those variables disable caching

Current Documentation

The environment variable reference currently says:

DISABLE_PROMPT_CACHING | Set to 1 to disable prompt caching for all models (takes precedence over per-model settings)

DISABLE_PROMPT_CACHING_HAIKU | Set to 1 to disable prompt caching for Haiku models

DISABLE_PROMPT_CACHING_OPUS | Set to 1 to disable prompt caching for Opus models

DISABLE_PROMPT_CACHING_SONNET | Set to 1 to disable prompt caching for Sonnet models

The model configuration page currently says:

Claude Code automatically uses prompt caching to optimize performance and reduce costs. You can disable prompt caching globally or for specific model tiers:

DISABLE_PROMPT_CACHING | Set to 1 to disable prompt caching for all models (takes precedence over per-model settings)

The provider setup pages also tell users they can turn caching off:

Optional: Disable prompt caching if needed

export DISABLE_PROMPT_CACHING=1

I could not find any code.claude.com page that documents the startup warning Claude Code now shows when prompt caching has been disabled through these environment variables.

What's Wrong or Missing?

Changelog v2.1.108 says:

Added a warning at startup when prompt caching is disabled via DISABLE_PROMPT_CACHING* environment variables

The docs currently explain how to disable prompt caching, but they do not explain the new user-visible consequence: Claude Code now surfaces a startup warning when any of the DISABLE_PROMPT_CACHING* variables disables caching.

That leaves the documentation incomplete in two practical ways:

A. The startup warning is undocumented

Users who intentionally disable prompt caching for debugging, cost testing, or provider-specific behavior are not told that a warning at launch is now expected behavior.

B. The trigger conditions are undocumented

The docs do not explain that this warning can be triggered by the whole DISABLE_PROMPT_CACHING* family, not just the global DISABLE_PROMPT_CACHING variable.

Suggested Improvement

Update the prompt-caching documentation anywhere DISABLE_PROMPT_CACHING* is introduced so it also documents the startup warning behavior added in v2.1.108.

Suggested minimum fix:

  • In env-vars, add a short note near the DISABLE_PROMPT_CACHING* entries explaining that Claude Code shows a startup warning when these variables disable prompt caching
  • In model-config, add the same caveat in the prompt-caching configuration section
  • In provider setup pages that show export DISABLE_PROMPT_CACHING=1, add a brief note that a startup warning is expected after launch when caching is disabled this way

Suggested wording:

When prompt caching is disabled via DISABLE_PROMPT_CACHING or one of the model-specific DISABLE_PROMPT_CACHING_* variables, Claude Code shows a startup warning so you know caching-related cost and latency optimizations are off.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageContext
https://code.claude.com/docs/en/env-varsPrimary reference for DISABLE_PROMPT_CACHING*, but it does not mention the startup warning
https://code.claude.com/docs/en/model-configPrompt caching configuration section lists disable controls without the new startup-warning behavior
https://code.claude.com/docs/en/amazon-bedrockBedrock setup example tells users to export DISABLE_PROMPT_CACHING=1 without explaining the expected warning
https://code.claude.com/docs/en/google-vertex-aiVertex setup includes the same disable guidance without the warning behavior

Total scope: 4 pages affected

Source: Changelog v2.1.108

Exact changelog entry:

Added a warning at startup when prompt caching is disabled via DISABLE_PROMPT_CACHING* environment variables

extent analysis

TL;DR

Update the documentation for DISABLE_PROMPT_CACHING* environment variables to include information about the startup warning that appears when prompt caching is disabled.

Guidance

  • Review the affected pages (env-vars, model-config, amazon-bedrock, google-vertex-ai) and add a note explaining that disabling prompt caching via DISABLE_PROMPT_CACHING* variables triggers a startup warning.
  • Use the suggested wording: "When prompt caching is disabled via DISABLE_PROMPT_CACHING or one of the model-specific DISABLE_PROMPT_CACHING_* variables, Claude Code shows a startup warning so you know caching-related cost and latency optimizations are off."
  • Verify that the updated documentation accurately reflects the behavior added in v2.1.108.
  • Consider adding a brief explanation of the purpose of the startup warning to help users understand its significance.

Example

No code snippet is necessary for this issue, as it is a documentation update.

Notes

The suggested fix only addresses the documentation gap and does not modify the underlying behavior of the DISABLE_PROMPT_CACHING* variables.

Recommendation

Apply the suggested documentation updates to ensure that users are aware of the startup warning behavior when disabling prompt caching.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [DOCS] Prompt caching docs omit the startup warning shown when `DISABLE_PROMPT_CACHING*` disables caching [1 participants]