Skip to content

$ cat index.mdx$ cat ~/blogs/engineering/claude-code-hidden-settings-tested/index.mdx # I put my name on this

I Tested 220 Hidden Claude Code Settings: 118 Not in 2.1.330

I wrote this. You can take notes.

If you pasted a "hidden" Claude Code setting from a viral list into your settings.json or your shell profile, there is a good chance it does nothing.

Take cleanup_period_days, which one popular list recommends. That exact string appears zero times in the Claude Code 2.1.330 binary. The setting that actually controls transcript cleanup is cleanupPeriodDays, which appears 40 times and sits in the official settings reference with a default of 30. One name works. The other is a line in your config that no code ever reads.

I wanted to know how common that is, so I took six "hidden settings" articles, pulled out every setting, flag, environment variable and command they name, and checked each one against the binary and the official docs.

Here is what 220 names turned into:

ResultNames
Real in 2.1.330 and in the official docs or claude --help94
Real in 2.1.330, but not in the docs or --help (actually hidden)8
Not a Claude Code setting in 2.1.330118

So more than half of the names don't exist in 2.1.330, the version I tested. Of the 102 that do, 94 are already documented. Eight are hidden in the sense the headlines promise.

My claim is narrow: most "hidden" Claude Code settings fall into two groups. Either they are documented features with a dramatic label, or Claude Code 2.1.330 doesn't read them. Before you paste one, check the binary you actually run. The check takes one command and less than a second, and it's at the end of this post.

What I checked, and against what

The target was Claude Code 2.1.330, the Linux build, a single 381 MB executable. How that file is put together is covered in Inside the Claude Code binary.

For each name, I asked three questions:

  1. Does the exact token appear in the binary? I counted exact whole-word matches, so a name only counts when it stands on its own, not as part of a longer string.
  2. Is it in the official documentation? I checked ten official docs pages plus the full llms-full.txt export from code.claude.com, which is 10.5 MB of text.
  3. Does claude --help list it? Some flags are only in the help output.

For missing names, I also checked npm builds 1.0.28 (June 18, 2025) and 2.1.87 (March 29, 2026), read as text and never run. Old builds tell you whether a name was removed or never existed.

The scorecard, article by article

Six articles loaded. Two more did not (a Medium post returned 403, an X article 402), so they aren't scored. The tables show a pattern, not a grade: several authors wrote clearly about real features, and one warns in the article itself that its list is unverified.

"27 Hidden Claude Features" on technologiee (June 27, 2026)

Read the article. Eight of its items name Claude Code slash commands: /init, /statusline, /context, /compact, /clear, /loop, /effort and /resume.

Real and documentedHiddenNot in 2.1.330
800

All eight are in the official commands docs. "Hidden" here means "you may not have typed it yet."

"25 Hidden Settings" on daily.dev (October 5, 2026)

Read the post. It summarizes a video by AI LABS and names four concrete settings: CLAUDE_CODE_NEW_INIT, disableClaudeAiConnectors, CLAUDE_CODE_SUBAGENT_MODEL and CLAUDE_CODE_SUBAGENT_MODEL_FORCE.

Real and documentedHiddenNot in 2.1.330
400

All four exist and all four are documented.

"Hidden Claude Code Commands: The Complete Guide to Secret Features" on petegypps.uk (June 18, 2025)

Read the guide. This is the big one: 15 environment variables, 88 CLI flags, and 17 commands that start with !. The article itself says many of these are undocumented or unverified.

TypeCheckedReal and documentedNot in 2.1.330
Environment variables15015
CLI flags881 (--debug)87

The 17 ! commands are a different case, covered below. They aren't part of the 220.

Because this guide predates most of Claude Code's history, I also checked it against 1.0.28, the build released the same day the guide was published. None of the 15 environment variables and none of the 87 flags exist there either. --debug is the only name from this list that Claude Code has shipped in either build.

"I Read the Claude Code Source Code" on buildingbetter.tech (April 1, 2026)

Read the article. It works from version 2.1.87 and names 26 settings and hook fields, including updatedInput, permissionDecision, watchPaths, asyncRewake and the hook events PreToolUse, PostToolUse and FileChanged.

Real and documentedHiddenNot in 2.1.330
241 (autoDreamEnabled)1 (requiredMcpServers)

A careful source read: almost everything it names is real, and most of it is also in the settings reference or the hooks page. requiredMcpServers was present in 2.1.87 and is gone in 2.1.330.

"12 Hidden Settings You Should Enable" on ice-ice-bear (April 1, 2026)

Read the article. It names 15 items.

Real and documentedHiddenNot in 2.1.330
3 (--effort, --agent, /insights)012

The three that work are documented. Most of the twelve that don't are snake_case versions of real camelCase keys, the most instructive failure in the set, covered below.

"Claude Code's Hidden Features" on sathwick.xyz (March 2026)

Read the article. For context, Claude Code 2.1.88's source leaked through an npm source map on March 31, 2026. I checked the 64 configuration names it lists: environment variables, CLI flags and settings keys.

Real and documentedHiddenNot in 2.1.330
5473 (--afk, CLAUDE_CODE_COMMIT_LOG, minSleepDurationMs)

This article accounts for seven of the eight genuinely hidden names. It also has the highest count of documented features labelled hidden. alwaysThinkingEnabled, spinnerVerbs, skipWebFetchPreflight and apiKeyHelper are all in the official settings reference.

How a fake setting is born

The 118 misses aren't random. They come from five repeatable mistakes, and once you know them you can spot a bad entry before you paste it.

1. The list was never checked against a build

102 of the 118 come from the June 2025 guide. Checked against the build released on its publication day, its 15 environment variables and 87 of its 88 flags never shipped. Names like CLAUDE_PARALLEL_TOOLS, CLAUDE_SEMANTIC_CACHE_SIZE, --pair-programming, --smart-commits and --quality-gates don't appear in 1.0.28 and don't appear in 2.1.330.

They follow the naming conventions of real settings, which is why they spread. A plausible name with a believable description passes a quick read. It doesn't pass a grep.

2. snake_case versions of camelCase keys

Claude Code's settings.json keys are camelCase. Its environment variables are UPPER_SNAKE_CASE. The ice-ice-bear list uses lower snake_case for keys, and in this binary those strings match nothing.

Here is each one next to the name that actually exists:

Name in the listClosest real name in 2.1.330Where it goes
cleanup_period_dayscleanupPeriodDayssettings key, documented, default 30
max_output_charsbashOutputMaxChars or BASH_MAX_OUTPUT_LENGTHsettings key / env var, both documented
CLAUDE_CODE_MAX_BASH_OUTPUTBASH_MAX_OUTPUT_LENGTHenv var, documented
max_read_file_tokensCLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENSenv var
auto_compact_percentage_overrideCLAUDE_AUTOCOMPACT_PCT_OVERRIDEenv var
disable_telemetryDISABLE_TELEMETRYenv var
disable_error_reportingDISABLE_ERROR_REPORTINGenv var
disable_feedback_displayDISABLE_FEEDBACK_COMMANDenv var
--disable-non-essential-trafficCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICenv var only, no flag form

The intent behind every row is real. Only the spelling is off, and Claude Code looks up exact strings.

Two more names from that list show a subtler trap. pre_tool_use and post_tool_use do appear in the binary, 2 and 3 times. But they show up as values in telemetry fields, not as settings keys. The hook events you configure are PreToolUse and PostToolUse. A hit proves the string exists, not that it is a setting. That gap comes back in the grep section.

permitted_agent_names has no equivalent I could match. It appears zero times.

3. Names that were removed, or never shipped

Comparing the shipped 2.1.87 npm build with 2.1.330 sorts the stale names into two kinds. Four names show the difference:

  • requiredMcpServers and CLAUDE_CODE_COMMIT_LOG were in shipped 2.1.87. They are gone in 2.1.330: real, then removed.
  • --afk and minSleepDurationMs aren't in shipped 2.1.87 either, and they aren't in 2.1.330. Neither shipped build contains them.

Even a list that was right when written goes stale: a setting that shipped in March can be gone by November.

4. The ! mix-up

The June 2025 guide lists 17 commands such as !state, !help and !cost. They look like a secret command family. Typing ! at the start of your input puts Claude Code into shell mode, which is documented under "Shell mode with ! prefix" in the interactive-mode docs. Whatever follows runs as a shell command. So !state doesn't open some internal state view. It tries to run a program called state on your machine.

That's why these 17 are not in the 220. They are a documented feature, misread.

5. Grep false positives

Several flags from the 2025 guide do show up when you search the 2.1.330 binary:

Flaggrep -w hits in 2.1.330What the hits actually are
--port25Bun runtime help text bundled into the binary
--watch75Bun runtime help text
--trace32ripgrep
--resume-from2a list of Maven flags inside Claude Code's bash command parser
--role5a list of sudo flags in the same parser

Claude Code ships as one executable that bundles the Bun runtime, ripgrep and a parser that knows the flags of many other tools. Any of those can contain a string that looks like a Claude Code flag. None of these five exist in 1.0.28, and none of them is a flag Claude Code accepts.

A raw hit count would have scored all five as real. The count only becomes evidence after you read the text around each hit.

A few that are real but misdescribed

Three real names circulate with wrong descriptions:

  • --enable-auto-mode: the CLI reference says it was removed in v2.1.111. The 2.1.330 binary still registers it, as a hidden option labelled (deprecated) Opt in to auto mode. It is accepted but deprecated, not a secret switch to rely on.
  • --remote: real, and the docs call it a deprecated alias for --cloud.
  • DISABLE_TELEMETRY: some lists treat this as a hidden trick. It's on the documented environment-variables page, which says in bold that setting it to 0 or false still opts you out. If you set it to 0 expecting telemetry back on, it stays off.

Why "hidden" usually means "documented"

The most common result wasn't a fake setting. It was a documented one with a dramatic label: 94 of the 102 real names are in the official docs or claude --help.

These lists do useful work. The settings reference is long, and nobody reads it end to end. A list that tells you alwaysThinkingEnabled exists, or that hooks can return updatedInput to rewrite a tool call, can teach you something you'd never have found otherwise. The technologiee and daily.dev pieces scored 12 for 12. When a list surfaces real, documented features, the "hidden" in the headline is marketing, and the content is fine.

The cost shows up in the mixed lists. When one article puts cleanupPeriodDays next to cleanup_period_days, or --debug next to --smart-commits, you can't tell from the page which line works. Both get the same confident description and code block. Only the program can tell them apart.

So "documented" is the better default target. A documented setting is supported, described properly and more likely to survive the next release. If it's only in someone's list, check it first.

The 8 that really are hidden, and what they do

These eight are in the 2.1.330 binary and in neither llms-full.txt nor claude --help, the only results that match the headline promise. So I read the code around each one to see what it actually does.

Mostly, nothing.

NameTypeWhat it does in 2.1.330
CLAUDE_CODE_PROFILE_STARTUPenv varWrites a startup timing report to disk and to the debug log
CLAUDE_CODE_DEBUG_REPAINTSenv varLogs why the terminal UI did a full redraw
autoDreamEnabledsettings keyA server-gated memory setting: no effect unless your account has the feature
CLAUDE_CODE_PROFILE_QUERYenv varNothing. It is compiled to a constant false
CLAUDE_CODE_TERMINAL_RECORDINGenv varNothing found. Declared, never read
CLAUDE_CODE_PERFETTO_TRACEenv varLogs one debug line. No tracer is ever attached
taskCompleteNotifEnabledconfig keyListed as an allowed key. Nothing reads it
--sdk-urlCLI flagInternal transport plumbing that refuses non-Anthropic hosts

Even the truly hidden ones mostly do nothing

Three of the eight do something a user could notice. Five don't.

The three that work. CLAUDE_CODE_PROFILE_STARTUP writes a startup-perf/<id>.txt report and a matching .json file, with per-checkpoint milliseconds, RSS and heap. That's worth setting once if Claude Code starts slowly, and never again. The same code also samples a random 5% of headless sessions and 0.5% of startups for timing analytics, including free memory and load average. I traced the code path to the sink: DISABLE_TELEMETRY, DO_NOT_TRACK and CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC all stop those events from being sent. That is a code reading, not a network capture. CLAUDE_CODE_DEBUG_REPAINTS makes the renderer record which component owns each element, then logs a [REPAINT] full reset line with the reason, the row and the before and after text each time the screen fully redraws. That's useful if you're filing a flicker bug. autoDreamEnabled has a schema description of "Enable background memory consolidation (auto-dream). When set, overrides the server-side default." The code checks a server-side gate first, and if your account doesn't have the feature, the setting is ignored.

The two that are dead code. CLAUDE_CODE_PROFILE_QUERY is the most striking. Its help string still says "Query profiling not enabled (set CLAUDE_CODE_PROFILE_QUERY=1)", but the switch it would flip was built into this binary as a constant false, so the environment variable is never read. Follow the instruction and nothing changes. CLAUDE_CODE_TERMINAL_RECORDING appears exactly twice in 381 MB: once in the string table and once in a list of known environment names. No code reads it.

The stub. CLAUDE_CODE_PERFETTO_TRACE is read once, during telemetry setup, to log [Perfetto] initializePerfettoTracing called, env value: .... Every tracing helper returns early because no recorder is ever attached. You get one debug line and no trace.

The key with no reader. taskCompleteNotifEnabled sits in the list of keys your global config is allowed to contain, next to inputNeededNotifEnabled and agentPushNotifEnabled. Nothing in 2.1.330 reads it. Notifications are controlled by the documented preferredNotifChannel setting and hooks.

The flag you can't use. --sdk-url forces non-interactive mode and points a session's SDK messages at a websocket URL. It validates the host and fails with "is not an approved Anthropic endpoint" for anything else, and a guard message says only a session's own process may use it. It is plumbing for hosted sessions, not a feature for you.

So the honest version of "hidden Claude Code settings" is two diagnostic switches and one setting that depends on your account. The rest are leftovers. Undocumented also means unsupported: no stability promise, and nothing stopping a name from vanishing in the next release, the way requiredMcpServers did.

Check it yourself

You don't need to trust my table, or anyone's. It is the rule I run my agents on too: verify the work, not the report, because a done the agent signed itself proves nothing. Claude Code is a single binary on your machine, and the setting names it reads appear inside it as plain text. This finds your actual binary and counts exact matches:

B=$(readlink -f "$(command -v claude)")
LC_ALL=C grep -a -o -w -F -- 'cleanupPeriodDays' "$B" | wc -l    # 40
LC_ALL=C grep -a -o -w -F -- 'cleanup_period_days' "$B" | wc -l  # 0

Each search takes about 0.3 seconds on the 381 MB file.

What each part does:

  • readlink -f follows the claude symlink to the versioned binary, so you search the version you actually run.
  • -a treats the binary as text. -F searches for a fixed string instead of a regular expression. -w matches whole words only. -o with wc -l counts every occurrence.
  • LC_ALL=C stops grep from tripping over byte sequences that aren't valid text.

How to read the result:

  • 0 hits: your Claude Code doesn't contain that string. If it's in your config, delete it, or find the real name. The snake_case table above covers the common ones.
  • Some hits: the string exists somewhere in the file. That's necessary, not sufficient. --port hits 25 times and is Bun's flag, not Claude Code's. pre_tool_use hits and is a telemetry value, not a setting. Look at the surrounding text before you believe it.
  • Hits, and it's in the docs or claude --help: it's real and supported. Use it as documented.

For the second case, strings -n 8 "$B" | grep -F -- 'NAME' | head prints the readable lines that contain each hit. For --port, the first lines that come back are Bun's --max-http-header-size help text and a loop over ["--hostname", "--host", "--port"], which is enough to see it isn't a Claude Code flag.

What to do with your config today

Open your ~/.claude/settings.json and the environment variables in your shell profile. For every Claude Code name that came from a list rather than the docs, run the grep. Delete or rename anything that returns zero.

Then, for anything that survives, search the official settings reference or env-vars page for it. If it's there, read what it actually does, because some lists describe real settings wrongly. If it's not there, it's one of the rare hidden ones, and you should treat it as something that can change or vanish in any release.

The next viral list will have new names in it. Your binary already has the answer, and it takes less than a second to ask.

$ ls ~/read/related

my other essays