Settings

/tokendoctor shows the settings that move token use and cost, explains one, and changes it as you type it. It is answered by the plugin itself, with no model call, so it costs no tokens.

The main settings

On the author's machine, four of its rows:

Plain text
> /tokendoctor
tokendoctor: settings
  window       400K      tokens in context before auto-compaction
  slide        on        elide old tool outputs instead of summarizing
  effort       medium    reasoning effort
  subagents    sonnet    model for subagents without their own

/tokendoctor alone shows the main six (window, slide, cache, effort, model, subagents), then the audit's fixes. /tokendoctor all shows every setting it changes.

Change one

Plain text
/tokendoctor window 400k
/tokendoctor slide off
/tokendoctor cache reset
  • /tokendoctor <name> explains one: what it is, its value now, the values it takes, whether it applies now or from the next session, and what the audit says about it.
  • /tokendoctor <name> <value> applies as typed. 400k is 400,000; on and off are true and false.
  • reset goes back to Claude Code's default.
  • --project or --local writes to the project's shared or personal settings instead of your user settings.
  • A model name must be an alias (opus, sonnet, haiku) or a claude-… id.

Tab completes the names and their values. Every change is listed by undo.

Every name

NameSettingValues
windowautoCompactWindow200k, 400k, 600k, 1m; 100k to 1m
compactautoCompactEnabledon, off
idle-compactidleCompactionon, off
idle-compact-atCLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS100k to 1m tokens
compact-atCLAUDE_AUTOCOMPACT_PCT_OVERRIDE1 to 100, percent of the window (can only lower it)
max-effortmaxEffortLevelmedium, high, xhigh, max
slidetokendoctor's slideon, off
slide-tohow far a slide frees the context20 to 90 percent
keepalivetokendoctor's cache keepaliveon, off
cachepromptCacheTtl5m, 1h
subagent-cachesubagentPromptCacheTtl5m, 1h
modelmodela model alias or a claude-… id
subagentsCLAUDE_CODE_SUBAGENT_MODELa model alias or a claude-… id
advisoradvisorModela model alias or a claude-… id
efforteffortLevellow, medium, high, xhigh
thinkingalwaysThinkingEnabledon, off
fastfastModeon, off
fast-opt-infastModePerSessionOptInon, off
git-instructionsincludeGitInstructionson, off
no-git-instructionsCLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS1, 0
suggestionspromptSuggestionEnabledon, off
bash-outputbashOutputMaxChars1k to 150k characters
bash-output-envBASH_MAX_OUTPUT_LENGTH1k to 150k characters
tool-searchENABLE_TOOL_SEARCHtrue, auto, false
mcp-outputMAX_MCP_OUTPUT_TOKENS1k to 200k tokens
read-outputCLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS1k to 200k tokens
max-outputCLAUDE_CODE_MAX_OUTPUT_TOKENS1k to 200k tokens
keep-transcriptscleanupPeriodDays1 to 3650 days
skill-budgetskillListingBudgetFractionabove 0, at most 0.1
skill-descskillListingMaxDescChars100 to 5000 characters
output-styleoutputStyledefault, Explanatory, Learning, or another style's name
no-connectorsdisableClaudeAiConnectorson, off
effort-envCLAUDE_CODE_EFFORT_LEVELlow, medium, high, xhigh, max
window-envCLAUDE_CODE_AUTO_COMPACT_WINDOWtokens, over the window setting; 1m

The names in capitals are environment variables, written under env in the settings file and read when a session starts. Claude Code reloads a settings file when it changes, except model and effortLevel, which apply from the next session.

What it never changes

Only settings on the tunable list and /config rows. Hooks, permissions and anything that widens what Claude may do are never on it, so a model driving these tools cannot grant itself more.

With a model: optimize

/tokendoctor:optimize [focus] proposes up to five changes from your numbers and applies the ones you pick. Every change opens a dialog that shows it and runs only on Apply; with no one to ask, as in a -p run, nothing changes.

From a shell

Shell
tokendoctor-set --list
tokendoctor-set <key> <value> [--scope user|project|local] [--write]
tokendoctor-set <key> --unset [--scope user|project|local] [--write]

Without --write it is a dry run. The plugin's bin/ directory is on the Bash tool's PATH while the plugin is enabled.