Configuration files
Waibee Code reads its configuration from two directories: its own .waibee/ and the Claude Code-compatible .claude/, both in the project and globally. The global directory depends on the OS. The read order and the merge rules depend on the file type; see below.
Instruction files
Section titled “Instruction files”Instructions are Markdown files with rules for how the agent works. Waibee Code’s own format is WAIBEE.md; CLAUDE.md and AGENTS.md are read as they are.
Global files load first: WAIBEE.md, CLAUDE.md, and AGENTS.md from the data directory (~/.waibee/ on macOS and Linux) and ~/.claude/CLAUDE.md. Then the agent walks every folder from the root of the disk down to the working folder and looks in each for:
| File | Purpose |
|---|---|
WAIBEE.md | Project instructions, native format |
WAIBEE.local.md | Personal instructions, usually in .gitignore |
CLAUDE.md, CLAUDE.local.md | Instructions in Claude Code format |
AGENTS.md | A format that several agents read |
.waibee/WAIBEE.md, .waibee/CLAUDE.md, .claude/CLAUDE.md | Instructions inside the configuration directory |
Instructions in nested folders, such as src/CLAUDE.md or src/AGENTS.md, are added the first time the agent reads a file under them. After context compaction, they are added again on the next such read. During the startup load, a file with the same content as one already loaded is not added a second time. The “Instruction files” check in waibee doctor shows how many files were loaded at startup and roughly how many tokens they take, and warns you if two files declare the same ## section.
Rules from Markdown files in ~/.claude/rules/ and .claude/rules/ load in the same order: global ones first, then those from the folders from the root of the disk down to the working folder. A rule without paths in its YAML frontmatter is read at startup; a rule with paths is read the first time a matching file is read. After compaction, a rule with paths is added again on the next matching read.
A line @<path> includes the contents of another file. The reference must take up the whole line: @path in the middle of a sentence stays text. The path must contain /, start with ~/, or end in .md, .txt, .json, .yml, .yaml, or .toml; otherwise the line is read as a mention. A relative path resolves from the folder of the file that holds the reference. Includes nest up to 5 levels. A file larger than 40 KB and a circular include are replaced with a comment, and a path that does not exist stays in the text as is.
Settings (settings.json)
Section titled “Settings (settings.json)”Settings are read from four layers in this order:
- Global:
~/.waibee/settings.json, or~/.claude/settings.jsonif it does not exist. - Project:
.waibee/settings.json, or.claude/settings.jsonif it does not exist. Committed to the repository. - Local:
.waibee/settings.local.json, or.claude/settings.local.jsonif it does not exist. Personal, in.gitignore. - Managed: the organization’s read-only file:
/Library/Application Support/waibee/managed.jsonon macOS,/etc/waibee/managed.jsonon Linux,C:\ProgramData\waibee\managed.jsonon Windows.
The managed file is checked before the model, MCP servers, and hooks start. If it cannot be read, the JSON is corrupted, it holds a value other than an object, or a key has the wrong type, the launch stops with code 2. stderr shows the path and the reason. This applies in the terminal, waibee run, ACP, and waibee serve. An empty file counts as {}; a missing file does not stop the launch.
waibee doctor, waibee config check, waibee update, and waibee auth work even with a corrupted managed file and report it, so you can check and repair the environment.
For most keys, the value from the last layer that sets it wins. The exceptions:
- The
permissions.allow,permissions.granted, andpermissions.denylists are merged across all layers. Theenvandaliasesobjects are merged by key: a key with the same name comes from the last layer. - The
tuiblock is replaced as a whole if it differs from the built-in values. Theprivacy.redactblock is replaced as a whole when extra patterns ordisable_default_patterns: trueare set. trueforstorage.auto_cleanupandfiles.skip_integrity_checkin one layer is not overridden byfalsein a later one. The other way around,falseforgoal.auto_goal,audit.enabled, andupdates.checkis not overridden bytruein a later one.- If
netsec.enabledis on in one layer,falsein a later one does not turn it off. Thenetsec.blocked_domainslists are merged. - A non-empty
netsec.allowed_domainsreplaces the list from the previous layer; an empty list keeps the previous value. - A project or local
sandbox.profile: "off"does not turn off a profile enabled earlier. An explicitsandbox.profilein the managed file takes precedence over all other layers, the--sandboxflag, and theWAIBEE_SANDBOXvariable, including when the managed file setsoff. On a conflict with the flag or the variable, the agent writes one line to stderr and applies the managed value. Without a managed profile, the order is--sandbox, thenWAIBEE_SANDBOX, then the settings. sandbox.allow_writeis taken only from the global settings.sandbox.requireis on iftrueis set in the global or the managed file. The managed file can turn the requirement on but cannot lift a global one. The project and local files do not change this key.sandbox.network.allowed_domainsreplaces the previous list as a whole. A missing key keeps the previous layer’s list, and an explicit[]blocks all addresses; if no layer has the key, commands in therestrictedprofile have no network access. The list from the managed file takes precedence over all layers; an untrusted folder cannot set this key. This is a separate setting fromnetsec.allowed_domains; see The restricted profile.sandbox.network.allow_unix_socketsis replaced as a whole by the same rules;[]removes the exceptions. Path and platform restrictions are described under the restricted profile.
Only one file of each pair takes effect: .claude/settings.json is read only while there is no .waibee/settings.json next to it, and its model key is not used. The same goes for the local pair: as soon as .waibee/settings.local.json appears, .claude/settings.local.json, where Claude Code keeps personal allow rules, stops being read. The new file is created, for example, by the third answer to an approval prompt (“Allow … in this project from now on”): move the rules you need from .claude/settings.local.json into it. Hooks and MCP servers are collected differently. Hooks are read from both settings.json files of the global pair and both of the project pair, but not from settings.local.json or the managed file. MCP servers are read from every file of every layer and also from .mcp.json at the project root; .mcp.json holds no other settings. The order of the files with servers is described in MCP.
The first settings change made from the agent creates ~/.waibee/settings.json and moves into it whatever was in effect from ~/.claude/settings.json, except model. From then on, settings are read only from the new file. Hooks and MCP servers from ~/.claude/settings.json still apply.
The global directory depends on the system: ~/.waibee on macOS and Linux, %APPDATA%\waibee on Windows. To override it, set an absolute path in WAIBEE_DATA_DIR; see The .waibee directory.
Project files (.waibee/, .claude/, .mcp.json) are read only from the folder where the agent was started: parent folders are not searched. If you start the agent from a subfolder of the repository, the project settings are not picked up. waibee doctor prints what was read in this run and what was looked for and not found: the “Where servers are read from” check lists every file with MCP servers by its full path.
Some keys from the files of an untrusted folder do not take effect; see Folder trust. All keys and their allowed values are listed in the Settings reference.
With the sandbox on, changing the global, project, or local settings file on disk does not change the sandbox, permissions, or hooks of a running session. The managed policy is checked again, though; explicit changes made through the interface are applied separately. How the configuration itself is protected from commands and file edits is described in Sandbox.
Reading and changing settings
Section titled “Reading and changing settings”The Context section of /settings and the web Settings page offer context.compact_at, context.idle_compact, and context.prompt_cache. Their values are in the Settings reference.
waibee config get [key] prints every setting as section.label = value, or just the value if you give a key. waibee config set <key> <value> changes one setting:
waibee config getwaibee config get context.prompt_cachewaibee config set context.prompt_cache 1hA value outside the allowed choices is refused. A mistyped key gets a suggestion for the closest one.
Checking the configuration
Section titled “Checking the configuration”waibee config checkwaibee config check --jsonThe command prints JSON: indented for reading without --json, on one line for scripts with --json. It contains the merged settings, the layers in layers, and a preliminary sandbox check. Values of environment variables and headers, as well as detected secrets, are masked, including inside strings and hook commands.
Each layer has layer, path, and exists. The layer names are managed, user, user compatibility (~/.claude/settings.json), project and project local (one each for .waibee/ and .claude/), and project shared MCP (.mcp.json). The paths of the compatible files are listed as candidates: both being present does not mean both were read.
sandbox holds profile, the mechanism (Seatbelt or the Landlock ABI version), the verdict, and the reason the profile was chosen: managed policy (the managed file), command line or WAIBEE_SANDBOX (the flag or the variable), or settings. If a launch with this profile is impossible, the refusal field explains why.
The sandbox.outside_sandbox field lists what stays outside the sandbox: MCP servers and language servers, opening files in external programs, git operations with worktrees, internal git operations, updates, work with plugin registries, diagnostics, tools inside the agent process, and the agent’s own services. The engages value applies to child commands, not to all of these actions.
sandbox.verdict | Meaning |
|---|---|
engages | The chosen profile can restrict commands |
falls back | Commands are not restricted: the profile is off, or an optional mechanism is unavailable |
refuses | A launch with this profile is impossible |
The check does not start the model, MCP servers, or hooks. An error in the managed file is written to managed_error, and sandbox.verdict becomes refuses; the report is printed to stdout before the exit with code 2, and the error text goes to stderr, so parse stdout separately from stderr. If a required sandbox cannot be provided, the exit code is also 2. For restricted, a successful check does not guarantee that the run will start; whether the sandbox was enabled shows up in the meta of a headless run.
Memory
Section titled “Memory”The agent keeps its own memory separately from your instructions, also in Markdown:
| File | What it stores |
|---|---|
~/.waibee/memory/USER.md | Facts about you: preferences, role, style |
.waibee/memory/MEMORY.md at the root of the git repository | Facts about this project |
The agent adds to memory on its own as it works; the memory.auto key turns this off. The /memory command shows the remembered facts with their source and date and opens the files for editing. /memory add <fact> writes a fact to the project memory, and /memory add user <fact> to the memory about you.
memory.max_bytes, 2 KB by default, sets the threshold at which old automatic entries are removed; see Settings reference. What you add through /memory add or by editing the file is never pushed out and can exceed the threshold.
What goes into memory
Section titled “What goes into memory”The agent saves what will outlast the current task:
- a lasting preference: “I generally prefer short answers”;
- a direct request to remember: “remember, I use a screen reader”;
- the same thing said in different conversations about different tasks.
It does not save what only matters now: how to carry out the current task and report on it, the format of a single report, a password or token for this session, or requests to get around system rules.
Only your own words count, so an example from documentation, a line from a log, or the agent’s reply never becomes a fact about you.
The model picks the facts, so something said outright is remembered more reliably than a hint: “in all projects”, “in future conversations”, “remember”. If a fact matters, write it yourself with /memory add.
Excluding paths
Section titled “Excluding paths”A .waibeeignore file in the folder where the agent was started excludes paths from reading and search. The format is the same as .gitignore.
Some rules apply even without this file. They exclude:
.git;- keys and certificates:
*.pem,*.key,*.p12,*.pfx,*.ppk,*.jks,*.keystore,id_rsa*,id_ed25519*,.ssh/,.gnupg/; - files with credentials:
.env*(except.env.exampleand.env.sample),.netrc,.npmrc,.pypirc,.pgpass,.git-credentials,.docker/config.json,.kube/config, credentials forgh,gcloud, Azure, AWS, Terraform, and RubyGems, and macOS keychains; - agent settings that hold MCP server tokens and keys:
.mcp.json,~/.claude.json, Claude Code credentials,settings.local.jsonin.claude/,settings.jsonin~/.claude/and~/.waibee/,.waibee/state/and.waibee/secrets.json, the samesettings.json,secrets.jsonandstate/in the data directory wherever it is, and Codex files.
The agent can read the project’s own .claude/settings.json and .waibee/settings.json: they hold hooks and permission rules, and without them it cannot explain why a hook did not fire.
Secrets are excluded by default so that an instruction from an external source cannot extract them by reading a file. Your rules come after the default ones, so a line such as !.env.local makes the path readable and searchable again. The agent settings from the last item cannot be reopened this way: ! has no effect on them.
In bypassPermissions mode, the default rules for secrets are lifted, and the agent can read .env and the project’s keys. The rules in your .waibeeignore and the excluded agent settings still apply there; see Permissions.
The shell command check blocks access to secrets it can recognize, such as cat .env. It checks only against the default list, so ! in .waibeeignore does not override it. An arbitrary program can read the file some other way, and only permissions and the sandbox can restrict it.
Extension directories
Section titled “Extension directories”| Directory | What it contains |
|---|---|
.waibee/skills/ | Skills (SKILL.md) |
.waibee/commands/ | Custom slash commands |
.waibee/agents/ | Subagent definitions |
Each of them is also searched for in .claude/ and in the global ~/.waibee/ and ~/.claude/; see Skills and commands for details. Plugins are described on the Plugins page.