Configuration
| File | Holds | Shared with v1 | Scope | Read |
|---|---|---|---|---|
tui.json / tui.jsonc |
Theme, keybindings, mouse, scrolling, diff style | Yes, same keys | Global and project layers | At start |
mbm2.json / mbm2.jsonc |
v2-only settings: workspace and panel keys, terminal_padding, copy_on_select, team_auto, team_auto_open, team_auto_budget, team_wake_per_hour, team_people, team_max_extra, agy_mcp, team_checks, aliases, relay, relay_url, relay_share, resume_prompt, remote_control, recap, recap_after, prompt_suggestion, tab_stale_after, tab_blink |
No | Global and project (remote_control, team_people: global only) |
At start; /alias, /config, /team, /team share, /rc machine, /rc off and "Work to continue" write it and apply their change at once |
.mbm/workers.json / .jsonc |
Workers, pipelines | No | Project only | At start, and again after any save (open tabs follow) |
kv.json |
Small preferences the interface toggles write | Yes | Per user | At start; written on change |
mbm.json |
Runtime settings: providers, agents, permissions, MCP servers (mcp), share, and v2's todo.dir (the work log's directory, default docs/todo) ask_timeout (seconds a permission or question waits before it is rejected, 0 to 604800; unset or 0 waits for ever; see Permissions) and auto (allow_hosts: hosts an auto-mode session may send data to; roots: folders outside the project it may reach; escalate_wait: seconds an escalation waits for an answer before its hand-off, default 120, 0 at once; see Auto mode); v1 refuses a file that sets any of them |
Yes | Runtime-owned | By the runtime; /mcps → + Add server writes its mcp key |
mbm2.json[c] and workers.json[c] exist because v1 drops a whole tui.json that contains a
key its schema does not know. Keep v2-only settings out of tui.json and both clients keep
reading it (ADR 0198, ADR 0201).
Directories
| Purpose | Linux and macOS default | Override |
|---|---|---|
Config (tui.json, mbm2.json[c], themes) |
~/.config/mbm |
XDG_CONFIG_HOME (absolute) → $XDG_CONFIG_HOME/mbm; MBM_CONFIG_DIR replaces it |
State (kv.json, model and prompt history files) |
~/.local/state/mbm |
XDG_STATE_HOME |
| Data (logs) | ~/.local/share/mbm |
XDG_DATA_HOME |
On Windows the same relative paths are used under %USERPROFILE% (for example
%USERPROFILE%\.config\mbm), as v1 resolves them: v1's xdg-basedir package (5.1.0) has no Windows
branch, so it never uses %APPDATA% or %LOCALAPPDATA%, and XDG_* variables you set apply on
Windows too. The Go engine reads its configuration from the same directory and keeps its sessions in
%USERPROFILE%\.local\share\mbm\mbm2\engine; managed configuration is %ProgramData%\mbm.
Checked on a Windows Server 2022 host (2026-11-23): the engine started there under these paths and
served.
The session store
The engine keeps every session under ~/.local/share/mbm/mbm2/engine (mbm2 db path prints it).
Write nothing there by hand; mbm2 export <id> gives a session as one JSON document.
| File | Holds |
|---|---|
ses_<id>/session.json |
The session's header: its title, project, todos, jobs, recap and the list of its message files |
ses_<id>/m-000001-<checksum>.jsonl |
Its messages in order, one per line, up to 100 messages or 512 KiB a file; a save writes only the files that changed |
ses_<id>/d-<checksum>.json |
The files the session changed, with patches for the newest 16 MiB of them; a large, binary or generated file keeps its line counts only (patch too large) |
ses_<id>.json |
A session an older mbm2 stored as one document: read as it is, and moved into a ses_<id>/ folder the next time it is saved |
ses_<id>.json.bak |
That document's backup, kept until mbm2 next starts and reads the folder, then removed |
.store-version |
The store's version once mbm2 db migrate ran (2 since sessions are folders) |
tool-output/, snapshot/ |
Full outputs of long tool calls; the file snapshots undo uses |
An mbm2 older than the folder form does not see a session stored as a folder. A session has no
size limit; one message over 32 MiB cannot be saved, and mbm2 says so once, with the command that
keeps a copy (Troubleshooting).
tui.json
Later sources win, key by key; tui.jsonc wins over tui.json in the same directory.
| # | Source | Layer |
|---|---|---|
| 1 | <config dir>/tui.json, then tui.jsonc |
global |
| 2 | The file named by MBM_TUI_CONFIG |
explicit |
| 3 | ~/.mbm/, then MBM_CONFIG_DIR |
directory |
| 4 | tui.json[c] in each directory from the filesystem root down to the start directory |
project |
| 5 | .mbm/ (and legacy .synoti/) in each directory from the filesystem root down to the start directory |
directory |
The closest folder wins: a subfolder's .mbm/tui.json overrides its parent folder's, key by key,
and every project layer overrides ~/.mbm/tui.json (see Folders).
MBM_DISABLE_PROJECT_CONFIG=1 skips rows 4 and 5.
| Key | Type | Default | Notes |
|---|---|---|---|
theme |
string | mbm |
A built-in or custom theme name; also /themes |
theme_mode |
dark | light | auto |
auto |
|
keybinds |
object | — | Keybindings |
leader_timeout |
positive integer, ms | 2000 |
|
scroll_speed |
number | — | Used when acceleration is off |
scroll_acceleration |
{ "enabled": bool } |
— | |
diff_style |
auto | stacked |
auto |
|
mouse |
bool | true |
MBM_DISABLE_MOUSE=1 forces it off |
force_truecolor, force_unicode |
bool | — | |
plugin, plugin_enabled |
— | — | Ignored with one warning; TUI plugins are dropped in v2 |
copy_on_select |
bool | — | Legacy here; read with a warning. Put it in mbm2.json[c] |
| Problem in a file | v2 | v1 |
|---|---|---|
| Unknown top-level key | Kept, warned about; the file still loads | Whole file ignored |
Unknown binding name in keybinds |
That entry is ignored with a warning | Whole file ignored |
| Known key with the wrong type | That file is skipped and logged; other files still apply | Whole file ignored |
| JSON syntax error | That file is skipped; the log names the line and column | Whole file ignored |
Values may use {env:NAME} (empty when unset) and {file:path} (file contents; empty when missing).
theme, keybinds and tui in mbm.json
v1 once read theme, keybinds and a tui object from mbm.json. At each start, before reading
tui.json, mbm2 moves them out as v1 does: for every mbm.json[c] it reads (the global one, each
folder from the filesystem root down to the start directory, each .mbm/, ~/.mbm/,
MBM_CONFIG_DIR and the file MBM_CONFIG names) that has them and has no tui.json beside it, it
writes that tui.json, keeps a copy as mbm.json.tui-migration.bak and removes the three keys from
mbm.json, keeping its comments. From tui only scroll_speed, scroll_acceleration and
diff_style move. A toast names each move:
Moved theme, keybinds and tui from …/mbm.json to …/tui.json (backup: …/mbm.json.tui-migration.bak).
A folder that already has a tui.json is left alone, so the move happens once.
mbm2.json[c]
{
// ~/.config/mbm/mbm2.jsonc, or <project>/.mbm/mbm2.jsonc
"copy_on_select": false,
"team_auto": true,
"team_auto_budget": 50,
"relay": true,
"aliases": { "учшэ": "exit", "ёүиэшигу": "continue", "cfg": "config" },
"keybinds": {
"workspace_board": "<leader>p", // a workspace chord: <leader> + one key
"pricing_panel": "ctrl+alt+o", // a panel key: any key
"rag_panel": "none" // or no key at all
}
}
| Key | Type | Default | Effect |
|---|---|---|---|
terminal_padding |
integer, 0–8 |
2 |
Empty columns on each side of a terminal tab. 0 disables padding. The program gets twice this many fewer columns (at least one column remains), and drag-to-copy excludes the padding. /config → Terminal padding updates open tabs immediately. |
copy_on_select |
bool | on (off on Windows) | true: releasing a mouse drag copies the selection. false: the selection stays; a right mouse-down or ctrl+c copies it. v1's MBM_EXPERIMENTAL_DISABLE_COPY_ON_SELECT (true/1 off, false/0 on) decides before this key |
team_auto |
bool | true (since 2026-11-27; it was false) |
true: team messages between workers are delivered without waiting for your approval; false holds each one for you («✉ N waiting» on the tab bar, /team to deliver them) (Teamwork); a in /team and /config → Team auto write it to the file that decides it (the project file when it sets the key, else the global one) |
team_auto_open |
bool | true |
true: a store wake (the inbox watcher, mbm2 team send --wake) for a member whose tab is closed opens the tab in the background in the window that holds the member's project, and delivers the wake as a team message; no window, or false: the wake runs headless (a Claude tab then waits in its inbox). Not team_auto, which decides whether the message needs your return. /team autoopen on|off and /config → Auto-open worker tabs write it; the engine reads it again within half a minute |
team_checks |
array of strings | none | Commands a lead's merge_task runs in the project after bringing a delegated task in, each with a 10-minute limit; the results are in the confirm. The project file's list replaces the global one. See Let a lead split the work |
team_auto_budget |
number | 500 (20 until 2026-11-27) |
How many team messages auto mode delivers between two of your actions, 1 to 1000. When it runs out /team asks: Continue (+N), Set limit… (saves a new value here) or Stop. /config → Team auto budget sets it. The engine applies it too, to the messages and wakes it gives a session no window shows between two of a person's prompts |
agy_mcp |
"persist" or "settings" |
"persist" |
How an agy tab gets the team's MCP server: with agy mcp add under the worker's own name before the tab starts and agy mcp remove when it closes, or through the run's --settings file (agy 1.5.17 refuses that) |
team_wake_per_hour |
number | 30 |
How many turns the engine wakes unattended workers for in a rolling hour (mbm2 send to an auto session, the inbox watcher, mbm2 team send --wake), 1 to 1000; the woken sessions' judge calls are capped at the same number. Past it a hand-off waits for the next pull. See Agent teams |
team_max_extra |
number | 4 |
How many extra workers a lead's delegate_task to new:<agent> may have open at once, 0 to 100; 0 opens none. At the cap the delegation is refused with «the team has 4 extra workers open (max 4): wait for one, or raise team_max_extra». The one copy per member is unchanged. /config → Team extra workers sets it; applies at once |
team_people |
array of <team>/<role> |
none | The team roles that are people: a reply such a role writes to an auto-mode escalation's hand-off may allow a permission. Global file only; mbm2 team people add <role> writes it at a terminal; a role set up on this host never counts |
relay |
bool | true |
false: this mbm2 never connects to the agent relay, so no external agent can message it (Agent relay) |
relay_url |
string | https://tui.mbm.mn/relay |
The relay's base URL, an http or https URL; peers connect to <relay_url>/mcp |
relay_share |
bool | true |
false: your other mbm2s (same account) neither list this one as a peer nor message it, and it lists none of them; token peers still work. /team share off and /team share on write it (Agent relay) |
resume_prompt |
"ask" or "off" |
"ask" |
"ask": when mbm2 starts and the runtime reports unfinished work in the project, the Work to continue dialog offers it (Continue unfinished work). "off": never. d in that dialog writes "off" into the project file |
remote_control |
"always" or "session" |
"session" |
"always": every start of mbm2 enables this machine in mbm code at tui.mbm.mn/code, where your signed-in account reaches all its sessions (Remote control). "session": only /rc links one session. /rc machine writes "always", /rc off and a turn-off at tui.mbm.mn remove it. Read from the global file only: a project's file cannot set it |
recap |
bool | true |
true: when you come back to a session that worked while you were away (the terminal regains focus, or you switch to its tab) a short recap is drawn at the end of the transcript (Recap when you come back). false: only /recap writes one. /config → Recap on return writes it and applies it to the tab at once |
recap_after |
number | 5 |
Minutes away, 1 to 1440, before a return asks for a recap |
prompt_suggestion |
bool | true |
true: when a turn you started ends, the engine asks the small model (small_model, else the session's own) for one short next message in the language of your last one, and the empty prompt shows it as dim text: tab takes it, enter sends it, any typed key dismisses it (Prompt). false: no request is made. /config → Prompt suggestion writes it; the engine reads it at the end of each turn |
tab_stale_after |
number | 3 |
Minutes, 1 to 1440, a working tab may go without an event of its session before the tab bar and /activity mark it stale (◌) |
session_rotate_after |
number | 50000 |
Tokens a team member's session may still hold after an automatic compaction before mbm2 replaces it with a new session (the old one stays in history); 0 turns rotation off; main is never rotated |
notify_terminal |
"on", "off" or bool |
"on" |
"on": when something new needs you — a permission, question or escalation of any session, or the team's work — and the window is not focused, mbm2 asks the terminal for a desktop notification (OSC 9; OSC 777 in Windows Terminal, rxvt, foot, WezTerm and Ghostty); the text is the item's redacted line. "off": never. /needs notify on|off writes it |
tab_blink |
bool | true |
true: a tab behind another blinks its number and name when it needs you — a permission or question waits (warning colour), its session reported an error (warning), or its turn ended and you have not looked at it yet (its agent colour) — until you go to it; a working tab only spins. false: no tab blinks. /config → Tab blink writes it and applies it at once (Workers) |
aliases |
object | {} |
{"<alias>": "<target>"}. A prompt that is exactly an alias (letters in any case, a chain followed) is read as its target, so учшэ quits like exit, and /<alias> args runs /<target> args. A prompt holding pasted or file parts is never rewritten. /alias exit=учшэ adds one, /alias lists them, /alias -учшэ removes it; the project file wins alias by alias |
keybinds |
object | defaults in Keybindings | The sixteen workspace_* chords ("<leader>" + one key) and the six panel keys rag_panel, packages_panel, pricing_panel, config_panel, plugins_panel, admin_panel (any key, or "none") |
$schema |
string | — | Ignored |
| Rule | Detail |
|---|---|
| Files | <config dir>/mbm2.jsonc or mbm2.json (global), then the closest .mbm/mbm2.jsonc or .mbm/mbm2.json walking up (project) |
| Precedence | Project wins key by key (aliases: alias by alias) |
| Strict | Any other key, a value of the wrong type, team_auto_budget or team_wake_per_hour outside 1-1000 or not whole, a team_people that is not an array of <team>/<role> names, a team_checks that is not an array of non-empty strings, a relay_url that is not http(s)://host…, a resume_prompt other than "ask" or "off", a remote_control other than "always" or "session", an agy_mcp other than "settings" or "persist", a recap_after that is not a whole number from 1 to 1440, an alias with an empty side or one that leads back to itself, a bad or duplicate chord: that file is skipped with a log entry (mbm2 config); the other file still applies |
| Writes | Every write from the client keeps the file's comments and other keys, validates the whole result and replaces the file atomically; an invalid result is refused and the file is left as it was |
copy_on_select order |
MBM_EXPERIMENTAL_DISABLE_COPY_ON_SELECT, then mbm2.json[c], then a legacy tui.json value, then on (off on Windows) |
Error in the log (mbm2 config) |
Fix |
|---|---|
theme: unknown key |
theme belongs in tui.json |
team_auto_budget: expected a whole number from 1 to 1000 |
Use for example 50 |
relay_url: expected an http or https URL |
Write the scheme: https://tui.mbm.mn/relay |
aliases.x: leads back to itself |
Remove one link of the cycle (a→b, b→a) |
keybinds.workspace_open: expected "<leader>" followed by one key, such as "<leader>tab" |
A chord is the leader and one key, no spaces or commas |
keybinds.pricing_panel: expected a key such as "ctrl+alt+i", or "none" |
A panel key may not be empty |
workers.json[c]
Project-only, never merged with a parent project. Top-level keys workers, pipelines, layouts, lead
and $schema. layouts is reserved for the Split view's named layouts and not used yet: a file with
layouts loads, and the start toast, /config and the save toast say
layouts: reserved, not used: named layouts arrive with the Split view; the workers load. Worker
fields name, kind, agent, model, command, args, cwd (either kind: the folder a terminal
runs in or a session works in, relative to the project), env, open_on_start, team_submit,
lead (either kind; true on at most one worker makes it the team's
lead, which /team lead <worker> writes for you; the top-level "lead": "main" makes the person the lead
from the main tab, and a worker cannot lead as well: /team lead main writes it), mode (a session worker's
permission mode, ask, auto
or plan; see Auto mode), under (either kind: the team role it helps,
whose folder it runs in unless cwd says otherwise).
In a team's project (.mbm2/team) the workers are the team's roles (one tab per card, in the role's folder) plus the
extra workers of .mbm2/team/workers.json (the team's), the project's .mbm/workers.json and, merged with a
note, a role folder's or a sub-folder's own file; mbm2 worker consolidate makes them one
(Workers → A team's project).
// <project>/.mbm/workers.jsonc
{
"workers": [
{ "name": "planner", "kind": "session", "agent": "plan" },
{ "name": "builder", "kind": "session", "agent": "build", "model": "deepseek-work/deepseek-chat", "open_on_start": true },
{ "name": "tests", "kind": "terminal", "command": "go", "args": ["test", "./..."], "cwd": "." },
{ "name": "claude", "kind": "terminal", "command": "claude", "team_submit": true }
],
"pipelines": [ { "name": "plan-then-build", "steps": ["planner", "builder"] } ]
}
The client follows this file while it runs: after each key, paste or editor hand-back it checks the
file's size and time and re-reads it when they changed. A renamed worker renames its open tab, a
new worker opens, a removed idle worker's tab closes (a working one stays until you close it), and
a toast names each change, for example
workers.json: renamed designer to architect; opened reviewer; closed tester. A rejected file
changes nothing. Field rules are in Workers; ready-made files in the
Configuration cookbook. The model id deepseek-work/… above is a
second account (Connect).
Server Defaults (server In The Global mbm.json)
{ "server": { "port": 4096, "hostname": "0.0.0.0", "mdns": true, "mdnsDomain": "dev.local", "cors": ["https://app.example.com"] } }
mbm2 serve and mbm2 web take each network option's default from the server block of the
global config (config.json, mbm.json, mbm.jsonc in the config directory, merged in that
order); mbm2 acp takes port. A project's mbm.json does not set them, as in v1.
| Rule | Detail |
|---|---|
| A flag wins | --port, --hostname, --mdns/--no-mdns, --mdns-domain given on the command line beat the block |
cors |
The block's origins, then each --cors |
mdns without hostname |
Listens on 0.0.0.0, as --mdns does |
| A taken port | Falls back to a free one only when neither --port nor server.port set it |
| A field of the wrong type, or another key | Printed as mbm2: <file>: server.<field>: expected …: ignored; the rest still applies |
Providers And Models (provider In mbm.json)
A provider that speaks the OpenAI chat API, with a model that thinks:
{
"provider": {
"local": {
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "http://127.0.0.1:8080/v1", "apiKey": "…" },
"models": {
"think": {
"reasoning": true,
"options": { "store": false },
"variants": { "max": { "reasoningEffort": "max" }, "low": { "disabled": true } }
}
}
}
}
}
| Model key | Meaning |
|---|---|
reasoning |
true: the model thinks; it gets the reasoning variants v1 gives its package (/variants): low, medium, high for an OpenAI-compatible one, OpenAI's tiers for @ai-sdk/openai and OpenRouter's GPT models, none too for Groq |
options |
Sent with every request to this model, as body fields (reasoningEffort is written reasoning_effort) |
variants |
Merged over the generated ones by name: a new name adds one, "disabled": true removes one. The variant you pick with /variants (or an agent's variant, or mbm2 run --variant) is sent the same way as options, over them |
More keys of a provider, and of a model, all read as v1 reads them:
{
"provider": {
"router": {
"npm": "@openrouter/ai-sdk-provider",
"options": { "apiKey": "…", "timeout": 120000, "chunkTimeout": 30000, "setCacheKey": true,
"headers": { "HTTP-Referer": "https://example.com" } },
"whitelist": ["openai/gpt-5", "anthropic/claude-sonnet-4"],
"models": {
"openai/gpt-5": { "reasoning": true, "cost": { "input": 1.25, "output": 10 },
"limit": { "context": 400000, "output": 128000 }, "headers": { "X-Title": "mbm2" } }
}
}
}
}
| Provider key | Meaning |
|---|---|
npm |
The package the provider speaks. mbm2 calls @ai-sdk/openai-compatible, @ai-sdk/openai, @openrouter/ai-sdk-provider, @ai-sdk/xai, @ai-sdk/groq, @ai-sdk/cerebras, @ai-sdk/togetherai, @ai-sdk/deepinfra, venice-ai-sdk-provider and ai-gateway-provider; any other (Anthropic, Google, Bedrock, …) shows Provider not loaded: <id>: this engine does not speak <npm> and is not listed |
options.baseURL / api |
Where requests go; a known provider and the packages above have a default, @ai-sdk/openai-compatible needs one (… it names no options.baseURL) |
options.apiKey, env |
The key, else a stored key, else the first variable of env that is set |
options.timeout |
Milliseconds a whole request may take; unset or false: no limit |
options.chunkTimeout |
Milliseconds to wait for each piece of a streamed answer; a late one ends the reply with SSE read timed out |
options.setCacheKey |
true: the session id is sent as the prompt cache key (always for openai) |
options.headers |
Sent with every request |
whitelist / blacklist |
Only these models / never these models, also for a stored account of that provider |
models |
Added to the provider's known models (a known provider lists its models.dev models once it has a key); a provider with none shows … it lists no models |
| Model key | Meaning |
|---|---|
id |
The id sent to the provider, when it differs from the key |
cost |
input, output, cache_read, cache_write per million tokens: the session's cost uses them |
limit |
context, input, output tokens |
headers |
Sent with this model's requests, over the provider's |
tool_call, temperature, attachment, modalities |
What the model accepts; temperature: false sends no agent temperature |
enabled_providers (only these) and disabled_providers (never these) choose which providers are
used at all, mBm and stored accounts included: a provider left out is not in /models or
/connect (Hide providers).
Engine Settings In mbm.json
{
"tool_output": { "max_lines": 500, "max_bytes": 20000 },
"auto_commit": true,
"instructions": ["docs/rules/*.md", "https://example.com/team-rules.md"],
"formatter": { "prettier": { "disabled": true }, "mdfmt": { "command": ["mdfmt", "-w", "$FILE"], "extensions": [".md"] } },
"lsp": { "gopls": { "command": ["gopls"] } },
"share_base_url": "http://build-box:4096"
}
| Key | Meaning |
|---|---|
tool_output.max_lines, max_bytes |
How much of a tool's output the model reads (default 2000 lines, 51200 bytes). A longer output is saved to a file and the model is told where |
auto_commit |
true: after each reply, git add -A and git commit -m 'auto: session closed' in the session's folder. Only inside a git repository; nothing is pushed |
instructions |
More instruction files (globs, ~/…) and http(s) URLs. A URL is fetched once per message (5 s, two retries); one that fails is shown once as Instructions not loaded from <url>: <reason> and skipped |
formatter |
Unset or false: no formatter. true: the built-in formatters (gofmt, prettier, ruff, rustfmt, shfmt, … 26 in all) run on each file the agent writes, each when its program is installed and the project uses it. An object turns them on with changes: "<name>": {"disabled": true} turns one off, {"command": [... "$FILE"], "extensions": [...]} adds your own. /status lists them. prettier, biome and oxfmt run from the project's node_modules/.bin; mbm2 installs nothing |
lsp |
mbm2 runs no language server: the sidebar and /status say LSP is not run by this engine and list the servers this object names as not running |
small_model |
provider/model for titles, /recap and auto mode's judge; unset, they use the session's model. A model the catalogue does not have is shown once as small_model <id> is not in the model catalogue: titles and recaps use the session's model, and the session's model is used (v1 fails the title instead) |
logLevel |
DEBUG, INFO (default), WARN or ERROR: what the engine process logs. Read at start |
watcher.ignore |
Patterns v1's file watcher skips. mbm2 watches only the repository's HEAD, so the branch the interface shows follows a switch of branch; ".git" (or the git directory's path) in this list turns that off. Other patterns apply to v1's experimental project watcher, which mbm2 does not run. Read at start |
experimental.continue_loop_on_deny |
true: dismissing a question does not end the reply; the agent is told and goes on. A plain reject never ends it; «Reject & stop» always does |
experimental.primary_tools |
Tools only primary agents call, such as ["edit"]: a subagent started by task is not offered them |
experimental.openTelemetry |
Not supported: mbm2 exports no telemetry, and true is shown once as experimental.openTelemetry is not supported by the mBm engine: no telemetry is exported |
share_base_url |
Shares become links into your own mbm web UI, <url>/<folder in base64url>/session/<id>, and nothing is sent to the share service (also MBM_WEB_URL; MBM_WEB_UI_BASE adds a path). Read at each share, so a reload applies it |
cleanup.retention_days |
Read from the global file only (~/.config/mbm/config.json, mbm.json, mbm.jsonc), as v1: each start of the engine deletes the sessions (with their subagent sessions) not updated for this many days. Default 30; 0 keeps every session. mbm2 db cleanup uses the same number and does not start a sweep of its own first. A global file that does not parse counts as 30 |
Besides AGENTS.md (or CLAUDE.md), mbm2 reads AGENTS.local.md and CLAUDE.local.md from the
folder up to the repository root, so a private note (or a team role's start block) kept out of git
reaches the agent without an instructions entry. v1 reads them only when instructions names
them. MBM_DISABLE_PROJECT_CONFIG=1 turns all project files off.
MCP Servers (mcp In mbm.json)
MCP servers are runtime configuration, but /mcps → + Add server writes them for you: to the
project's mbm.json[c] (or .mbm/mbm.json[c]) when the directory is a git project and you choose
Current project, else to the global one. Comments in the file are kept.
{
"mcp": {
"files": {
"type": "local",
"command": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/home/you/src"],
"environment": { "LOG_LEVEL": "info" },
"enabled": true
},
"docs": {
"type": "remote",
"url": "https://mcp.example.com/mcp",
"headers": { "Authorization": "Bearer <token>" },
"oauth": false
}
}
}
| Field | local |
remote |
|---|---|---|
command |
required, an array: the program and its arguments | — |
environment |
optional object of strings | — |
url |
— | required, a URL |
headers |
— | optional object of strings |
oauth |
— | optional: absent or false for none, {} for dynamic client registration, {"clientId": "…", "clientSecret": "…"} |
enabled |
optional bool | optional bool |
Step by step with the form or pasted JSON: Configuration cookbook.
Unverified: the runtime's full mcp schema beyond these fields (for example timeout) — the
editor keeps such keys but does not show them.
Folders: Which .mbm Wins
Every file that applies to a directory is read, and a later one wins, key by key (objects merge,
other values and arrays are replaced). For mbm.json the runtime reads, lowest first:
| # | Source |
|---|---|
| 1 | ~/.config/mbm/config.json, mbm.json, mbm.jsonc |
| 2 | MBM_CONFIG |
| 3 | ~/.mbm/mbm.json[c], then MBM_CONFIG_DIR/mbm.json[c] |
| 4 | mbm.json[c] in each folder of the repository, root first |
| 5 | .mbm/ (then legacy .synoti/) in each folder of the repository, root first, the working directory's last |
| 6 | MBM_CONFIG_CONTENT, then the managed configuration |
Outside a git repository the walk is the working directory alone. tui.json and themes follow the
same rule, walking up to the filesystem root.
repo/.mbm/mbm.json {"model": "mbm/a", "compaction": {"auto": false}}
repo/services/api/.mbm/mbm.json {"model": "mbm/b", "compaction": {"prune": true}}
A session in repo/services/api/ gets model mbm/b and compaction {"auto": false, "prune": true}; one in repo/ gets mbm/a.
This is a deliberate v1 difference (row 7.149): v1 let the farthest folder's .mbm win and read
~/.mbm and MBM_CONFIG_DIR after every project folder, so a project could not override them.
Permissions (permission In mbm.json)
Each key of permission is a tool's permission (bash, edit, read, webfetch, …, or *); its
value is one action ("ask", "allow", "deny") or an object of patterns, each with its action.
For a call the runtime takes the last rule that matches, in the order the file writes them:
{
"permission": {
"bash": {
"*": "ask", // every command asks…
"git status*": "allow", // …except these two, written after it
"git push*": "allow",
"*deploy*": "deny" // and anything naming deploy is refused, even a git push
}
}
}
| Order rule | Effect |
|---|---|
| Inside one object | Later keys win: put the broad "*" first and the exceptions after it |
| Across files | Each file's rules follow the rules of the files before it (Folders): the global file's first, the repository root's .mbm, then a subfolder's, so a subfolder's rule decides. mbm.jsonc follows mbm.json in the same directory. v1 merged the files and kept a key both wrote at its first position |
tools (legacy "bash": false) |
Read before permission; any permission rule wins over it |
read_only_commands (v2's, true by default) |
Not a rule: "read_only_commands": false makes read-only shell commands (ls, cat, git status, …) ask like any other; by default they run without asking unless a rule naming them asks (Read-only commands) |
default_mode (v2's, "auto" by default) |
Not a rule: the permission mode — "ask", "auto" or "plan", never "trust" — a session works in when it names none; a session set with /mode keeps its own (Auto mode) |
trust_asks (v2's, empty by default) |
Not a rule: a list of command patterns ("make deploy*", "./scripts/release*") checked on initial evaluation in Trust Mode. In v2.19.92 this does not guarantee per-request approval (Trust mode) |
waive (v2's, empty by default) |
Not a rule: the checks «Allow always» waived, {"<kind>": {"<key>": ["<pattern>", …]}} — a guardrail's name (impersonate, force-push, …), write-outside or trust-asks:<pattern> — for the calls a pattern matches; written by «This project» on a request that asked because of that check. Credentials are never waived and a deny still denies. An agent file keeps its own in the frontmatter's waive |
Order changed in this release (row 7.104): the runtime used to sort each object's keys, so a
"*": "ask" written last sorted to the front and the rules before it still applied. It now keeps
the file's order, as v1 does, so a "*" written last overrides everything above it. If a command you
had allowed starts asking again, move the "*" line to the top of its object.
You rarely need to write these by hand: on a permission prompt, Allow always → This project (permanent) adds "<pattern>": "allow" for the pattern its Keeps … line shows (for a folder, you can
widen it to its parent or to *) to this project's .mbm/mbm.jsonc (when it exists) or .mbm/mbm.json
— the closest one up to the repository root, else the root's, created when absent — after the rules
already in that object, keeping comments, order and spacing; it never overwrites a deny
(Permissions).
An edit applies while the runtime runs, in the directory it was made for and in every other
directory a session works in (row 7.132): about a fifth of a second after you save the global or a
project mbm.json[c], the next tool call is checked against the new rules, even inside a running
reply. A prompt already waiting is answered by the edit when it decides it — a new allow lets the
call run, a new deny refuses it ("a config rule now denies this"). A tool that changed a file the
runtime does not watch can ask for the read with POST /instance/reload?directory=<absolute path>.
kv.json
<state dir>/kv.json is written by the interface, not by hand. Both v1 and mbm2 lock it before
each write and merge their one change, so the two clients can run side by side.
| Key (examples) | Written by |
|---|---|
sidebar, timestamps, thinking_visibility, animations_enabled, tips_hidden |
Palette toggles |
share_consent |
The first /share confirm |
panels.<name> |
/config → Panels (false hides a panel) |
workspace:<project> |
Open worker tabs, focus and the split, for restore |
workspace-board:<project> |
Task board |
The Config Hub And Setup
/config opens the settings hub; /setup walks Provider → Model → Workers →
Theme, and esc skips a step. Both are v2 additions to v1's slash commands.
Pages stack: return on a row opens its page or dialog with the hub kept beneath it; a page with
a page under it shows back esc on its last row, and esc goes back one level. An action on a
page (a toggle, a write) redraws the same page on the same row. esc on the hub closes it.
| Hub row | Opens | Writes |
|---|---|---|
| Workers | Configured workers; Add … for each primary agent, claude (when on PATH) and shell, each asking Worker name first; Edit the file |
<project>/.mbm/workers.json; an added worker's tab opens at once |
| Providers, Model, Agent, Theme, MCP servers | The /connect, model, agent, theme and /mcps dialogs |
What those dialogs write (runtime calls, kv.json, mbm.json's mcp) |
| Workspace keys | The fifteen workspace chords; choose one, then press the key to use after the leader | Global mbm2.json[c] |
| Copy on select | Toggle; the row shows where the value in force comes from | mbm2.json[c] |
| Team auto | Toggle, the same switch as a in /team; the running workspace follows at once |
team_auto in the mbm2.json[c] that decides it |
| Auto-open worker tabs | Toggle: team_auto_open, on by default |
team_auto_open in the mbm2.json[c] that decides it; the engine follows within half a minute |
| Team auto budget | A number prompt with the value in force (default 20); anything but a whole number from 1 to 1000 is refused with Team auto budget is a whole number from 1 to 1000 |
team_auto_budget in the mbm2.json[c] that decides it; applies at once |
| Team extra workers | A number prompt with the value in force (default 4); anything but a whole number from 0 to 100 is refused with Team extra workers is a whole number from 0 to 100 |
team_max_extra in the mbm2.json[c] that decides it; applies at once |
| Recap on return | Toggle; the row shows recap in force and recap_after (on (default), after 5 min away) |
recap in the mbm2.json[c] that decides it; this tab follows at once, other tabs on their next start |
| Prompt suggestion | Toggle; the row shows prompt_suggestion in force (on (default)) |
prompt_suggestion in the mbm2.json[c] that decides it; the engine reads it at the end of the next turn |
| Tab blink | Toggle; the row shows tab_blink in force (on (default): a tab behind blinks when it needs you) |
tab_blink in the mbm2.json[c] that decides it; every tab follows at once |
| Panels | Each gated panel's state and your preference | panels.<name> in kv.json |
| Runtime config status | The runtime's configuration sources, errors and a reload, when the runtime reports them; otherwise Config status is not available: <reason> |
Nothing on the client |
| Package & features, Pricing, Plugins, Account | The /package, /pricing, /plugins and /account panels |
As those panels |
| tui.json settings | v1 keys for one scope (Global or Project), with the value there and the value in force; booleans toggle, enums cycle, text opens an input; Keybindings lists all 151 bindings | That scope's tui.json[c] |
| Workers file (raw), tui.json (raw) | The file in $VISUAL/$EDITOR, created as {} when missing; with neither set, the built-in editor below |
Validated on return or on ctrl+s; a problem is named and nothing invalid is applied |
The built-in editor
When neither $VISUAL nor $EDITOR is set, a raw row opens the file in mbm2's own editor over
the whole screen: the path (and (modified)) on the first row, the text with line numbers, a
status row Ln l, Col c and the key row ctrl+s save · esc cancel.
| Key | Does |
|---|---|
| Typing, paste | Inserts at the cursor |
Arrows, home/end, word moves, selection, undo/redo, deletes |
As in the prompt |
return / tab |
A new line / two spaces |
pgup / pgdown |
Move a page |
ctrl+s |
Checks the text the way the loader would; a problem shows as line:column message and nothing is written; otherwise the file is replaced atomically and the toast says Saved <path> |
esc, ctrl+c |
Close; with unsaved changes it first asks Discard changes? y discard · n keep editing |
Example: fix a broken workers file without leaving mbm2. /config → Workers file (raw),
correct the line the status row names, ctrl+s; the open tabs follow the saved file.
Example: turn the mouse off for this project only.
/config→ tui.json settings. The first row readsScope: global (switch to project); choose it to switch to the project file.- Each row is a v1 key with its value in that file (
not set herewhen absent) and, when another file wins,· in force: <value> from <directory>. - Choose
mouse: a boolean toggles. The project file (the closesttui.json[c]walking up, else a newtui.jsonin the project directory) now holds"mouse": false. - Restart
mbm2.
| Write rule | Detail |
|---|---|
| Comments and order | Kept: only the edited key changes |
| Validation | The whole file is validated before it is written; an invalid result is refused |
| Atomic | Written to a temporary file, then renamed |
| Outside edits | A tui.json changed since the page opened is not overwritten; reopen the page |
| An empty text value | Removes the key from that scope |
| When it applies | tui.json edits, workspace key changes and copy_on_select (read once at start) apply on the next start, and the toast says so; workers, team auto, the budget and aliases apply at once |
| Runtime settings | Providers and agents stay with the runtime; only /mcps writes mbm.json, and only its mcp key |
Planned: live apply of every tui.json setting without restart, and a diff dialog for outside
edits (today the page refuses and asks you to reopen it).
Published from revision f88fc66f 2026-11-30