config.toml
The one machine-level settings file sc reads, with every table and key. Open it with sc edit config, then run sc profiles to check the gateway tables parse.
Help me with my own superclaude setup: check my config.toml against this reference and fix anything wrong or missing. Read this reference as raw Markdown first: curl -fsSL "https://superclaude.io/docs/config-toml.md" Then look at what I actually have — the files and commands it describes — and explain what matters for my setup in plain words. Propose the changes you would make, and make them when I say yes. Other superclaude pages, if you need them: https://superclaude.io/llms.txt
config.toml lives in the profiles home: $SUPERCLAUDE_HOME/config.toml when that is set, else ~/.superclaude/config.toml. A syntax error in a hand edit makes commands such as sc vault ls print sc: warning: parsing ~/.superclaude/config.toml (using defaults) and carry on with an empty config. A named launch like sc web research stops with “your config is malformed” until you fix or move the file, so run sc profiles after each edit. Environment variables lists the env vars that override some keys.
sc edit config
sc profilesTop-level keys go above the first [table] header.
| Key | Values | Default | Meaning |
|---|---|---|---|
version | integer | 1 | Config schema version. Leave it in. A newer sc uses it to detect an old file; an older sc warns when the file is newer than it understands. |
default | a vault name | default | The vault sc <project> <agent> resolves against when neither -v <name> nor $SUPERCLAUDE_VAULT is set. Must name a [vaults.<name>] entry. |
default_profile | a profile name, or direct | direct | What a launch without -u uses. direct is plain Claude Code with no gateway. claude, anthropic and none mean the same as direct. |
default_classifier | a classifier name, or off | unset | Which [classifiers.<name>] answers Claude Code’s auto-mode permission-classifier request. off, none, direct, an empty string or no key at all turn it off. |
| Table | What it sets |
|---|---|
[vaults.<name>] | the registered vaults |
[dist] | the release server, and the key if it is private |
[share] | the key, server and sender name for --share |
[endpoints.<name>] | servers the gateway can send requests to |
[profiles.<name>] | which endpoint model serves each Claude role |
[claude] | flags and token windows for every session |
[vault_isolation], [hooks], [statusline], [notify] | launch features |
[daemon] | daemon ports and timeouts |
[classifiers.<name>] | the model that answers permission checks |
[backup] | scheduled backups |
[relay] | the chat relay |
Which commands edit this file, and how it parses
These commands write to the file for you. They keep your comments and formatting, take a lock so they cannot race the daemon, and write the file with mode 0600.
| Command | What it writes |
|---|---|
sc vault add <name> <path> | [vaults.<name>] |
sc vault new <name> | [vaults.<name>] for the new vault |
sc vault default <name> | the top-level default key |
sc dist login [--url <url>] <key> / sc dist logout | adds or removes [dist] |
sc shares login <key> | adds [share] |
sc auth <endpoint> [--label <name>] | [endpoints.<endpoint>.oauth.identities.<label>] |
sc accounts capture --label <name> | [cc_accounts.<name>] (macOS) |
- The gateway path reads the file strictly. A parse error fails a
sc -u <profile>launch with the file path and the error. - Keys
scdoes not know are ignored. - A config that still has an old
[gateway]table and no[endpoints]table is refused. There is no automatic migration; rewrite it to the[endpoints]+[profiles]shape on this page. sc editpicks the editor in the order listed on Environment variables.
Register a vault with [vaults.<name>]
Every vault is registered here by name. There is no auto-discovery: a directory is a vault only if it has an entry.
| Key | Values | Meaning |
|---|---|---|
path | absolute path, or one starting with ~ | The vault root. ~ expands to $HOME. |
[vaults.personal]
path = "~/.superclaude/personal"
[vaults.work]
path = "~/vaults/work"A launch resolves the vault in this order: -v <name>, then $SUPERCLAUDE_VAULT, then the top-level default. A bare sc run inside a workspace ignores all of this and reads the workspace in the current directory. See Add projects and agents for sc vault new and sc vault add.
Set the release server with [dist]
sc system gets its plugins and the shared prompt library from the server named here. The default is https://superclaude.io, which needs no key, so most machines have no [dist] table at all. See Install.
| Key | Meaning |
|---|---|
url | Required. The release server, https://superclaude.io unless you point sc at a private one. A trailing / is trimmed. Without url, sc ignores the whole table, key included. |
key | Optional, for a private server that asks for one. ${VAR} is expanded, so the key can live in the environment. |
[dist]
url = "https://releases.example.com"
key = "${SUPERCLAUDE_KEY}"sc dist status shows the server, the key (masked, or none), and the release your plugins came from.
sc system downloads only the plugins whose content changed in the latest release, verifies each one’s sha256, and removes any plugin the release no longer ships. It also installs the release’s core.toml at $SC_PROMPTS/core.toml and keeps it current until you edit it. sc system --no-plugin-refresh skips the request. A 401 from a private server means its key was rejected; run sc dist login --url <url> <key> with a valid one. The public server never answers 401.
Add a model endpoint with [endpoints.<name>]
An endpoint is the URL, wire format, auth and keys of a server the gateway can send requests to. <name> is the prefix used in profile slugs: opencode/glm-5.2 is model glm-5.2 on [endpoints.opencode].
| Key | Values | Default | Meaning |
|---|---|---|---|
url | base URL | https://opencode.ai/zen/go | The backend. A trailing / is trimmed. |
format | anthropic-messages, openai-compat, openai-responses | openai-compat | Default wire format. A profile row can override it. |
auth | bearer, x-api-key, oauth, passthrough | from format | How the credential is sent. anthropic-messages defaults to x-api-key; the OpenAI formats default to bearer. |
key_csv | string | none | Comma-separated keys, usually one ${VAR}. |
key_file | path, ~ allowed | none | A file of keys separated by commas or newlines. |
[endpoints.opencode]
url = "https://opencode.ai/zen/go"
format = "openai-compat"
key_csv = "${OPENCODE_API_KEY}"${VAR} in key_csv is expanded from the environment. Keep keys out of the file itself.
Retries, headers, rates and other endpoint keys#
| Key | Values | Default | Meaning |
|---|---|---|---|
retry | { max, backoff_ms, jitter } | no retries | Re-send the same request on a 5xx or network failure. backoff_ms defaults to 500. jitter is full (default), equal, decorrelated or none. |
retries | integer | none | Shorthand for retry = { max = N }. retry wins if both are set. |
headers | table of strings | none | Extra static headers on every upstream request. |
rates."<model-id>" | { cache_hit, cache_miss, output } | none | USD per million tokens. An endpoint with rates has its spend tracked per session; one without is not metered. |
type | single, pool | single | A label that sc profiles -v prints. Routing does not read it: every endpoint round-robins across all its keys and benches a key that returns 429 for its cooldown. |
load_balance | string | round-robin | Reserved. Parsed but not used; keys are always round-robined. |
on_unsupported_param | warn, error, drop | warn | Reserved. Parsed but not enforced: every params entry is sent as written. |
Passthrough and hybrid profiles#
auth = "passthrough" goes on an endpoint for https://api.anthropic.com, conventionally [endpoints.anthropic]. A profile with a passthrough role is a hybrid. Under it, Claude Code keeps its own login and keeps sending every request to api.anthropic.com, and the daemon’s local proxy in the request path routes each one by role. A passthrough role goes on to Anthropic unchanged and never reaches the gateway; any other role goes to the gateway. That is how a hybrid profile keeps some roles on Claude.
OAuth endpoints#
An endpoint with auth = "oauth" uses a signed-in subscription instead of a key. Its settings live in [endpoints.<name>.oauth].
| Key | Values | Meaning |
|---|---|---|
provider | codex, grok | Which sign-in flow sc auth <endpoint> runs. |
identities.<label> | written by sc auth | Token pairs, one per --label. Do not edit them by hand. |
The gateway rotates across every stored label. Both providers rate-limit per account, so a second label only adds headroom when it is a different account. See Codex (ChatGPT subscription).
Map the Claude roles to models with [profiles.<name>]
A profile maps Claude Code’s model roles to endpoint models. Select one with sc -u <name>, and list them with sc profiles. Each role is a one-line inline table.
| Role | Required | When omitted |
|---|---|---|
opus | yes | |
sonnet | no | uses opus |
haiku | no | uses sonnet |
fable | no | not served; a Fable request errors |
| Row key | Values | Meaning |
|---|---|---|
slug | <endpoint>/<model-id> | Required. Split at the first /, so a model id may contain /. |
format | a wire format | Overrides the endpoint’s format for this model. |
auth | an auth scheme | Overrides the endpoint’s auth for this model. |
temperature | number | Sent on every request for this role. |
params | inline table | Extra request fields such as top_k, sent as written on every request. |
reasoning | { effort, budget_tokens } | effort is off, low, medium, high or max. It is a default: a request that carries its own effort keeps it. budget_tokens is parsed but not used yet; see Cheaper subagents. |
[profiles.research]
opus = { slug = "opencode/qwen3.7-max", format = "anthropic-messages", auth = "x-api-key", reasoning = { effort = "high" } }
sonnet = { slug = "opencode/deepseek-v4-pro", temperature = 0.7, params = { top_k = 40 } }
haiku = { slug = "opencode/deepseek-v4-flash" }A row that points at an OAuth endpoint with no signed-in identity fails the launch’s readiness check, before Claude Code starts, with run sc auth <endpoint>. It does not fail when the file loads. Cheaper subagents has worked examples.
Set Claude Code flags for every launch with [claude]
[claude] shapes every Claude Code session sc starts, so you never type these flags. This is the setup we run and recommend:
[claude]
extra_args = ["--allow-dangerously-skip-permissions", "--setting-sources", "project,user"]
autocompact = 700000| Setting | What it does |
|---|---|
--allow-dangerously-skip-permissions | Makes bypass mode available without starting in it: switch into it with Shift+Tab when you trust the task. --dangerously-skip-permissions instead starts every session bypassed, which Claude Code recommends only for sandboxes with no internet access. |
--setting-sources project,user | Loads your user and project settings and skips local ones (settings.local.json), so every session of a workspace behaves the same. |
autocompact = 700000 | Compacts near 667,000 tokens on a 1M-context model, which leaves room for the summary. Claude Code’s own default compacts later and can run out of headroom. |
All the [claude] keys:
| Key | Values | Default | Meaning |
|---|---|---|---|
extra_args | array of strings | [] | Claude Code flags added to every launch, one argv element per entry. |
autocompact | 100000 to 1000000, or "auto" | 700000 | Exported as $CLAUDE_CODE_AUTO_COMPACT_WINDOW. |
context_window | 100000 to 1000000, or "auto" | unset | Exported as $CLAUDE_CODE_MAX_CONTEXT_TOKENS. Leave it unset. |
What sc turns on without any config:
| Default | What it does | To change it |
|---|---|---|
--effort ultracode | Session effort: xhigh reasoning plus dynamic workflow orchestration. | Name another level: sc <project> <agent> --effort high, or put --effort in extra_args. |
CLAUDE_CODE_FORK_SUBAGENT=1 | Lets a session fork a background subagent that keeps its context. sc-memory’s consolidation uses it. | CLAUDE_CODE_FORK_SUBAGENT=0 sc … |
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 | Turns on Claude Code’s in-process plugin hooks, which several plugins rely on. | CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=0 sc … |
--permission-mode bypassPermissions | Added only on a gateway profile, outside incognito, when you named no permission mode and set no default_classifier. Claude Code’s auto-mode safety check would otherwise go to a model that can’t answer it. | Name a permission mode yourself, or set a classifier. |
How extra_args and the token windows behave#
extra_args:
- There is no shell. No globbing and no
$VARexpansion, so a value with spaces is safe as its own entry. - The entries go before anything you type on the command line. Claude Code keeps the last occurrence of a repeated flag, so
sc <project> <agent> --setting-sources userstill wins. - Naming
--permission-modeor--efforthere replaces the defaultscwould otherwise inject for that flag. --system-promptis dropped with a warning, because it would replace the identityscinjects. Additive flags such as--plugin-dir,--settingsand--add-dirpass through.- An entry that starts with
-, contains a space and has no=is split on whitespace.["--setting-sources project,user"]therefore becomes two arguments.
The token windows:
autocompactis a window, not a trigger. Claude Code compacts at aboutwindow - min(max_output, 20000) - 13000, so700000compacts near 667,000 tokens.context_windowoverrides Claude Code’s per-model window for every model at once, and subagents often run a model with a smaller window than the main loop.- A value out of range warns and uses the default.
"auto"exports nothing. - These are env vars, so the per-run override is an env var too:
CLAUDE_CODE_AUTO_COMPACT_WINDOW=900000 sc <project> <agent>Turn launch features on or off
[vault_isolation], [hooks], [statusline] and [notify] switch launch features. Most people leave the defaults.
| Key | Default | Meaning | Per-run override |
|---|---|---|---|
[vault_isolation].enabled | false | On macOS, block a session in one vault from reading any other registered vault, enforced by the kernel sandbox. | sc --isolate-vault turns it on; SUPERCLAUDE_NO_VAULT_ISOLATION turns it off |
[hooks].auto_inject | true | Inject the daemon’s HTTP hooks with --settings, so the daemon can see session state. | SUPERCLAUDE_NO_HOOK_INJECT |
[statusline].auto_inject | true | Inject a statusLine. | SUPERCLAUDE_NO_STATUSLINE |
[notify].on_blocked | true | On macOS, show a desktop notification when a session starts waiting on a permission or decision prompt. It names the project and agent, and fires once per transition. | none |
The injected --settings overrides the statusLine in a project’s .claude/settings.json. Set [statusline].auto_inject = false to use your own. The [notify] table only needs to exist to turn the notification off.
Change daemon ports and timeouts with [daemon]
The defaults suit almost every machine. See The background daemon.
The daemon reads port, upstream_idle_timeout_secs and retry_deadline_secs once, when it starts, so a change to those reaches a running daemon only after a restart. It re-reads reload_max_defer_secs and [daemon.accounts_monitor] each time it uses them.
| Key | Values | Default | Meaning |
|---|---|---|---|
port | port number | 48770 | Loopback control port. The daemon binds it and every other sc probes it. |
reload_max_defer_secs | seconds | 600 | How long sc daemon upgrade waits for a quiet moment before it starts refusing new gateway requests so running ones can drain. If the daemon is still busy 300 seconds after that, the upgrade is abandoned; sc daemon upgrade --force swaps at once. |
upstream_idle_timeout_secs | seconds | 1800 | The longest silence allowed between two bytes of an upstream response. It is not a limit on total response time. 0 removes it. |
retry_deadline_secs | seconds | 60 | Wall-clock ceiling on one gateway request’s whole retry sequence. 0 means no retries. |
Port precedence, highest first: $SUPERCLAUDE_DAEMON_PORT, then [daemon].port, then 48770. sc --daemon-port <n> exports the env var for one run. The default sits below the macOS ephemeral port range. On Linux it falls inside the default ephemeral range (32768 to 60999), so pick a port below 32768 if you see intermittent “port already in use” errors.
[daemon.accounts_monitor] watches the Claude Code accounts stored by sc accounts capture and switches the active account when it nears its usage limit. macOS only, off by default.
| Key | Default | Meaning |
|---|---|---|
enabled | false | Master switch. |
interval_seconds | 120 | Seconds between usage polls. |
switch_threshold_percent | 95 | Switch accounts at or above this usage percentage. |
If you write both tables by hand, put the [daemon] scalar keys before the [daemon.accounts_monitor] header.
Answer auto-mode permission checks with [classifiers.<name>]
A classifier answers Claude Code’s auto-mode permission check when the main loop runs on the gateway. Select one with the top-level default_classifier. The daemon recognizes Claude Code’s own permission-classifier request and sends it to the classifier’s endpoint and model.
| Key | Required | Meaning |
|---|---|---|
endpoint | yes | An [endpoints.<name>] entry. |
model | yes | The model id sent to that endpoint. |
format | no | Wire format override. Falls back to the endpoint’s format, then openai-compat. |
With default_classifier set, sc starts a hybrid launch in --permission-mode auto when every main-loop role the profile defines (opus, sonnet, and fable if present) uses the anthropic passthrough endpoint. A full gateway launch starts in --permission-mode bypassPermissions, with or without a classifier. sc never overrides a --permission-mode you pass, and injects neither mode under -i.
The classifier is consulted only when the main-loop role is itself on the gateway. In a hybrid profile where opus and sonnet use the anthropic passthrough endpoint, Claude answers the classifier request and the named classifier is not used.
Back up my files with [backup]
A [backup] table turns on backups. The daemon runs one every every and records the result; there is nothing else to start. Check it with sc backup status.
| Key | Default | Meaning |
|---|---|---|
store | required | Which [backup.stores.<name>] to use. |
enabled | true | false stops the daemon backing up. |
every | "30m" | Cadence: "90s", "1h", "2h30m" or bare seconds. Minimum 60 seconds. |
upload_limit | "10MiB/s" | Bandwidth ceiling shared across uploads. "off" removes it. |
keep_versions | 2 | Prior versions kept per file. |
keep_days | 7 | Also keep the newest version from each of the last N days. 0 turns this off. |
concurrency | 4 | Parallel uploads. |
prefix | the sanitized hostname | Remote namespace for this machine. |
exclude | [] | Globs added to the built-in excludes (.DS_Store, target, node_modules, .venv, __pycache__, .jj). |
Stores are tables under [backup.stores.<name>], chosen by kind:
kind | Keys |
|---|---|
s3 | endpoint, bucket, region (default auto), access_key_id, secret_access_key, path_style (default true). Works with any S3-compatible service. |
local | path: a directory, such as an external disk or a NAS mount. |
[backup.roots.<name>] (path, exclude) replaces the built-in set of backed-up trees. [backup.extra_roots.<name>] adds trees to whichever set is in force; use that one to add a folder. A root name is one or two /-separated segments of a-z, 0-9, ., _ and -, and it becomes the remote directory.
Connect a chat platform with [relay]
The relay connects a chat platform to sessions. With no [relay] table, or no platform credentials, the daemon does not start it.
| Key | Default | Meaning |
|---|---|---|
vault | required | A registered vault name, or an absolute path, that holds the chat projects. |
idle_timeout_secs | 3600 | Idle timeout, in seconds, for a conversation’s session. |
max_turns | none | Turn limit per session. |
max_budget_usd | none | Spend limit per session. |
permission_mode | none | Permission mode for relay sessions. |
gateway_profile | none | Only direct is accepted. Any gateway profile is refused, because chat channels need first-party Anthropic auth. |
channel_plugin, channel_marketplace | sc-chat, none | The channel plugin to load. |
Credentials go in [relay.slack] (bot_token and app_token, both required) or [relay.discord] (token). The environment variables SC_RELAY_SLACK_BOT_TOKEN, SC_RELAY_SLACK_APP_TOKEN and SC_RELAY_DISCORD_TOKEN take precedence over the file, so prefer them.
[relay.policy] sets default to ask, allow or deny (default ask). Each [[relay.policy.rule]] has tool, contains and decision; the first matching rule wins.
Tables I should not edit
[cc_accounts.<label>]holds Claude Code account tokens stored bysc accounts capture. Manage it withsc accounts lsandsc accounts rm --label <name>.[endpoints.<name>.oauth.identities.<label>]is written and refreshed bysc authand the daemon.
Copy a complete config.toml
A sanitized file with every table on this page. Placeholders are in <angle-brackets>, and keys come from the environment. After editing, run sc profiles to confirm the gateway tables parse.
version = 1
default = "personal"
default_profile = "direct"
# default_classifier = "deepseek"
[vaults.personal]
path = "~/.superclaude/personal"
[vaults.work]
path = "~/vaults/work"
[claude]
extra_args = ["--allow-dangerously-skip-permissions", "--setting-sources", "project,user"]
autocompact = 700000
[vault_isolation]
enabled = false
[hooks]
auto_inject = true
[statusline]
auto_inject = true
[notify]
on_blocked = true
[daemon]
port = 48770
reload_max_defer_secs = 600
upstream_idle_timeout_secs = 1800
retry_deadline_secs = 60
[daemon.accounts_monitor]
enabled = false
interval_seconds = 120
switch_threshold_percent = 95
# A single-key endpoint, key read from a file.
[endpoints.opencode]
url = "https://opencode.ai/zen/go"
format = "openai-compat"
auth = "bearer"
key_file = "~/.opencode-go"
# A key pool. Set OPENAI_KEYS="<key-1>,<key-2>" in the environment.
[endpoints.openai]
type = "pool"
url = "https://api.openai.com"
format = "openai-compat"
auth = "bearer"
key_csv = "${OPENAI_KEYS}"
retry = { max = 3, backoff_ms = 500, jitter = "full" }
[endpoints.openai.rates."<model-id>"]
cache_hit = 0.25
cache_miss = 2.5
output = 15.0
# Roles on this endpoint stay on Claude Code's own login.
[endpoints.anthropic]
url = "https://api.anthropic.com"
format = "anthropic-messages"
auth = "passthrough"
# Sign in with: sc auth codex
[endpoints.codex]
url = "https://chatgpt.com/backend-api/codex"
format = "openai-responses"
auth = "oauth"
[endpoints.codex.oauth]
provider = "codex"
[profiles.fast]
opus = { slug = "opencode/deepseek-v4-flash" }
[profiles.coding]
opus = { slug = "opencode/glm-5.2", reasoning = { effort = "high" } }
haiku = { slug = "opencode/deepseek-v4-flash" }
[profiles.research]
opus = { slug = "opencode/qwen3.7-max", format = "anthropic-messages", auth = "x-api-key", reasoning = { effort = "high" } }
sonnet = { slug = "opencode/deepseek-v4-pro", temperature = 0.7, params = { top_k = 40, repetition_penalty = 1.05 } }
haiku = { slug = "opencode/deepseek-v4-flash" }
# Claude for the main loop, Codex for haiku-role subagents.
[profiles.hybrid]
opus = { slug = "anthropic/opus" }
sonnet = { slug = "anthropic/sonnet" }
haiku = { slug = "codex/gpt-5.4" }
[classifiers.deepseek]
endpoint = "opencode"
model = "deepseek-v4-flash"
format = "openai-compat"
[backup]
store = "disk"
every = "30m"
keep_versions = 2
keep_days = 7
exclude = ["**/*.log"]
[backup.stores.disk]
kind = "local"
path = "/Volumes/Backup/superclaude"
# A private release server, if you have one; the public one needs no key.
[dist]
url = "https://releases.example.com"
key = "${SUPERCLAUDE_KEY}"
[share]
name = "sam"Next: superclaude.toml