FORCE_PROMPT_CACHING_5M
Updated by Alex Sorokoletov
FORCE_PROMPT_CACHING_5M is a Claude Code environment variable. Its release history is not tracked here. It is listed in the official reference.
| Status | Present in v2.1.294 |
|---|---|
| Category | Feature toggles |
| Official docs | Listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export FORCE_PROMPT_CACHING_5M=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"FORCE_PROMPT_CACHING_5M": "<value>"
}
}Release notes that mention it
- Claude Code v2.1.114 — Native Binary Launcher, /fewer-permission-prompts, and 20 New Environment Variables
- Claude Code v2.1.108 — 4 New Environment Variables: REPL Variants, Skill Discovery, and the Limits Reckoning
- Claude Code Version Tracker: Undocumented Env Vars, Feature Gates & Models
- claude-code-env-vars-v2-1-245
Related variables
DISABLE_PROMPT_CACHING: Prompt caching globally.ENABLE_PROMPT_CACHING_1HCCR_FORCE_BUNDLECLAUDE_CODE_DISABLE_CFC_PROMPTCLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPTCLAUDE_CODE_ENABLE_PROMPT_SUGGESTION: Enables a prompt suggestion feature in the Claude Code UI.CLAUDE_CODE_FORCE_STRIKETHROUGHCLAUDE_CODE_FORCE_SYNC_OUTPUT: Disable streaming output in favor of synchronous writes.
Frequently asked questions
Which Claude Code version has FORCE_PROMPT_CACHING_5M?
Its release history is not tracked here.
How do I set FORCE_PROMPT_CACHING_5M?
Export it before starting Claude Code (export FORCE_PROMPT_CACHING_5M=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.