This page lists every `settings.json` key that Waibee Code reads. For where the files live and the order in which they layer over each other, see [Configuration files](/code/configuration/#settings-settingsjson). You can also change the main keys in the terminal with the `/settings` command, which saves them to the global file; its keys are described in [Keys](/code/features/#keys).
## How files are read
- A file must be valid JSON: comments and a trailing comma after the last element are not allowed. An error in the managed file [stops the launch](/code/configuration/#settings-settingsjson); on an error in any other layer, the agent falls back to the global settings or the defaults. To check the resulting configuration, use [waibee config check](/code/configuration/#checking-the-configuration).
- An unknown key causes no error and has no effect. This includes Claude Code keys that have no equivalent here, such as `permissions.defaultMode` and `permissions.ask`: the mode is set with the `permissions.mode` key.
- Usually the value comes from the last layer that sets it. The exceptions and how lists are merged are described in [Configuration files](/code/configuration/#settings-settingsjson).
- In a folder you do not trust, some keys from its files do not take effect; see [Folder trust](/code/permissions/#folder-trust).
- With the sandbox on, changes to a file on disk do not change the permissions and hooks of a running session; see [Configuration files](/code/configuration/#settings-settingsjson).
## Model
| Key | Values | Default | What it does |
|---|---|---|---|
| `model` | an alias (`sonnet`, `opus`, `haiku`, or your own) or a full model ID | `sonnet` | The main agent's model; see [Choosing a model](/code/models/). Not read from `.claude/settings.json` |
| `aliases` | an object `{"name": "model id"}` | built-in `sonnet`, `opus`, `haiku` | Your own short model names |
| `thought_level` | `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | depends on the model | The reasoning level; `off` is read as `none`. Applies while the current model matches `thought_level_model`. The `/effort` command writes both keys itself |
| `thought_level_model` | a full model ID | the value of `model` | The model that `thought_level` applies to |
## Context and memory
| Key | Values | Default | What it does |
|---|---|---|---|
| `context.compact_at` | 20 to 70, percent of the window | `70` | When automatic [compaction](/code/context-window/#history-compaction) starts |
| `context.idle_compact` | `true`, `false` | `true` | Allow [compaction while idle](/code/context-window/#compaction-while-idle) |
| `context.prompt_cache` | `auto`, `5m`, `1h` | `auto` | How long Anthropic models and `waibee/auto` keep the [prompt cache](/code/context-window/#prompt-cache); `auto` is an hour for the main agent |
| `helper.model` | a model | the [helper model](#helper-model) | The model for chat titles and other small background jobs |
| `title.auto` | `true`, `false` | `true` | Give a chat a title automatically |
| `memory.auto` | `true`, `false` | `true` | Add to [memory](/code/configuration/#memory) during work |
| `memory.model` | a model | `helper.model`, or the [helper model](#helper-model) without it | The model that picks facts for memory |
| `memory.max_bytes` | bytes | `2048` | The threshold at which old automatic entries are removed; manual entries can exceed it |
| `read.max_bytes` | bytes | `262144` (256 KB) | How much `Read` returns to the model per call |
### Helper model
`helper.model` picks the model for chat titles and other small background jobs. Old configurations with `compaction.model` still work. This does not choose a summary model: [compaction](/code/context-window/#history-compaction) uses the session's own model and its cached conversation.
Other background jobs include picking facts for memory, the [goal](/code/goal/) check, summarizing pages for `WebFetch`, and web search. By default, these use an available helper model, or the session's main model if the helper model is not in the router's catalog. Helper calls run at the lowest reasoning level the model accepts. Use `memory.model` for memory and `goal.evaluator_model` for the goal check.
## Per-message limits
By default, neither tokens nor time stop the work on a message: the agent works until it is done, and only the turn limit guards against endless work. A spending limit applies only if you set one. Limits count per message you send, together with all the subagents it started, and start over with the next message.
| Key | Values | Default | What it does |
|---|---|---|---|
| `max_turns` | an integer | `10000` | How many turns the main agent gets. For example, `1` limits the work to one turn; `0` restores the default limit |
| `sub_agent_max_turns` | a number | same as the main agent | How many turns each subagent gets if its definition has no `maxTurns` |
| `max_billable_input_per_run` | tokens | none | The limit on billable input tokens: fresh input and cache writes. Tokens read from the cache do not count |
| `max_output_per_run` | tokens | none | The limit on output tokens |
| `max_run_seconds` | seconds | none | The limit on working time; in headless mode, it is a [hard stop deadline](/code/headless/#run-limits) |
```json title="~/.waibee/settings.json"
{
"max_run_seconds": 3600,
"max_billable_input_per_run": 5000000
}
```
The same fields are in `/settings`; an empty field means "no limit". For a single `waibee run`, flags set the limits; see [Run limits](/code/headless/#run-limits).
In an interactive chat, when a limit is reached, the agent takes one last turn without tools and replies with what it has done so far, and the chat shows a line saying which limit was reached. The next message continues the work. How a headless run ends is described in [Run limits](/code/headless/#run-limits).
## Permissions and security
| Key | Values | Default | What it does |
|---|---|---|---|
| `permissions.mode` | `default`, `acceptEdits`, `trust`, `bypassPermissions` | `default`, `trust` in headless mode | The mode a session starts in; see [Permissions](/code/permissions/) |
| `permissions.allow` | a list of regular expressions | empty | What is approved without a question |
| `permissions.granted` | a list of regular expressions | empty | Permanent permissions from the [approval card](/code/permissions/#approvals). Written to `.waibee/settings.local.json`; they do not allow risky commands |
| `permissions.deny` | a list of regular expressions | empty | What is forbidden in any mode, including whole tools; see [Denying a tool](/code/permissions/#denying-a-tool) |
| `trusted_folders` | a list of paths | empty | Folders you trust. Read only from the global and managed files |
| `sandbox.profile` | `off`, `workspace-write`, `restricted` | `off` | The [sandbox](/code/permissions/#sandbox) profile. The managed file's precedence is described in [Configuration files](/code/configuration/#settings-settingsjson) |
| `sandbox.allow_write` | a list of paths | empty | Extra directories the sandbox allows writes to. Read only from the global file |
| `sandbox.require` | `true`, `false` | `false` | Do not start where the chosen sandbox cannot be provided. Read from the global and managed files; see the [merge rules](/code/configuration/#settings-settingsjson) |
| `sandbox.network.allowed_domains` | a list of domains | empty | Allowed addresses for commands in the [restricted](/code/permissions/#the-restricted-profile) profile. The merge rules and the empty-list rule are described in [Configuration files](/code/configuration/#settings-settingsjson) |
| `sandbox.network.allow_unix_sockets` | a list of absolute paths | empty | Unix socket exceptions in [restricted](/code/permissions/#the-restricted-profile): exact paths on macOS; on Linux, a non-empty list prevents the launch. The merge rules are described in [Configuration files](/code/configuration/#settings-settingsjson) |
| `netsec.enabled` | `true`, `false` | `false` | Turn on the [domain filter](/code/permissions/#domain-restrictions) |
| `netsec.allowed_domains` | a list of domains | empty | Allow only these domains |
| `netsec.blocked_domains` | a list of domains | empty | Block these domains |
| `files.skip_integrity_check` | `true`, `false` | `false` | Turn off the `Edit` check: without it, the agent edits a file it has not read or that changed after it was read. `true` in any of the files turns the check off |
| `privacy.redact.additional_sensitive_keys` | a list of name patterns | empty | Which other fields to mask in the audit log and crash reports |
| `privacy.redact.additional_command_regexes` | a list of regular expressions | empty | Which other string fragments to mask in the same places |
| `privacy.redact.disable_default_patterns` | `true`, `false` | `false` | Do not apply the built-in masking list. `privacy` keys are read only from the global and managed files |
| `api_key` | an `sk_live_...` key | none | The API key. The `WAIBEE_API_KEY` variable takes precedence over this key, and the system keychain is checked after it. Keeping the key in the keychain is safer: `waibee auth login`. That command and `waibee auth logout` remove the key from this field |
## Extensions and environment
| Key | Values | Default | What it does |
|---|---|---|---|
| `mcpServers`, `mcp.servers` | an object of servers | empty | [MCP servers](/code/mcp/): the entry fields are described there |
| `mcp.default_timeout_ms` | milliseconds, `0` for no limit | none | The tool call timeout for every MCP server whose entry has no `timeout_ms` of its own. Without this key, the default timeout applies; see [MCP](/code/mcp/) |
| `hooks` | an object of events | empty | [Hooks](/code/hooks/). Read only from `settings.json`: they have no effect in `settings.local.json` or the managed file |
| `env` | an object `{"NAME": "value"}` | empty | Environment variables for the agent and its commands. A variable already set in the environment is not overwritten. `WAIBEE_DATA_DIR` cannot be set this way |
| `lsp.prewarm` | `true`, `false` | `false` | Start [language servers](/code/lsp/) when the session starts instead of on first use |
## Network
| Key | Values | Default | What it does |
|---|---|---|---|
| `network.proxy` | a URL | none | A proxy for the agent's HTTP requests. Without it, model requests, update checks, and MCP server logins go through `HTTPS_PROXY`, `HTTP_PROXY`, or `ALL_PROXY` from the environment, honoring `NO_PROXY`, while `WebFetch` connects directly: it does not read environment variables, only this key |
| `network.connect_timeout_secs` | seconds | `10` | The connection timeout |
| `network.request_timeout_secs` | seconds | `120` | The timeout for a non-streaming request. It does not apply to streamed model responses |
## Log and storage
| Key | Values | Default | What it does |
|---|---|---|---|
| `audit.enabled` | `true`, `false` | `true` | Keep the audit log. `false` in any of the files turns it off |
| `audit.max_size_mb` | MB | `100` | The log file size after which the same day's entries continue in the next file. This key does not limit the log's total size |
| `storage.audit_max_age_days` | days | `90` | How many days to keep the audit log. Older days are removed automatically when the day changes, without `auto_cleanup`. Read only from the global file |
| `storage.cache_max_age_days` | days | `7` | How long to keep the cache during scheduled cleanup |
| `storage.tool_outputs_max_mb` | MB | `50` | The size of saved tool results after which `waibee storage status` warns you |
| `storage.auto_cleanup` | `true`, `false` | `false` | Clean up storage in the background at launch, with the retention periods of [`waibee storage clean all`](/code/waibee-directory/#disk-space). `true` in any of the files turns cleanup on |
## Goal mode and background commands
| Key | Values | Default | What it does |
|---|---|---|---|
| `goal.evaluator_model` | a model | the [helper model](#helper-model) | The model that checks the [goal](/code/goal/) |
| `goal.max_iterations` | a number | `50` | The limit on turns with a goal check, including the first |
| `goal.auto_goal` | `true`, `false` | `true` | Suggest a goal from the first prompt. In the terminal the agent asks; `waibee run` sets it without asking. `false` in any of the files turns this off |
| `background.max_jobs` | a number | `10` | How many background commands run at the same time. They stop together with the session |
| `background.job_output_max_kb` | KB | `256` | How much of the latest output is kept for each stream of a background command |
## Interface
| Key | Values | Default | What it does |
|---|---|---|---|
| `tui.language` | `en`, `ru` | the system language | The interface language. Change it in `/settings` in the terminal, or in the sidebar in the browser |
| `tui.show_splash` | `true`, `false` | `true` | The splash screen at launch |
| `tui.centered` | `true`, `false` | `false` | Keep the interface in a centered column in a wide terminal |
| `tui.center_width` | number of columns | `100` | The width of that column |
## Updates
| Key | Values | Default | What it does |
|---|---|---|---|
| `updates.channel` | `stable`, `beta`, `nightly` | `stable` | The channel [`waibee update`](/code/install/#updating) installs from. Read only from the global file; automatic checks at launch do not depend on it |
| `updates.check` | `true`, `false` | `true` | Check for updates automatically at startup and in the TUI. `false` in any layer turns the checks off, and later layers do not turn them back on |
`WAIBEE_NO_UPDATE_CHECK=1` or `DISABLE_AUTOUPDATER=1` in the environment also turns off all automatic checks. With the checks off, the agent runs the installed version and does not check the minimum supported version. You need to update it yourself; the explicit `waibee update` and `/update` commands stay available.
The agent writes the keys `permissions.last_picked`, `updates.last_check`, `updates.last_seen_version`, `has_completed_onboarding`, `tour_seen`, and `tour_seen_web` itself to remember state between launches. You do not need to edit them by hand.
## Tool set
There is no separate key that sets the main agent's tool set. A built-in tool is turned off with a rule in `permissions.deny`, and an MCP server's tool with the `disabled_tools` key in the server's entry; see [Denying a tool](/code/permissions/#denying-a-tool). For a single headless run, there is the [--tools](/code/headless/#tool-set) flag. For the duration of one command or skill, the `allowed-tools` field narrows the set, and for a subagent the `tools` and `disallowedTools` fields do; see [Skills and commands](/code/skills/).
This page lists every settings.json key that Waibee Code reads. For where the files live and the order in which they layer over each other, see Configuration files. You can also change the main keys in the terminal with the /settings command, which saves them to the global file; its keys are described in Keys.
A file must be valid JSON: comments and a trailing comma after the last element are not allowed. An error in the managed file stops the launch; on an error in any other layer, the agent falls back to the global settings or the defaults. To check the resulting configuration, use waibee config check.
An unknown key causes no error and has no effect. This includes Claude Code keys that have no equivalent here, such as permissions.defaultMode and permissions.ask: the mode is set with the permissions.mode key.
Usually the value comes from the last layer that sets it. The exceptions and how lists are merged are described in Configuration files.
In a folder you do not trust, some keys from its files do not take effect; see Folder trust.
With the sandbox on, changes to a file on disk do not change the permissions and hooks of a running session; see Configuration files.
helper.model picks the model for chat titles and other small background jobs. Old configurations with compaction.model still work. This does not choose a summary model: compaction uses the session’s own model and its cached conversation.
Other background jobs include picking facts for memory, the goal check, summarizing pages for WebFetch, and web search. By default, these use an available helper model, or the session’s main model if the helper model is not in the router’s catalog. Helper calls run at the lowest reasoning level the model accepts. Use memory.model for memory and goal.evaluator_model for the goal check.
By default, neither tokens nor time stop the work on a message: the agent works until it is done, and only the turn limit guards against endless work. A spending limit applies only if you set one. Limits count per message you send, together with all the subagents it started, and start over with the next message.
Key
Values
Default
What it does
max_turns
an integer
10000
How many turns the main agent gets. For example, 1 limits the work to one turn; 0 restores the default limit
sub_agent_max_turns
a number
same as the main agent
How many turns each subagent gets if its definition has no maxTurns
max_billable_input_per_run
tokens
none
The limit on billable input tokens: fresh input and cache writes. Tokens read from the cache do not count
The same fields are in /settings; an empty field means “no limit”. For a single waibee run, flags set the limits; see Run limits.
In an interactive chat, when a limit is reached, the agent takes one last turn without tools and replies with what it has done so far, and the chat shows a line saying which limit was reached. The next message continues the work. How a headless run ends is described in Run limits.
Extra directories the sandbox allows writes to. Read only from the global file
sandbox.require
true, false
false
Do not start where the chosen sandbox cannot be provided. Read from the global and managed files; see the merge rules
sandbox.network.allowed_domains
a list of domains
empty
Allowed addresses for commands in the restricted profile. The merge rules and the empty-list rule are described in Configuration files
sandbox.network.allow_unix_sockets
a list of absolute paths
empty
Unix socket exceptions in restricted: exact paths on macOS; on Linux, a non-empty list prevents the launch. The merge rules are described in Configuration files
Turn off the Edit check: without it, the agent edits a file it has not read or that changed after it was read. true in any of the files turns the check off
privacy.redact.additional_sensitive_keys
a list of name patterns
empty
Which other fields to mask in the audit log and crash reports
privacy.redact.additional_command_regexes
a list of regular expressions
empty
Which other string fragments to mask in the same places
privacy.redact.disable_default_patterns
true, false
false
Do not apply the built-in masking list. privacy keys are read only from the global and managed files
api_key
an sk_live_... key
none
The API key. The WAIBEE_API_KEY variable takes precedence over this key, and the system keychain is checked after it. Keeping the key in the keychain is safer: waibee auth login. That command and waibee auth logout remove the key from this field
The tool call timeout for every MCP server whose entry has no timeout_ms of its own. Without this key, the default timeout applies; see MCP
hooks
an object of events
empty
Hooks. Read only from settings.json: they have no effect in settings.local.json or the managed file
env
an object {"NAME": "value"}
empty
Environment variables for the agent and its commands. A variable already set in the environment is not overwritten. WAIBEE_DATA_DIR cannot be set this way
lsp.prewarm
true, false
false
Start language servers when the session starts instead of on first use
A proxy for the agent’s HTTP requests. Without it, model requests, update checks, and MCP server logins go through HTTPS_PROXY, HTTP_PROXY, or ALL_PROXY from the environment, honoring NO_PROXY, while WebFetch connects directly: it does not read environment variables, only this key
network.connect_timeout_secs
seconds
10
The connection timeout
network.request_timeout_secs
seconds
120
The timeout for a non-streaming request. It does not apply to streamed model responses
The channel waibee update installs from. Read only from the global file; automatic checks at launch do not depend on it
updates.check
true, false
true
Check for updates automatically at startup and in the TUI. false in any layer turns the checks off, and later layers do not turn them back on
WAIBEE_NO_UPDATE_CHECK=1 or DISABLE_AUTOUPDATER=1 in the environment also turns off all automatic checks. With the checks off, the agent runs the installed version and does not check the minimum supported version. You need to update it yourself; the explicit waibee update and /update commands stay available.
The agent writes the keys permissions.last_picked, updates.last_check, updates.last_seen_version, has_completed_onboarding, tour_seen, and tour_seen_web itself to remember state between launches. You do not need to edit them by hand.
There is no separate key that sets the main agent’s tool set. A built-in tool is turned off with a rule in permissions.deny, and an MCP server’s tool with the disabled_tools key in the server’s entry; see Denying a tool. For a single headless run, there is the —tools flag. For the duration of one command or skill, the allowed-tools field narrows the set, and for a subagent the tools and disallowedTools fields do; see Skills and commands.