Skip to navigation

Claude Code Settings Validation: Compare Status With Doctor Output

In short: Use /status to inspect loaded configuration sources and claude doctor to find rejected entries, then document the effective scope before editing JSON.

Published 17 min read
On this page

Direct answer: status and doctor answer different questions

Use /status inside Claude Code to inspect loaded configuration sources. Run claude doctor to identify rejected settings entries. Start with those observations before editing JSON, then check the settings reference for the specific key because most keys live in settings.json files while a short group lives in ~/.claude.json. Neither command is documented here as an automatic repair tool, and a rejected entry does not prove every settings file is invalid. The practical sequence is capture, classify, consult the key reference, make one scoped correction, and recheck.

Settings validation evidence map comparing status loaded sources with doctor rejected entries
Official Claude Code settings documentation recommends both inspection surfaces. Their different purposes do not establish automatic repair or a complete output schema.

Why inspection must come before another JSON edit

A configuration change can fail for several reasons. The key may belong in another file, an entry may be rejected, or a valid entry may be shadowed by a higher scope. Editing first collapses those possibilities into one vague symptom and can create a new conflicting definition.

Official. The settings page recommends /status to see loaded configuration sources and claude doctor to identify rejected entries. The fetched summary does not enumerate every field shown by either surface. A useful runbook therefore records what the tools actually expose in the current session instead of promising invented labels.

A loaded source is not automatically the winning source for every key. Precedence still matters among valid definitions. Conversely, a rejected entry is not merely a lower-priority value. It needs validation work before the ordinary scope order can explain the result.

The cost of skipping that distinction is repeat editing. A developer may correct a project-local file while the rejected entry sits in user settings. Another may change a user value while a command-line argument remains active. Each change adds configuration without resolving the observed state.

The five-scope precedence runbook supplies the rank order for valid definitions. The project-local merge guide explains list and model exceptions. Use those articles after identifying whether the problem is loading, rejection, placement, or precedence.

Capture the current configuration state

Begin with a stable launch context. Record the project directory, whether Claude Code runs in a terminal or an IDE surface, and whether a custom configuration directory applies. Then capture inspection output before making a change.

Official. CLAUDE_CONFIG_DIR should be written as an absolute path, and shorthand such as ~ or $HOME stays as typed. The absolute-path configuration directory guide explains why a relocated setup needs path verification before file comparison.

Keep secret values out of the capture. If an inspection surface exposes sensitive material, redact it before sharing. Record variable names and source locations rather than credential contents. The secrets in logs and transcripts guide describes how diagnostic output can become an exposure path.

A minimal note can contain the date, project path, launch surface, commands run, and observations relevant to the affected key. This is an operational record, not a benchmark. Do not add an invented success rate or claim that one capture proves behavior in every environment.

The VS Code settings and relaunch guide is relevant when terminal and editor sessions disagree. Shell variables are read at startup, while settings-file env changes have different timing unless a feature reads a variable only at startup.

Run /status for loaded sources

/status is the documented in-session surface for seeing loaded configuration sources. Run it in the same session where the configuration problem appears. A status capture from another project or another launch surface may not describe the relevant state.

Official. The recommendation establishes the purpose of /status, not a guarantee that every key’s winning source is displayed. If the current output does not answer a specific precedence question, keep that limitation in the notes and continue with the documented scope map.

Read the capture as evidence about loaded sources. Do not translate it into a claim that every source is valid for every key. Do not translate the absence of an expected field into a fabricated output schema. The actual fields visible in the current version are the evidence.

A source may be loaded while one of its entries is rejected. That is why the next step uses a different inspection surface rather than treating /status as a complete validator. The settings reference remains the place to classify a key and its storage scope.

For a project-specific symptom, compare the status observation with the files you expected to apply. An unexpected source can justify inspecting managed settings, launch arguments, or a relocated configuration base. It does not by itself prove which source wins for an ordinary key.

Record the active scope

After the status capture, write a candidate scope for the affected key. Use the documented order: managed settings, command-line arguments, project-local settings, shared project settings, then user settings. Mark any scope you could not inspect rather than guessing its contents.

Configuration observation Scope to inspect next Reason
Expected user value has no effect Project-local, shared project, launch and managed sources Higher valid definitions may shadow it
Expected project value has no effect Project-local, launch and managed sources Shared project settings are not the highest file scope
IDE and terminal differ Actual launch arguments and inherited environment The execution surfaces may not share startup state
A key appears in no expected settings file Settings reference for global-config scope A short key group lives in ~/.claude.json
A source is loaded but the key is rejected The rejected entry and its documented location Validation must precede precedence

Official. The user file is ~/.claude/settings.json, the shared project file is .claude/settings.json, and the personal project override is .claude/settings.local.json. Windows expands the user path under %USERPROFILE%\.claude. The global config versus settings.json guide prevents a misplaced edit before this trace begins.

Record a candidate, not a certainty, until the key-specific rules are checked. List keys combine across scopes, and model-related keys have special resolution. ANTHROPIC_MODEL can override file-based model settings regardless of file scope. The settings env and process replacement runbook covers that exception.

A scope record should name the file or launch surface, not reproduce secret contents. The API key security reference provides adjacent security guidance, while the GitHub Actions secrets guide explains why shared diagnostic records need redaction.

Settings validation workflow moving from status capture to scope trace, doctor inspection and one correction
The workflow follows official status and doctor recommendations. Scope precedence comes from the settings page, while key placement comes from the settings reference.

Run claude doctor for rejected entries

Run claude doctor from the matching launch context after recording the status observation. Its documented role here is identifying rejected entries, not automatically rewriting configuration.

bash
claude doctor

Official. Identification is not repair. The supplied evidence does not establish exit codes, a complete output field list, or an automatic correction action. Read the actual output, record the rejected entry it identifies, and consult the key reference before editing.

A rejected entry may involve an unsupported key, an invalid value, or a placement mistake, but those categories are diagnostic possibilities rather than claimed output messages. Do not invent the wording of an error or promise that doctor will name the exact corrective edit.

If doctor identifies no rejected entry while the symptom remains, precedence or startup timing may still explain it. That is not proof that the configuration is correct. It means the rejection branch did not resolve the question, so return to the scope trace and environment checks.

The troubleshooting documentation provides the official troubleshooting boundary. The CLI reference is the place to confirm command usage without adding unsupported flags. This article deliberately uses only the documented command.

Separate rejected entries from precedence

Rejection and shadowing require different corrections. A rejected entry must be validated against the key reference. A valid lower-priority entry must be traced through the scope order. Treating both as “the setting is ignored” hides the difference.

Inspection surface Information it exposes Question it does not settle alone
/status Loaded configuration sources The winner for every key or the validity of every entry
claude doctor Rejected entries Automatic repair or the complete precedence result
Settings reference Documented key location and scope The live values in a particular session
Precedence trace Candidate winning scope for a valid ordinary key List and model exceptions without key-specific checks
Environment inspection Named inherited or settings-provided variables Secret values that should be shared in a ticket

Official. Most settings keys reside in settings.json files, while a short group has global-config scope in ~/.claude.json. Checking the reference for the specific key prevents a correction from being written to the wrong storage surface.

Suppose a key is placed in settings.json but belongs to the global-config group. Doctor may identify a rejected entry, while repeated edits to settings files continue to fail. The corrective action is placement, not another precedence override. The global config guide lists documented examples and their boundary.

Suppose an entry is valid but a project-local value outranks it. Doctor’s rejection branch does not address that conflict. The merge runbook explains how to choose the intended scope without deleting unrelated configuration.

Check the settings reference for the key

The settings reference is the classification step between observation and edit. Look up the exact key, confirm its documented storage scope, and check whether the reference gives special behavior. Do not infer placement from a similar key name.

Official. Global-config examples include autoConnectIde, autoInstallIdeExtension, diffTool, and externalEditorContext. Those examples do not mean every IDE preference lives in ~/.claude.json. Editor preferences and Claude Code settings can occupy different surfaces.

The env key can be set in any settings file. That flexibility does not remove effective precedence or process replacement. A settings env entry can replace a shell-inherited value in most sessions, while some features read variables only at startup. The environment replacement guide provides the timing runbook.

For apiKeyHelper, the reference says the setting can appear in any settings file. Its generated credential still sits below ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY in the documented direct credential subset. The helper refresh article separates command scope, refresh timing, and credential selection.

A reference check should produce a short statement: key name, documented location, any exception, and the file or launch surface to inspect. If the reference does not answer the exact behavior, record the gap rather than filling it with a guess.

Make one scoped correction

Change one intended definition at a time. A broad rewrite makes it difficult to tell which edit resolved the symptom and can remove unrelated settings. Preserve the original observation so the next comparison has a baseline.

Official. The five-level order determines which valid scope outranks the others. It does not authorize editing managed policy from a personal file. The managed SSO runbook illustrates why some controls require the managed-source owner.

If the winning source is a launch argument, correct the invocation rather than adding a lower-scope file to fight it. If the winning source is project-local, decide whether that private override is intentional. If the intended owner is the repository, an existing local override still needs attention because it ranks higher.

For a rejected entry, use the key reference to correct its location or documented form. Do not assume that copying the same entry into another settings file will help. The global config and settings file comparison is the relevant check before moving a key.

Record what changed without recording secrets. A note such as “removed the rejected project-local definition after confirming user scope” is more useful than a full configuration dump. The settings files and exposed secrets article explains the adjacent risk of permission-related configuration choices.

Recheck the effective configuration

Repeat /status and claude doctor after the correction. Compare the new observation with the baseline, then trace the affected key through its applicable scopes. Relaunch when the feature is startup-sensitive.

Official. Shell variables are read at startup. Settings env changes can apply immediately unless the feature reads its variable only at startup. A correction can therefore look ineffective in an existing session even when the file is right for the next launch.

If a model setting remains unchanged, check ANTHROPIC_MODEL before editing another file. Its documented exception overrides file-based model settings regardless of settings-file scope. That is a key-specific rule, not a replacement for the whole precedence model.

A recheck is complete when the intended source is loaded, the relevant rejected entry is resolved, and the observed behavior matches the documented rule. If the available output does not expose enough evidence for that conclusion, say so. Do not convert a plausible correction into a guaranteed fix.

The uninstall and configuration retention guide is a useful boundary reminder: removing Claude Code and deleting configuration are separate actions. Validation does not require either one.

Worked example: rejected entry plus a shadowed value

Imagine a developer reports that a personal preference does not apply in one project. The first /status capture shows multiple configuration sources. claude doctor then identifies a rejected entry elsewhere. Two facts now require separate handling.

First, classify the rejected entry in the settings reference and correct its documented placement or form. Second, trace the original preference through managed settings, launch arguments, project-local settings, shared project settings, and user settings. A valid project-local definition may still outrank the corrected user value.

Derived. The investigation has two branches: one validation correction and one precedence trace. Combining them into a single edit would make the result ambiguous. This sequence is derived from the distinct documented purposes of /status and claude doctor, not from measured repair performance.

After the scoped correction, repeat both inspection commands in the same project and launch surface. If the feature depends on a startup-only variable, relaunch before judging the result. Keep the before-and-after notes, but redact any sensitive values.

bash
/status
claude doctor

The repeated commands are intentional. They create a comparable observation after the change. Their presence does not imply any undocumented output field or automatic repair behavior.

Practical inspection checklist

Step Evidence to capture Stop condition
1 Project path and launch surface Do not compare unrelated sessions
2 /status observation Do not invent missing fields
3 Candidate scope for the key Do not ignore unmanaged or managed context
4 claude doctor observation Do not treat identification as repair
5 Key reference classification Do not assume every key uses settings.json
6 One scoped correction Do not rewrite unrelated entries
7 Repeated inspection and relaunch if needed Do not claim success without matching evidence

Use the checklist as a small runbook. It keeps the investigation within configuration inspection rather than expanding into application tests, runtime debugging, or code review. The verification and proof guide is related reading for a broader evidence question, but it does not change the documented purpose of these commands.

The WSL IDE environment guide is relevant when the shell and IDE disagree about inherited variables. The custom API base URL resource is a separate integration topic and should not be used to explain a settings rejection without matching evidence.

Concrete win, honest loss and practical implication

Win. A developer can distinguish a loaded-but-shadowed value from a rejected entry before editing. That turns one vague failure into a small set of documented checks with a clear owner for the correction.

Loss. The fetched evidence does not enumerate every output field, establish exit codes, or promise automatic repair. /status alone may not identify a per-key winner, and claude doctor alone does not explain valid precedence conflicts.

Implication. Capture first, classify second, edit once, and recheck in the same launch context. Use the key reference to prevent misplaced configuration, and keep secret values out of the evidence record. The settings precedence map remains the next step when valid sources conflict.

Validation tradeoff diagram separating loaded sources, rejected entries, precedence and repair claims
Official documentation supports separate inspection purposes. The visual explicitly withholds automatic-repair and complete-output-schema claims.

Data gaps and future update triggers

Settings validation verdict separating loaded-source inspection, rejected-entry identification and scoped correction
The verdict follows official status and doctor guidance. It makes no automatic-repair, exit-code or complete-output-schema claim.

Unknown. The supplied summary does not enumerate every /status field, every doctor output field, command exit codes, or a universal repair procedure. It also does not prove that one rejected entry invalidates an entire file. Those gaps limit how precisely a screenshot can be interpreted.

Update this runbook when official documentation publishes a field reference or a documented repair behavior. Recheck the settings, CLI, and troubleshooting pages before publication. Version-specific output should be added only from verified evidence, not inferred from a community screenshot.

Status and doctor control checklist for capture, key reference, scoped correction and recheck
The checklist follows official inspection recommendations. It preserves unknown output details instead of supplying invented labels or exit codes.

One AI option for OpenAI-format agents

For a separate OpenAI-format agent, One AI offers one key and the 46 live free IDs through https://api.oneaiapikey.com/v1. Review the free model route and the OpenAI-format quickstart. This option is not a Claude Code credential source. Claude IDs were unavailable on 2026-11-27, and no free ID is claimed to work inside Claude Code.

FAQ

What does /status show?

The official settings page recommends it for seeing loaded configuration sources. The fetched summary does not enumerate every field or guarantee a per-key winner display.

Does claude doctor fix invalid settings automatically?

No automatic repair is established by the supplied evidence. Its documented role here is identifying rejected entries, after which the key reference guides a scoped correction.

Can a loaded setting still not be effective?

Yes. A valid higher-priority definition can shadow it. List combination, model-specific resolution, and environment variables may also change the analysis.

Why check ~/.claude.json as well as settings.json?

Most keys live in settings.json files, but a short group has global-config scope in ~/.claude.json. The specific key reference decides the location.

What should I do after one correction?

Repeat /status and claude doctor, trace the affected key, and relaunch if the feature reads its variable only at startup. Compare the result with the baseline without exposing secrets.

More Claude Code troubleshooting

Sources

More in Blog

Try it

One API key for GPT, Grok, DeepSeek, Kimi, GLM, MiniMax, Qwen, Step, Beam, Nemotron, ERNIE, Hunyuan, Gemma, Laguna, LFM, LongCat, Llama, Solar, Jais, Mistral, K2 and Roleplay.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.

New accounts$10 credit on sign-up
  • 100requests
    per day
  • 3Mtokens
    per day
  • 47free
    models
  • $0per
    token
  • No card
  • No end date
Claim $10 credit →