Skip to main content

Core Settings

These keys control how Claude Code compacts the conversation, remembers things, cleans up old files, and runs shell commands. Most people change only a few of them, such as language or cleanupPeriodDays. The env and sandbox keys are objects that have their own pages elsewhere.

Every key here works today. Boolean keys such as autoMemoryEnabled and autoCompactEnabled switch a feature.

Keys​

Source: Settings Reference for rows marked Documented. For rows marked Undocumented, Source: the program (its bundled settings schema). Where to Set It tells you which files may set the key. See Settings Files and Scopes.

KeyStatusTypeDefaultWhat It DoesWhere to Set It
$schemaDocumentedstring-Point your editor at the published JSON schema for autocomplete and checks. Use https://json.schemastore.org/claude-code-settings.json.Settings files
attributionDocumentedboolean or objectStandard attributionCustomize the attribution Claude Code adds to commits and pull requests. false hides all attribution.Any settings file
autoCompactEnabledDocumentedboolean-Turn automatic compaction off or on.Any settings file
autoCompactWindowDocumentednumber or "auto"-Set how full the context gets before Claude Code compacts. A number from 100000 to 1000000 tokens, or "auto" for the window tuned for the model.Any settings file
autoDreamEnabledUndocumentedboolean-Turn background memory consolidation (auto-dream) on or off. A value here overrides the server-side default.Settings files
autoMemoryDirectoryDocumentedstring~/.claude/projectsStore auto memory in a directory you choose. ~/ expands to your home directory. Claude Code ignores the key in the checked-in project file.Any settings file
autoMemoryEnabledDocumentedboolean-Turn auto memory off or on.Any settings file
autoUpdatesChannelDocumentedenum: latest, stable, rclatestFollow the stable release channel instead of latest.Any settings file
awaySummaryEnabledDocumentedboolean-Turn off the session recap shown when you come back to the terminal. The recap shows after 5 or more minutes away.Any settings file
bashEditDiffEnabledDocumentedbooleanOn when the Bash tool handles file editsRecord the files that changed while a Bash command ran in every permission mode. Outside auto and bypassPermissions modes, only user or managed settings can turn it on.User or managed settings
bashOutputMaxCharsDocumentedinteger30000Set how much of a successful command's output Claude receives inline. Clamped to 4000-128000. Longer output goes to a file and Claude gets a preview.Any settings file
🔒 claudeMdDocumentedstring-Inject organization-wide CLAUDE.md instructions from managed settings. Only managed settings honor it.Managed settings only
claudeMdExcludesDocumentedarray of string-Skip specific CLAUDE.md files when memory loads. Takes glob patterns or absolute paths. Managed files cannot be excluded.Any settings file
cleanupPeriodDaysDocumentedinteger30Choose how many days Claude Code keeps transcripts before deleting them. The minimum is 1. --no-session-persistence turns off transcript writes.Any settings file
defaultShellDocumentedenum: bash, powershellbashChoose whether Bash or PowerShell runs the shell commands you type with the ! prefix.Any settings file
desktopSessionCleanupPeriodDaysDocumentedinteger-Set an age limit in days for Claude Desktop and Cowork transcripts. 0 (the default) means no ceiling. Ignored when org policy sets cleanupPeriodDays.User or managed settings
⛔ disableArtifactDocumentedboolean-Deprecated, so use enableArtifact to turn the Artifact tool off. true still turns the tool off. false is ignored.Any settings file
enableArtifactDocumentedbooleanOn once the feature is availableTurn the Artifact tool on or off. A false in any file turns it off, and no file can turn it back on.Any settings file
envDocumentedobject-Set environment variables for every session and its subprocesses.Any settings file
fileCheckpointingEnabledDocumentedboolean-Turn off or on the file snapshots that /rewind restores.Any settings file
fileSuggestionDocumentedobject-Supply @ file autocomplete from your own command.Any settings file
idleCompactionDocumentedboolean-Stop Claude Code from compacting a long conversation while your terminal session is idle. Setting true does not turn idle compaction on.Any settings file
⛔ includeCoAuthoredByDocumentedbooleantrueDeprecated, so use attribution to hide or change commit and PR attribution.Any settings file
includeGitInstructionsDocumentedbooleantrueRemove the built-in commit and PR instructions from Claude's context.Any settings file
languageDocumentedstring-Have Claude respond in a language other than English.Any settings file
minimumVersionDocumentedstring-Keep auto-updates from installing anything below a version.Any settings file
plansDirectoryDocumentedstring~/.claude/plansChoose where plan mode writes plan files. The path is relative to the project root.Any settings file
precomputeCompactionEnabledUndocumentedboolean-Build the compaction summary in the background before it is needed. Applies only when auto-compact is on.Settings files
respectGitignoreDocumentedbooleantrueKeep gitignored files out of the @ file picker.Any settings file
respondToBashCommandsDocumentedbooleantrueStop Claude from responding after a ! shell command runs. The command output still joins the context.Any settings file
sandboxDocumentedobject-Isolate Bash commands from your filesystem and network on macOS, Linux, and WSL2.Any settings file
skipWebFetchPreflightDocumentedboolean-Skip the WebFetch hostname check when Anthropic is unreachable.Any settings file
todoFeatureEnabledUndocumentedboolean-Turn the todo and task tracking panel on or off.Settings files
worktreeDocumentedobject-Configure how Claude Code creates git worktrees. Covers --worktree, EnterWorktree, and agent isolation.Any settings file

Example​

Keep Transcripts for a Week​

This file deletes transcripts after 7 days, keeps auto memory on, lets Claude see more shell output inline, and asks for answers in German.

~/.claude/settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"cleanupPeriodDays": 7,
"autoMemoryEnabled": true,
"bashOutputMaxChars": 50000,
"language": "german"
}