bots.json Configuration
~/.botmux/bots.json is the bot configuration file. It is an array, and each entry is one bot. Each bot runs in its own daemon process.
larkAppId and larkAppSecret are all you need to get started. Every other field is optional; add them as you need them.
How to change the config
All three ways edit the same bots.json. Use whichever is handy:
To create your first bot, run botmux setup. It walks you through it and writes this file for you.
File location: the path in the
BOTS_CONFIGenvironment variable if set, otherwise~/.botmux/bots.json.
This page covers per-bot settings only. Machine-wide switches such as auto-update, idle cleanup and the global layer of session environment variables live in ~/.botmux/config.json; see Global settings.

Examples
Minimal config:
Two bots, one on Claude Code and one on Codex:
Want to do X → which field
Required
The optional brand says which platform the app belongs to: feishu (default, Feishu in China) or lark (international Lark). API hosts and authorization links follow it. botmux setup detects it and writes it for you. A bot is bound to one tenant; to switch platforms, set up another bot.
CLI and model
Per-group default model for new topics
groupDefaultModels lets one bot default to different models in different groups:
The easier route is Dashboard "Group Management → New topic default model", per bot. No restart needed after saving.
- A new topic records the group model at creation time. Later changes to the group setting only affect new topics; existing topics keep their model across restarts and resumes.
- Each CLI is recorded separately, so a topic that switches CLI won't pass a Claude model name to Codex.
- Priority: model given explicitly at trigger time > the group model recorded by the topic > the bot model for the same CLI > the CLI's own default.
- DMs, group-wide shared sessions in regular groups, and adopted external sessions don't use this setting.
TraeX native subagents (nativeSubagentRuntime)
This only affects new subagents created by TraeX's native spawn_agent, not the parent agent. model and reasoningEffort are each optional:
- Leave one out: the value from the subagent request is passed through.
- Set it to
{ "mode": "custom", "value": "..." }: always use that value. - Leaving both out: delete the whole field.
inheritis not a valid mode.
Switching to another CLI removes this field automatically.
Quota CLI / model switch
With quotaFallbackChain, when a session hits a quota limit the same bot moves it, in place, to the next CLI and model and continues the interrupted request. The chain starts from the bot's own cliId and model and walks steps in order.
Good to know:
- A rate limit without a reset time (e.g. a bare 429) is first retried on the same CLI 5 times, with the delay doubling from 30 seconds; a limit with a reset time or a quota error code switches at once.
- A model change on the same CLI resumes the native conversation. A CLI change starts a new native conversation whose first message is a handoff: read the previous CLI's session file, then the topic with
botmux history, check the working directory, and continue the interrupted request from where it stopped. - The continued request runs as its original sender and replies in the original topic; a notice is posted once the switch is done. When the switch cannot start (for example a newer message is already waiting, or the original sender is unknown), the usual owner notice and backup-bot handoff happen instead.
- A different CLI starts with its own local sign-in and without this bot's
env. The chain cannot return to a CLI it has left. - A session only moves forward and never switches back; it stays on its step across daemon restarts. New sessions start from the bot's own configuration.
Quota handoff
With quotaFallbackBot, when the current CLI is confirmed to be out of quota, the daemon really @-mentions a backup bot in the original session so it can take over. It doesn't call the exhausted model again and leaves the existing quota notice card alone.

Good to know:
- The backup bot must be configured on this machine and actually be in the group right now. Bots on other machines, the bot itself, and bots not in the group are skipped.
- Group sessions hand off in the original group, topic sessions in the original topic. The backup bot reads the history itself.
- One handoff per source bot and quota type every 5 minutes. A daemon restart doesn't replay old handoffs.
- Saving checks the handoff chain and rejects handing off to itself or loops like
A → B → C → A. If a hand edit introduces a loop,botmux start/restartskips the bots in the loop and starts the rest; the Dashboard flags them and lets you fix them under "Advanced → Quota-limit handoff".

Codex-compatible distributions
Some CLIs are independent distributions of Codex: same flags, interaction, session resume and login, but a different binary and release line. They don't need a new cliId. Keep cliId: "codex" and describe the distribution with cliRuntime:
The easier way: in Dashboard "Bot Config → Common → Agent config", pick "Custom Compatible", fill it in and save (that's the screenshot at the top of this page).
Notes:
cliRuntimeonly supportscliId: "codex"for now and can't be combined withwrapperCli.- When writing it by hand, also set a
cliPathOverrideidentical toexecutable(as above). It lets an older botmux downgrade safely; missing or different values fail validation. The Dashboard writes it for you. - Old configs with only
cliPathOverridekeep working. The Dashboard shows them as read-only compatibility mode and can migrate them to "Custom Compatible". - Each session remembers the distribution it started with. Changing only the model affects new sessions; switching CLI, distribution or wrapper closes active sessions still on the old launch identity, so they never resume on the wrong binary.
GLM / third-party providers
To run one bot on GLM Coding Plan (or another Anthropic-compatible provider) while another stays on official Claude, give the first one an env:
- For the GLM China site use
https://open.bigmodel.cn/api/anthropic. - For OpenAI-protocol CLIs such as Codex, set
OPENAI_BASE_URL/OPENAI_API_KEYinstead. - Each bot's
envonly goes into its own sessions and never leaks to other bots. - Values are stored in plain text in
bots.jsonand the process environment; this is not a secret vault. Config queries in Feishu are masked, the Dashboard masks by default, and only the local owner can reveal the raw value. - Changes apply to new sessions.
For more (global layer, removing a variable, strict inheritance) see Session environment below.
Clean Codex App input (experimental)
By default botmux combines context such as the sender and attachment paths with the user's text before sending it to Codex App, so the user message in the App looks cluttered. With codexAppCleanInput on, the App shows only what the user wrote, and the context goes through the hidden additionalContext instead.
Or in the config:
- Only applies to botmux-managed sessions actually running
codex-app; external sessions taken over with/adoptare unaffected. - Needs Codex CLI
>= 0.135; older or unrecognized versions fall back to the combined prompt. - If Codex App explicitly rejects the experimental fields, botmux retries once the old way and turns clean mode off for that run. Network errors, timeouts and the like are not retried, to avoid running a task twice.
- Takes effect from the next message dispatched to Codex. Queued or running messages and existing history are not rewritten.
- This only tidies up what the App shows. It is not privacy scrubbing: the context may still be in the raw session records.
Codex App browser bridge (experimental)
When botmux runs Codex over the app-server protocol, it doesn't get Codex App's built-in Chrome tool. codexBrowser fills that gap: new sessions can drive Chrome / Edge through the locally installed Codex browser plugin. Toggle it in Dashboard "Bot Config → Advanced → Codex App".
Full form:
Requirements and limits:
- The Codex browser extension must be installed and enabled in Chrome / Edge for the same OS user, and the browser runtime that ships with the Codex desktop app must be installed. If the runtime is in a non-default location, point to it with the
BOTMUX_CODEX_NODE_REPL_PATHenvironment variable. - Actions that need confirmation (site access, upload, download) become Feishu approval cards. Only people who can talk to the bot can choose "Allow for this session / Always allow / Deny". Denial, timeout or an unreachable daemon all count as deny.
- The tool doesn't expose arbitrary JavaScript, raw CDP, cookies, local storage, browsing history or the clipboard. Secure sign-in flows that need a password are never downgraded to an ordinary Feishu card.
- Sessions that are already running must be restarted or resumed to load the new tool.
- Can't be combined with
existingAppServer,sandboxorreadIsolation; conflicts fail at startup.
Working directory
Sessions and runtime
Waiting and no-progress reminders
longTaskReminder sends an independent status card to the original chat or topic while an executing task remains unfinished. Configure it in Bot Defaults → Message cards → Long-running task cards; saves apply immediately.
Disabled by default. Both windows default to 10 minutes and accept integers from 1 to 10080. Timing starts at the observed native execution write, excluding queued and idle time. Progress and follow-up messages do not reset the running turn. Scans run every 30 seconds; repeats start at the previous successful delivery and missed cycles are not replayed. Failed sends retry after one minute using the same delivery ID. Completion, cancellation, worker exit or session closure stops reminders. Chat, DM and topic sessions are supported; document comments and headless sessions are excluded. Silent, meeting-driven and suppressed replay turns keep their auxiliary-UI restrictions; reminder cards do not invoke outbound.send hooks. Preferences persist, but execution timing requires a current worker observation and is never inferred across daemon restarts.
sessionOwnerReminder: when a session sits in a state that needs a person and nothing changes, it @-mentions the session owner in the original topic at a fixed interval.
- Only sessions split by topic are reminded (topic groups, topics inside regular groups, and DMs with
p2pMode: "thread"). A session shared by a whole group or a whole DM is not reminded. The session needs an owner. - While the state stays the same, it reminds once every
intervalMinutes; a state change or a new message in the session restarts the timer. - Quiet hours include the start time and end at the specified end time. Session activity and state are still tracked during the window. The first scan after it ends sends reminders that are still due.
- Include
enabled,intervalMinutes,text, andstateswhen configuring by hand. If you providequietHours, include all three of its fields and use different start and end times. An invalid configuration makes the full reminder setting count as unset.
noProgressNotify: posts a reminder card when a turn shows no confirmed progress for a long time. It's only a reminder: it never restarts, interrupts or retries the task.
- Codex App has it on without any config; Codex CLI needs
{"cliEnabled": true}. Other CLIs are unaffected. timeoutMsapplies from the next worker process. While the session waits on a person (ask card, terminal choice, agent attention request), the Codex CLI timer pauses.
Permissions and authorization
For the full permission model see Permissions.
File sandbox and credentials
Details in File sandbox.
The ZMX backend can't enforce the file sandbox; sandboxed combinations are refused at startup. See ZMX backend.
Protected local MCP capabilities
A local stdio MCP server can request one optional protected capability in its plugin-private mcp/index.json. The capability ID is opaque to Botmux; use a non-business-specific fixture such as:
protectedCapability is not supported for streamable HTTP MCP servers; a plugin descriptor that combines them is rejected. The descriptor does not supply the secret source, principal policy, or containment rules; those bindings come only from machine-level configuration.
Within bots.json, the plugins array only enables installed plugins for that bot:
Do not put protected capability bindings, secret sources, secret values, or rollout state in bots.json. Operators bind the opaque capability ID in the machine-level ~/.botmux/config.json:
Missing enabled defaults to disabled; only JSON boolean true enables the binding. Non-boolean values such as "true" or 1 reject the entire record. Secrets support only { "source": "file", "path": "<Home-relative path>" }, rooted at the daemon account's trusted Home. Absolute paths, ./.. components, and symlinks are rejected. Operators must preprovision a nonempty regular file owned by the current user with exact mode 0600, at most 64 KiB. Botmux never repairs unsafe files and never captures or caches secrets at daemon startup. It reads the file before each new worker fork, pinning directory fds and opening each component without following symlinks so an intermediate replacement cannot redirect the read.
The secret reaches an authorized MCP only through the one-shot fd channel, never argv, generic environments, or logs. Rotation takes effect on the next worker fork; an existing MCP retains its startup secret until that session is recreated. Every valid configured secret file is automatically denied in all relevant session sandboxes, including bots without the matching plugin and disabled capabilities. Additional protectedHomePaths remain scoped to matching plugins. Current configuration supplies the redactEnv names and recognizable valid names from rejected legacy source: "env" records for worker, model, and generic plugin environment redaction; legacy environment sources grant no write capability. Machine configuration changes follow the global configuration's short cache refresh rules.
At MCP process startup, Botmux uses the ordinary stdio transport without a protected secret file descriptor if the capability is disabled or not provisioned, the plugin is outside allowedPluginIds, the configured containment prerequisites are not satisfied, or the daemon cannot provide the one-shot channel. The server can still start and expose read-only tools. A tools/call on that connection receives neither botmuxTrustedPrincipal nor botmuxGrantedCapabilities; the plugin must fail closed for protected writes.
principal is evaluated for each tools/call, not when the MCP process starts. If the global binding, plugin allowlist, containment prerequisites, and daemon channel all succeeded at startup, the long-lived process may already hold the one-shot secret even when a later call lacks its required verified human principal or other call-time grant condition. Botmux omits botmuxTrustedPrincipal and botmuxGrantedCapabilities from that call, and the plugin must reject the protected write. For every protected write, the plugin must freshly validate botmuxTrustedPrincipal and confirm that botmuxGrantedCapabilities contains the exact capability ID. It must never cache or reuse a principal, capability, or authorization result from an earlier call; any missing, mismatched, or stale field must fail closed. Isolation paths and environment redaction remain active for a matching enabled plugin even while the capability itself is disabled.
To migrate legacy environment secrets, provision the safe file and change the configuration to source: "file", then remove the old variable from the daemon launch source and restart the daemon. Deleting process.env cannot erase an old process's /proc/<pid>/environ. Before adding or changing secret paths, terminate and recreate old CLI sessions so their file denies cover the new paths; a hot update cannot revoke access already granted to old processes. Prefer rotation via atomic replacement at a fixed protected path. Protected files or other isolation requirements disable bare-host one-shot title generation and retain placeholder titles; ordinary session reads are unaffected.
A restarted stdio MCP process currently cannot receive the one-shot secret again and falls back to read-only; recreate the session to restore protected capabilities. User-visible errors from the different policy collection entry points remain a follow-up.
Run CLI calls as the message sender (triggerUserAuth)
Off by default. When on, lark-cli / bytedcli in this bot's sessions run with the authorization of whoever sent the current message, not whatever is logged in on the machine. Useful when several people share one bot: each message reads docs, checks calendars or calls internal platforms as its own sender.
Pick one way to turn it on. It takes effect for new sessions (/restart an existing one):
- Dashboard: Bot Config → Security → Trigger-user auth, switch on Run CLI calls as the message sender and tick the tools it should cover.
- In Lark (admins):
/botconfig set triggerUserAuth {"enabled":true,"tools":["lark-cli","bytedcli"]}; turn it off with/botconfig unset triggerUserAuth. - bots.json:
Rules:
- Only
"enabled": trueturns it on. Leaving outtoolscovers every tool; an unknown tool name is an error rather than a silent downgrade. - Optional
capabilitiesswitches each capability separately:lark-user(Feishu user identity,lark-cli --as user),bytecloud(ByteCloud: bytedcli, codebase, git push and bitscli / bits-cli, one switch) andmeego(bytedcli meegoonly; the standalonemeeglecommand is not governed). An unknown value is an error. When absent it is derived fromtools(lark-cli→lark-user,bytedcli→bytecloud+meego). Withbytecloudormeegoleft off the matching commands stay native: they run on this machine's own login with no botmux involvement. Withlark-userleft off there are two cases: a legacy config that only setstools(with nocapabilities) keeps the upstream behavior, wherelark-cli --as useruses the current turn sender's own authorization; only whencapabilitiesis set explicitly withoutlark-userdoeslark-cli --as userrun natively on this machine's own lark-cli config and login, with botmux injecting no credentials and issuing no authorization request (botmux auth requestreturnslark_user_auth_disabledfor lark-cli). - When someone who hasn't authorized makes a call, the command is refused and the refusal carries an authorization link. The AI can also send that person a link itself with
botmux auth request(see Agent-initiated authorization), or ask them to send/loginin the topic. Retry after authorizing. - It never falls back to running as the bot or as anyone else, and there is no machine-login fallback option; a legacy
fallbackfield in old configs is ignored.bytedclihas no bot identity, so an unauthorized call simply fails. - Optional fields:
credentialSource(autoby default /platformcentral platform only /locallocal QR login only),delegateOnMention(defaulttrue, see Carry the sender over on @ handoffs),allowSpeakerSwitch(defaultfalse: whentrue, a multi-speaker topic lets you prefix a single command withBOTMUX_AS=<open_id>to run it as another speaker of the current turn; when off, the default,BOTMUX_ASis always refused),gitHost(git pushes to that code host also authenticate as the current turn's sender).
Upgrade note: old-format authorizations need a fresh /login
Since v3.20, the Lark user authorizations botmux stores itself are kept per app and per authorizing person (~/.botmux/data/user-token-<appId>-<openId>.json). The older files (user-token-<appId>.json, user-token.json) don't say who authorized them, so nothing that has to act as a specific person uses them any more.
A bot that only has an old-format authorization loses those user-identity features. Have the person send /login once in a topic to restore them. /login only refreshes the stored authorization; running CLI calls as the sender still has to be turned on separately as described above.
Cards and terminal
What the cards look like and what each switch does: see Live streaming cards.
In Dashboard "Bot Config → Message Cards → Live card buttons" you can tick which buttons to show:

Answer card footer
The footer is the small line at the bottom of an answer card: signature, model, usage, recipients, voice button and so on. Each part can be toggled on its own, in Dashboard "Bot Config → Message Cards" or with /botconfig set <field> on|off.

- Turning the master switch off doesn't clear the individual settings; turning it back on restores them. If every part is off or empty, the footer and divider are left out entirely.
- Changes apply to new answers; cards already sent stay as they are. After editing
bots.jsonby hand, restart the daemon.
Final answer feedback
With feedback.enabled: true, final answer cards get three buttons (default "Conclusion usable / Effective progress / Conclusion wrong") with three fixed meanings, positive / progress / negative. Button labels, styles, order, the follow-up reasons after "wrong" and the comment box are all configurable.
Edit it visually in Dashboard "Bot Config → Message Cards → Final answer feedback", or with /botconfig set feedback '<json>'. By default feedback is stored locally in botmux-feedback.sqlite and can be reviewed on the Dashboard "Feedback" page. To switch to PostgreSQL or migrate the data, see Feedback storage & migration. Implementation notes: docs/feedback-capability-current-implementation.md.
Reply delivery and prompt injection
Auto-forward final reply (replyDelivery: "transcript")
Every CLI except Doubao defaults to send, where the model runs botmux send to post its answer to Feishu. Doubao defaults to transcript (its tool commands run in an account-wide resident process, so a model-run botmux send can land in the wrong topic; see CLI Adapters).
For CLIs whose session record botmux can read, you can opt in to Auto-forward final reply (replyDelivery: "transcript"): botmux automatically takes the turn's last answer from the CLI's session record and posts it to Feishu, so the model can just answer directly.
Compared with send, three things change:
- The system prompt switches to "your final assistant message is automatically forwarded back to Lark by botmux" and no longer teaches
botmux sendas a required reply channel or forbids progress updates. Only the multi-bot collaboration block keepsbotmux send --mention/--mention-backfor replying to or @-mentioning another bot; attachments, cards, and cross-chat usage stay on-demand in the built-inbotmux-sendskill. - No more
<botmux_reminder>each turn. - In DMs, or 1:1 groups with only the admin and this bot, messages are no longer wrapped in
<user_message>and<sender/>; the model sees the raw text.
Supported CLIs: Claude Code, Codex, TraeX, CoCo, Hermes, MTR, Pi, Oh My Pi, ebsd, Grok, Cursor, Doubao. Other CLIs (Antigravity, OpenCode, Relay, codex-app, …) do not support it; Antigravity only captures answers in zero-injection mode, so setting it explicitly is rejected. If you set transcript and later switch to an unsupported CLI, runtime falls back to send and no answer is lost. Under sandbox: "scratch" only Claude Code, Codex and TraeX session records are readable from the host; every other CLI falls back to send there at runtime (an explicit transcript is rejected for Cursor and Doubao). The oncall sandbox has one exception: Hermes' adapter does not mount ~/.hermes/state.db into the host, so it also falls back to send at runtime; other CLIs are unaffected by oncall.
How to turn it on:
- Dashboard: open "Bot Config → Advanced → Reply Delivery" and turn on Auto-forward final reply (turning it on writes
replyDelivery: "transcript", turning it off writesreplyDelivery: "send"; greyed out when the current CLI or sandbox doesn't support it). bots.json: set it explicitly on the bot entry:
- Lark command:
- After changing
replyDelivery, the per-turn reminder and wrapper change from the next turn; the system prompt and how the final reply is forwarded follow the CLI process, so they switch after/restartor when the session relaunches its CLI. When a restarted daemon re-attaches a CLI that kept running (tmux and other persistent backends), that CLI keeps the mode it was launched with. - When upgrading from v3.59.25–v3.59.29 (where
transcriptwas temporarily the default): bots without an explicitreplyDeliveryreturn tosendon new sessions or/restart, while surviving persistent panes keep their launch mode without dropping replies. Bots with an explicit"transcript"stay enabled. - When a legacy pane has no launch snapshot, the compatibility value inferred on its first reattach is frozen into the session record; later daemon reattachments no longer recompute it from live config, and only a CLI switch invalidates it. If you edited
replyDeliverybefore that first post-upgrade reattach without restarting the CLI, no evidence can exactly recover its historical config: run/restartonce so its prompt and forwarding gate converge on the new config. - Bot-to-bot collaboration is unchanged: replying to or @-mentioning another bot still takes
botmux send --mention(or--mention-back); the final reply card does not @ the other bot. - Silent scheduled tasks are unchanged: their final reply never reaches the chat, and the model still runs
botmux sendwhen the notify condition is met. - Cost: 1:1 sessions lose the
<user_message>/<sender>structure, so/adoptno longer recognizes them as botmux's own sessions by content (exclusion by session ID still applies).
Turning off the sender tag (senderTag: false)
Without it the model can't tell who is speaking: in multi-person sessions it can't tell speakers apart or address people by name. Useful for CLIs that copy the tag into their replies, or when you don't want each message's identity in the CLI's records.
- Applies from the next turn; queued messages and history are not changed.
botmux send --mention-back(mention the person who sent this turn) is unaffected; it uses the daemon's own record of who triggered the turn.- Trade-off: Dashboard session insights can no longer tell the sender type from the tag, and
/adoptloses one clue for recognizing botmux sessions. - The Dashboard "Speaker Tag" switch writes this field.
Hide development host addresses (hideLocalAddresses)
Feishu users read replies in their own client and cannot open files or services on the development host. Turn this on for a bot other people use; keep the default (off) for a bot only you use whose replies should show troubleshooting paths.
When off (the default), replies and cards are sent as written and no related rule is added to prompts. When on:
- Before model output reaches Feishu (
botmux send, the automatically forwarded final answer, unified reply cards, native thinking messages and document comment replies), absolute host paths, local schemes such asfile://and local service addresses are replaced: source files under the working directory become repository-relative paths, everything else becomes an internal-file label, and skill links keep only their name. System paths that name no user file, such as/dev/nulland/proc, stay. - The system prompt gets the full rule once per session and every turn's reminder gets one sentence, asking the model to leave such addresses out and deliver files as attachments or reachable links.
- A card whose button or link points at this host is refused and the model gets
LOCAL_ADDRESS_OUTBOUND_REJECTED; botmux's own Web terminal and Dashboard links are sent as usual. - Reply processing and the per-turn reminder apply immediately; the full rule in the system prompt applies from the next new session.
- The Dashboard switch "Bot Config → Message Cards → Development host addresses" writes this field.
Zero prompt injection (promptInjection: "none")
For multi-agent pipelines where a lead bot hands out work and sub-bots just execute, or whenever you don't want botmux adding anything to the prompt.
To turn it on:
- Dashboard: enable "Zero injection" in "Bot Config → Advanced".
bots.json: set"promptInjection": "none"on the bot; set"default"or remove the field to go back.
What happens:
- Only the task and attachments are passed: no botmux system prompt, per-turn reminders, identity info, role, whiteboard, memory or skill catalog. The CLI's own system prompt and the project's
AGENTS.mdare still handled by the CLI. - Answers are forwarded automatically: the final answer is taken from the CLI's session record and sent back to Feishu, mentioning the person who sent the task by default. Names of other bots in the group (like
@Reviewer) become real Feishu mentions. - Supported CLIs: Claude Code, Codex, TraeX, CoCo, Hermes, MTR, Pi, Oh My Pi, ebsd, Grok, Cursor, Doubao, Antigravity. Local backends only: tmux / pty / zellij / herdr / zmx / hc (Antigravity doesn't support zmx). Cursor and Antigravity don't support the
scratchsandbox. Hermes doesn't support theoncallsandbox (~/.hermes/state.dbis not mounted into the host). Remote backends and v3 workflows are not supported yet.
Technical details: docs/zero-prompt-injection.md.
Proactive start
By default a bot only starts working when @-mentioned. These fields make it more proactive; all of them can be set under "Proactive Start" in Dashboard "Bot Config → Common → Default Working Directory".
groupJoinCommand runs the same way as Hooks:
- No shell; for pipes or redirects write
bash -c '…'. Only a minimal set of environment variables is passed (no app secrets). - stdin receives JSON
{event:"chat.bot_added", larkAppId, chatId, operatorOpenId, emittedAt}; the environment variablesBOTMUX_JOIN_CHAT_ID/BOTMUX_JOIN_LARK_APP_ID/BOTMUX_JOIN_OPERATOR_OPEN_IDare also set. - It's killed if it hasn't finished after 10 minutes.
Welcome message (welcomeMessage)
Set it to some text and the bot DMs its primary admin (see ownerOpenId) once after it first comes online. Set it with --welcome-message "…" or --welcome-message-file <file> on botmux setup add / botmux setup edit; --welcome-message - on edit clears it. It can't be edited in the Dashboard yet. The value of --welcome-message is always sent as written, so text starting with @ is never treated as a file path.
- Delivery is recorded in
welcome-sent/<AppID>.jsonunder the daemon data dir. Once sent, restarts don't resend it, and neither does changing the text. Deleting that file makes it send again, but Feishu dedupes a resend less than 1 hour after the previous one. - A failed send, or an admin who can't be resolved yet, doesn't block startup; the next start retries.
- Core-only (
apiOnly) bots and multi-replica deployments (BOTMUX_COORDINATION_MODE=primary, where replicas don't share the delivery record) don't send it; the daemon log says why.
Group message listener
Have the bot watch a group: matching messages start a session without an @. The typical use is alert handling: your monitoring system already posts alerts to a group through its own bot. Add this bot to that group, turn on the listener, and every alert gets investigated automatically, with no Webhook needed.
The recommended place is the Dashboard "Message Listener" page:
- Global listener settings: one set of rules applied to every group this bot is in, including groups it joins later.
- Group listener settings: each group can "Use global settings", "Turn off listening" or use "Custom settings".
- You can preview which messages from the last 24 hours would match, and do a trial run (the bot really replies in the group).
In bots.json this maps to two fields:
The legacy messageListeners field (keyed by chat_id) is still read and treated as per-group custom rules.
A listener config contains:
Good to know:
- Only top-level group messages: replies inside existing topics are ignored; messages that @ the bot go through the normal @ flow and don't trigger twice.
- Each matched message starts its own session.
- Up to about 30 seconds of delay: Feishu pushes some messages in real time; messages from other bots and messages that don't @ the bot are picked up by a history poll every 30 seconds. So for third-party alert bots, the default
all_except_excludedplus"bot"is the safest choice: the history API may not return anopen_idfor third-party bots, so exactopen_idmatching can miss them. - Matching doc titles: only HTTPS
docx/wikilinks. The app needs the published scopesdrive:drive.metadata:readonly(read doc titles) andwiki:node:read(orwiki:wiki:readonly). Without permission, or if the bot can't see the doc, it falls back to the message text.
Summary command
- Only an explicit
@bot /summarytriggers a summary; keywords never do. The Dashboard "/summary range" settings write these fields. - If there was an earlier
@same bot /summary, this one only covers messages after it. - With
summaryMemoryon, text after/summarymarks the starting point: the summary starts at the most recent message containing that text. If it isn't found you get an error rather than a wider range. Such an explicit starting point can be older thansinceHours, so leave it out if you don't want old content read. WithsummaryMemoryoff, the text only tells the model what to focus on. - If the sandbox is on and the memory file is outside the working directory, add its existing parent directory to
sandboxPaths.readWrite, or the sandbox will block the write.
contentTriggers(old keyword / regex triggers without @) no longer has any effect and is only parsed for compatibility with old files. UsesummaryRangeinstead.
Spend and budget
botmux can estimate each bot's spend (in CNY) from token usage and send a DM when monthly spend crosses a budget line.
pricing: how cost is calculated
- Cost is only calculated when
pricingis set.{ "usdCny": 7.2 }is enough to use the built-in table (common Claude, GPT and Gemini models). - Models found in neither the built-in table nor
modelsare not priced; botmux never guesses a price. - Spend accumulates from when you turn it on; earlier usage is not counted.
budget: monthly budget
- Alerts are sent by DM to the primary admin set in
ownerOpenId. WithoutownerOpenIdthey only go to the log. - Spend is counted per calendar month (UTC) and resets on the 1st.
- The budget relies on the amounts
pricingproduces: withoutpricing, spend stays at 0 and no alert ever fires.
Voice
Lark meeting agent
A Lark-connected bot can be invited into video meetings by default (core-only apiOnly bots excepted). It listens in, syncs the transcript, and, depending on its meeting role, posts text or speaks in the meeting.
Prerequisites: the app needs vc:meeting.bot.join:write (join / leave), vc:meeting.meetingevent:read (read meeting events) and vc:meeting.message:write (in-meeting text), plus vc:meeting.bot.realtime:write for realtime voice; the event subscription must include vc.bot.meeting_invited_v1, vc.bot.meeting_activity_v1, vc.bot.meeting_ended_v1 and vc.meeting.participant_meeting_joined_v1. Missing scopes are logged as an error at startup and DMed to the admin; event subscriptions can't be queried through any Lark API, so the daemon only reminds you to check them, and a missing event just means no meeting pushes arrive, with no error.
How to use it:
- Invite the bot from a Lark video meeting.
- The bot DMs the owner (or
vcMeetingAgent.attentionTargetOpenId, if set) a confirmation card, valid for 30 minutes by default (inviteTtlMs). - After confirmation the bot joins and creates a meeting listener group that syncs the transcript; set
vcMeetingAgent.listenerChatIdto use an existing group instead. - What it does in the meeting is decided by meeting roles, see the next section. To let someone give the bot instructions while it listens to the meeting, use
/vc-auth @member(/vc-auth revoke @memberto undo,/vc-auth listto view). - To prepare ahead: send
/vc prepare <meeting link or number>in a regular group to make it the meeting prep group, add background and pre-read docs there, and the same Agent session is reused once the meeting starts (see Slash commands).
Speaking in the meeting:
- Text and voice are sent directly by default, without per-message approval. For per-message approval, set
textOutputPolicy/voiceOutputPolicytoapprovalundervcMeetingAgent.meetingConsumer;denyturns that channel off. - Realtime voice is on by default but only connects when the bot actually needs to speak; turn it off with
vcMeetingAgent.realtimeVoice.enabled: false. Speaking also needs the realtime scope above and in-meeting AI speaking permission; without them it fails with a clear warning and never sends audio. - Speech is synthesized with the engine configured for voice summaries (MiniMax, Volcengine / Doubao, and others).
Turning it off:
- One bot:
"vcMeetingAgent": { "enabled": false }inbots.json, or turn off Receive meeting events for that bot under Global Settings → Meeting Agent → Meeting Listener → Meeting role presets → Per-bot meeting switches. - The whole machine: Dashboard Global Settings → Meeting Agent → Meeting Listener, turn off Allow meeting listener features on this machine (
vcMeetingAgent.enabled: falseinconfig.json). Meetings already running usually finish naturally.
Meeting roles
When the bot is invited into a Feishu video meeting, it can act in a "meeting role", such as syncing key information, taking minutes or facilitating. Manage roles in Dashboard "Global Settings → Meeting role presets":
- Presets are shared by all bots: whichever bot is invited runs the selected role, so presets don't name an executing bot.
- Built-in templates: Important information sync, Meeting minutes and action items, Meeting facilitator, Solution review and risk challenge, Interview and requirement insights. "Use this template" makes an editable copy; later template updates don't touch your copy.
- "Per-bot meeting switches" let you turn off meeting events for a bot or pick its default role.
A role has two independent output settings:
In listener_thread mode the agent decides whether there's anything new worth posting; botmux only posts the text it chooses to publish, and nothing on malformed output.
You can also write roles by hand in one bot's vcMeetingAgent.meetingConsumer.consumerProfiles; that bot then stops using the shared presets. Hand-written roles need agentAppId to say which bot executes them:
Add the role id to defaultConsumerIds and set defaultMode to agents to enable it by default when a meeting starts; otherwise enable it from the selection card shown during the meeting.
Session environment (global and per-bot layers)

A session's environment is built up layer by layer in this order; later layers override earlier ones:
Managing it in the Dashboard: the global layer is in "Global Settings → Session environment", the bot layer in "Bot Config → Advanced → Launch environment → Session environment". The table lists each variable's name, effective value and source (host / global / this bot). You can set, override, remove, or restore inheritance, and paste many at once. By default only variables changed in this layer are listed; inherited ones collapse into a "N inherited, expand" row. Credential-like values are masked; only the local owner can reveal them.
When it applies: new sessions, no daemon restart needed. Running sessions keep the environment they started with; the page lists sessions "still on the old environment", and restarting them picks up the change. To see what a running session's CLI actually got, use "More → View session environment" in the session drawer (read-only, masked, Linux only).
Rules:
- Within a layer, a variable is either "set" or "removed". "Restore inheritance" deletes this layer's entry, so the value falls back to the layer below.
PATHandHOMEcan be overridden but not removed.- A layer's sets and removes together are capped at 4 KB (tmux limits single command length). Saving more is rejected; an old config that's already over can always be made smaller.
- For tmux / zellij / zmx / hc sessions, removal is the last step of session startup, so same-named variables from the tmux server's global environment or shell startup files are removed too.
- With lark-cli app binding on, botmux takes over
ZDOTDIR/BASH_ENV; with trigger-user auth on, alsoGIT_ASKPASS/GIT_CONFIG_*. These can't be set or removed on that bot. - No migration needed:
envis the bot layer's "set". WithoutenvUnset/sessionEnv, everything works as before. - riff / mojo sessions don't run on this machine; only this bot's
envgoes with them, and the global layer and removals don't apply. - Env set in a CLI's own config file (e.g. Claude's
~/.claude/settings.json) is injected by the CLI after it starts and isn't affected by removal.
tmux server global environment: a tmux server freezes a global environment when it starts, and every new pane inherits it. Below "Global Settings → Session environment" you'll see the default server and the tmux -L botmux server used for managed sessions. The local owner can remove a variable from a server's global environment (with confirmation); it only affects panes created afterwards. To remove something for good, use "remove" above.
Strict process environment (opt in)
By default (no envPolicy, or { "mode": "inherit" }) the host environment is inherited, minus known sensitive entries. Strict mode only lets through an exact allowlist of names:
Adapter variables such as TRAE_HOME and CLI_EXTRA_ARGS aren't inherited automatically in strict mode either; list them in inherit or set them in env if you need them.
How to set it:
- Dashboard: "Inherit host environment" above "Bot Config → Advanced → Launch environment → Session environment".
- CLI:
botmux env-policy set '{"mode":"strict","inherit":["HTTPS_PROXY"]}'(pick the bot with--bot);unsetrestores the default. - Feishu:
/botconfig set envPolicy {"mode":"strict"}.
Bad formats, unknown fields and reserved names are rejected outright, never silently downgraded.
When it applies: on the next cold start of a session. Offline CLI edits only change the file; the daemon reads it on its next start. When the daemon restarts and restores sessions whose policy no longer matches, it closes the old session first and starts fresh; if it can't confirm the old one is gone, it refuses to start. Environment a CLI has already read can't be revoked.
Coverage: strict mode covers PTY, tmux, zellij, zmx and hc sessions started by botmux, plus local Codex / TraeX App Servers and helper processes such as title generation. tmux / zellij / hc no longer load the launchShell startup files and launch the CLI with a clean environment, so PATH, nvm, mise and the like must come from the baseline or your explicit config. TERM defaults to xterm-256color when missing.
Not supported: Herdr, Riff, Mojo, Forge launch mode, adopted external processes and external App Servers can't provide the same isolation yet; strict mode refuses them. Config and credential files the CLI reads itself, file permissions and cloud accounts are outside this policy.
With a network policy: if sandboxNetworkPolicy is also set, proxy variables (HTTP_PROXY / HTTPS_PROXY / ALL_PROXY and lowercase forms) must also satisfy the table below. Strict inheritance only decides whether a variable reaches the CLI; it doesn't grant network access.
General proxy delegation in this table applies only to ordinary sessions. A frozen protected HTTP egress policy explicitly rejects trusted-egress and task proxy variables; adding that mode repeatedly cannot resolve the error. Model connections must use the protected model bridge, currently supported only by Codex. See network sandbox documentation.
trusted-egress neither creates a proxy, grants environment variables nor guarantees the CLI uses it. Authorizing an exit does not restrict destinations behind it. If a model requires a proxy, do not simply remove its inherit grant to pass validation: explicitly trust the exit and configure endpoint rules plus deployment-layer ACLs, or first establish direct model authentication, permitted destination CIDRs/ports and DNS. Persistent backends such as tmux, adopt and external App Servers remain rejected regardless of trusted-egress or envPolicy.
The network policy itself requires Linux, the local PTY backend and sandbox: "oncall". See File and network sandbox.
Auto-maintained fields (don't edit)
botmux writes these itself. They're listed here so you can read the file:
Grant store (grants.sqlite)
Per-person talk grants are not kept in bots.json but in <data dir>/grants.sqlite (default ~/.botmux/data/grants.sqlite): chatGrants, globalGrants, and their message quotas and expiry. This keeps bots.json from growing every time several bots create a group together.
- At daemon startup, if
bots.jsonstill has these fields (left from before an upgrade, or written by hand), they're merged into the grant store and removed frombots.json; for the same entry the store wins. Before the first removal, the wholebots.jsonis backed up asbots.json.bak-grants-v1. - Grants are only reclaimed automatically when they expire: at daemon startup and every hour after. To revoke early use
/revokeor the grant card. - In multi-replica mode (
BOTMUX_COORDINATION_MODE=primary) grants stay inbots.json. Don't switch back and forth between modes: after switching to primary, grants in the grant store are not read.
