Global config settings
Save these keys in ~/.claude.json, not in a settings file. Claude Code ignores them anywhere else. Claude Code and /config write most of them for you, and you can also edit them by hand.
autoConnectIde
Connect to a running IDE automatically when you start Claude Code from an external terminal. Appears in /config as Auto-connect to IDE (external terminal) when you run Claude Code outside a VS Code or JetBrains terminal.
- Scope:
Global config - Type: Boolean
true: Claude Code connects to a running IDE automatically when you start it from an external terminalfalse: Claude Code doesn't connect automatically from an external terminal; inside a VS Code or JetBrains terminal, or with--ide, it still connects
- Default:
false - Per-session overrides:
CLAUDE_CODE_AUTO_CONNECT_IDEtakes precedence over this key for one session, in either direction
{
"autoConnectIde": true
}Claude Code ignores this key in settings.json.
autoInstallIdeExtension
Install the Claude Code IDE extension automatically when you run Claude Code from a VS Code terminal. Appears in /config as Auto-install IDE extension when you run Claude Code inside a VS Code or JetBrains terminal.
- Scope:
Global config - Type: Boolean
true: Claude Code installs the IDE extension automatically when you run it from a VS Code terminalfalse: Claude Code doesn't install the extension automatically
- Default:
true - Per-session overrides:
CLAUDE_CODE_IDE_SKIP_AUTO_INSTALLset to1skips the install for one session even when this key istrue
{
"autoInstallIdeExtension": false
}Claude Code ignores this key in settings.json.
diffTool
Choose where Claude Code shows the diff of an Edit or Write change it proposes when a VS Code or JetBrains IDE is connected: "auto" opens it in the IDE's diff viewer, "terminal" keeps it in the terminal. Appears in /config as Diff tool only while Claude Code is connected to a VS Code or JetBrains IDE.
- Scope:
Global config - Type: string, one of:
"auto": Claude Code opens the diff in the IDE's diff viewer when a VS Code or JetBrains IDE is connected"terminal": Claude Code keeps the diff in the terminal
- Default:
"auto"
{
"diffTool": "terminal"
}Claude Code ignores this key in settings.json.
externalEditorContext
When you press Ctrl+G, Claude Code opens the prompt you're typing in your external editor. With this key on, the editor buffer starts with Claude's previous response as # comment lines, so you can read it while you write, and Claude Code strips those lines when you save. Appears in /config as Show last response in external editor.
- Scope:
Global config - Type: Boolean
true: the editor buffer starts with Claude's previous response as#comment lines, which Claude Code strips when you savefalse: the editor buffer opens with only your prompt
- Default:
false
{
"externalEditorContext": true
}With it on, the buffer Claude Code opens looks like this, and only the text below the marker line is sent as your prompt:
# ─── Claude's last response (for reference; removed on save) ───
# I added the retry loop to fetchUser in src/api.ts and a test
# for the timeout case. Want me to wire the same retry into
# fetchOrders?
# ─── Write your reply below this line ──────────────────────────
Yes, and cap it at three attempts.Claude Code keeps the last 50 lines of the response and marks the cut with # … (earlier output truncated).
Claude Code ignores this key in settings.json.
permissionExplainerEnabled
Removed in v2.1.257, together with the Ctrl+E command explanation on Bash and PowerShell permission prompts. Setting it has no effect on current versions.
Through v2.1.256, you could press Ctrl+E on a Bash or PowerShell permission prompt to see a model-generated explanation of the command, and set this key to false to turn that shortcut off.
- Scope:
Global config. On v2.1.256 and earlier. - Type: Boolean
- Default:
true
teammateDefaultModel
Removed in v2.1.234, together with its /config row Default teammate model. Setting it has no effect on current versions.
Through v2.1.233, you set this key to the model for agent team teammates your prompt didn't name a model for: an alias such as "sonnet", or null to follow the lead's model. For the model Claude Code picks for such teammates now, see specify teammates and models.
- Scope:
Global config. On v2.1.233 and earlier. - Type: string, a model alias or full model ID, or
null - Default: unset