CLAUDE_CODE_SKIP_PROMPT_HISTORY
Updated by Alex Sorokoletov
CLAUDE_CODE_SKIP_PROMPT_HISTORY is a Claude Code environment variable: Disable prompt history saving. Present since v2.1.69 or earlier and still present in v2.1.294. It is listed in the official reference.
| Status | Present in v2.1.294 |
|---|---|
| Added | Present since v2.1.69 or earlier |
| Category | Feature toggles |
| Official docs | Listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_SKIP_PROMPT_HISTORY=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_SKIP_PROMPT_HISTORY": "<value>"
}
}Release notes that mention it
Related variables
CLAUDE_CODE_DISABLE_CFC_PROMPTCLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPTCLAUDE_CODE_ENABLE_PROMPT_SUGGESTION: Enables a prompt suggestion feature in the Claude Code UI.DISABLE_PROMPT_CACHING: Prompt caching globally.ENABLE_PROMPT_CACHING_1HFORCE_PROMPT_CACHING_5MCLAUDE_CODE_CCR_SKIP_FRESH_MIGRATIONSCLAUDE_CODE_SKIP_HFI_VERSION_CHECK
Frequently asked questions
What does CLAUDE_CODE_SKIP_PROMPT_HISTORY do?
Disable prompt history saving
Which Claude Code version has CLAUDE_CODE_SKIP_PROMPT_HISTORY?
Present since v2.1.69 or earlier and still present in v2.1.294.
How do I set CLAUDE_CODE_SKIP_PROMPT_HISTORY?
Export it before starting Claude Code (export CLAUDE_CODE_SKIP_PROMPT_HISTORY=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.