← All agent setup guides

CONFIGURATION, EXPLAINED

Claude Code Settings: settings.json & API Setup

Read one continuous config, with model, access, permissions and tools marked inside the code. Select a setting to see its explanation beside it.

Official sources reviewed 2026-10-08One config · select a setting to read its explanation
.claude/settings.local.json

One continuous config. Click a line for its explanation. Commented lines show optional settings, alternatives or separate setup; the copy button includes active settings only.

JSON CONFIGSections are marked inside the codeSELECTED SETTINGOnly what you click is explained here
{

Model & responses

Choose a model family

model

Selects the starting model for Claude Code.

In the main config.claude/settings.local.json
In this example
sonnet is a family alias; it can resolve to a newer model as the product changes.
If you leave it unset
The default choice depends on your account and provider.
When to change it
Select an available model for the task, or use a supported full ID when a fixed version matters.
What changes / what to watch
A family alias does not pin a dated model version.
Check that it worked
Open /model and record the actual selected model before comparing results.
Official reference ↗

Copy keeps the parent structure. Merge it into the file shown above.

},
// }
// }
// }
},
}
// }
}
// ── Connection alternatives & separate-file setup ──
// Terminal · choose one authentication route
// Terminal · choose one authentication route
// ~/.claude/settings.json
// {
// "env": {
// }
// }
// ~/.claude/settings.json
// {
// "env": {
// }
// }
// ~/.claude/settings.json
// {
// "env": {
// }
// }
// ~/.claude/settings.json
// {
// "env": {
// }
// }
// .mcp.json
// {
// "mcpServers": {
// "docs": {
// }
// }
// }
// .mcp.json
// {
// "mcpServers": {
// "docs": {
// }
// }
// }
// ~/.claude/settings.json
// {
// "env": {
// }
// }
// ~/.claude/settings.json
// {
// "env": {
// }
// }
// ~/.claude/settings.json
// {
// "env": {
// }
// }
// .claude/skills/explain-config/SKILL.md
// ---
// ---
// .claude/agents/config-reviewer.md
// ---
// ---
Look up any documented key

SETTINGS AND OFFICIAL SOURCES

Full reference index

This dated index covers all entries in the reviewed official reference, including managed settings, stored state and legacy options. Entries with a worked example link back to the annotated config above; other entries link to their official specification. The index is not a file to paste, and not every key is available in every client or scope.

631 of 631 documented entries · showing 30

askUserQuestionTimeoutstring, one of "60s", "5m", "10m", or "never"

Interface and terminal · User or managed

autoModeobject with environment, allow, soft_deny, and hard_deny arrays of prose rules, plus the classifyAllShell Boolean

Permission settings · User or managed

Setup, troubleshooting & official sources

Where settings take effect

Claude Code local configuration. Reviewed against official documentation on 8 October 2026. Examples cover common complete workflows; the separate key index includes documented advanced, managed and legacy fields. Installed versions and account policies can differ.

  1. Open .claude/settings.local.json in your project for personal settings in that project. Use .claude/settings.json for shared project settings or ~/.claude/settings.json for personal settings across projects.
  2. The example uses project-local scope deliberately. Managed settings and command-line settings can take priority. Permission rules combine across scopes, so inspect conflicting allow, ask, and deny rules.
  3. Merge the keys you need into the existing JSON object. Keep authentication separate. Open /config to inspect settings and /model or /effort to check the active model and effort.
  4. Configuration has several file formats: settings.json for product behavior, .mcp.json for project MCP connections, CLAUDE.md for project instructions, SKILL.md for skills, and .claude/agents/*.md for role definitions. Managed-only and ~/.claude.json global-state keys are identified in the index; do not paste them into project settings.
  5. Choose one model-provider route. Commented alternatives and separate-file instructions appear in the same reading window; only active main-file settings are included in the full-config copy. Replace marked paths, model IDs and endpoints, and supply secrets through the documented local credential mechanism.

OFFICIAL AND THIRD-PARTY ACCESS

Choose how the agent connects.

Use one model-provider route per session. MCP connects tools and data; it does not replace model authentication.

Official Claude account

Sign in to an eligible Claude subscription/organization.

Authentication
Use the interactive login flow.
Verify
Inspect /status and clear a stale API/provider override.
Open annotated setup →

Official Anthropic API

Anthropic Console API usage.

Authentication
ANTHROPIC_API_KEY in the launch environment or the documented credential helper.
Verify
Inspect /status; a subscription and API billing are separate routes.
Open annotated setup →

Third-party gateway

Gateway that supports the Claude Code request protocol and features you use.

Authentication
ANTHROPIC_AUTH_TOKEN for bearer authentication, or the gateway's documented key mechanism.
Verify
Verify model mappings, tools, streaming and optional beta/tool-search compatibility.
Open annotated setup →

Amazon Bedrock

AWS-hosted Claude models.

Authentication
AWS credential chain/profile; a Bedrock bearer key is an alternative and overrides the chain.
Verify
Verify region, model pins and IAM permissions.
Open annotated setup →

Google Cloud / Vertex AI

Google Cloud-hosted Claude models, separate from AI Studio.

Authentication
Application Default Credentials or a documented workload identity route.
Verify
Verify project, serving location and model entitlement.
Open annotated setup →

Claude Platform on AWS

Anthropic API with an AWS-linked workspace, separate from Bedrock.

Authentication
AWS SigV4 credentials or the workspace API key.
Verify
Verify the AWS-linked workspace, provider and region in /status.
Open annotated setup →

Microsoft Foundry

Claude deployments in an Azure resource.

Authentication
Azure credential chain, Foundry API key or Entra bearer token; choose one route.
Verify
Verify resource name and deployment mapping in /status.
Open annotated setup →

AFTER YOU EDIT

Check the effective settings.

  1. Validate JSON/TOML syntax and the file location. A valid file can still contain an unsupported or wrong-scope key.
  2. Check /status, /model, /effort, /permissions and /mcp in a fresh session. Inspect inherited provider and credential variables without printing secrets.
  3. For 401/403 errors, check the authentication route, credential lifetime and model entitlement. For missing endpoints or models, check base path, protocol, region and model/deployment ID.
  4. For a setting that has no effect, check version support, scope, higher-priority overrides and model capabilities before adding more parameters.
  5. For tool/startup errors, inspect the MCP launch command, required variables and timeouts; use a harmless read-only request before a real operation.
  6. Change one tuning control at a time. Compare the same task using observed quality, duration, tokens and actual billed usage. Examples here are documentation-checked, not live gateway benchmarks.

Documentation-based examples. No live model calls or measured cost savings are claimed.

COMMON QUESTIONS

A few useful distinctions.

Is CLAUDE.md the same as settings.json?

CLAUDE.md holds instructions for the project. The settings files configure product behavior such as permissions and model selection. Put each change in its documented location.

Does effort control answer length?

Effort controls reasoning behavior. Reply language, style instructions, and output limits serve different purposes. A short answer can still require substantial reasoning.

Official sources

Checked 2026-10-08. Follow the documentation for your installed version and selected model.

Back to the Claude Code profile →