Streaming Cards
Botmux uses Lark cards to show what the CLI is doing, and lets you control it right from your phone. This page goes from most common to advanced: first what shows up during a turn, then the status card, dynamic single cards and the switches, and finally the features for scripts and integrators.
What shows up in the chat during a turn
A few notes:
- Status marks and the status card are either/or: with the status card on, no reactions are added; with it off, the reaction is the only lightweight progress signal. Swap the two emoji with
receivedReactionEmoji/doneReactionEmoji(see bots.json). - The thinking process needs Lark PC ≥ 7.70 or mobile ≥ 7.74, and only appears for CLIs that emit thinking (Claude Code, Codex, TraeX, Pi, Kimi and others).
- To get "one card per turn" instead, see the "Dynamic single cards" section below.
Terminal status card

The card body is a live screenshot of the terminal: xterm renders the CLI's interface in the background as an image (borders and colors included), instead of converting output to text.
The header color is the status
"No reply needed" and timing
- No reply needed: when the AI decides a message needs no answer (say, a status line someone posted in the group), no reply card is sent and the status card header reads "✓ Turn ended (AI determined no reply was needed) · Awaiting input", so you can tell it apart from a stuck turn. Automatic, nothing to configure. If the message explicitly @mentioned the bot, an automatic receipt is posted too; to force an answer, @mention it again and ask for a reply explicitly.
- Waiting / execution time: off by default; see Showing timing below to turn it on.
Card buttons
Frequently used buttons sit on the card's main row. The low-frequency buttons marked "More Actions" below live in the "More Actions" collapsible panel under the main row; tap the panel title to open it.
You can hide buttons you don't need in the Dashboard (see "Hiding card buttons" below).
Interrupting or correcting a turn
You don't have to wait for it to finish. With output shown, tap "⌨️ Terminal Keys ▾" and a set of terminal keys appears at the bottom of the card: × (Esc), ^C, ⇥ (Tab), ␣ (Space), ↵ (Enter), arrow keys, ▲ half page up, ▼ half page down. Tapping × presses Esc in the terminal; after interrupting, just send a new instruction.
- The terminal keys are only available when output is shown, and remote backends (Riff / Mojo) don't have them. They start hidden; once you show them, later cards of the same session keep them shown until you hide them again.
- By default, messages you send while a turn is running are queued and fed in after it ends. To correct course immediately, tap × (Esc) or ⏹ Stop first.
Card lifecycle
- A new card each turn: the previous card freezes as an archive, so history stays easy to follow. After a session is moved to another chat with
/relay, the original card also freezes and loses its buttons. - Resumable after close: the close card has a "▶️ Resume Session" button. When the CLI supports native resume, it also shows the native command (e.g.
claude --resume <id>) for manual recovery. - Management buttons such as "🔄 Restart" live on the session card, not on each turn's status card.
Cards that need a click from you
Besides the status card, Botmux posts cards when it needs you to decide something. These three are the most common.
Repo picker card
When a new topic needs a repo, a "📁 Project Repository" card appears: pick a repo from the dropdown, type any directory by hand, or press "▶️ Start Session Directly" to use the default directory.
To open a new worktree from a repo, use the "🌿 Open a repo as a new worktree" dropdown. When 2 or more repos are found, a "🔀 Multi-repo" button sits next to it:
- Press it to switch to the multi-repo picker, where you can tick several repos and get one worktree each; press "🔀 Single-repo" to switch back.
- The switch is written to the bot setting
worktreeMultiPicker, so it applies to all of this bot's future sessions, not just this card. That's why only admins can press it. - You can also set it directly:
/botconfig set worktreeMultiPicker on|off.
AI question cards
When the agent asks with botmux ask, or Claude Code / Codex asks a question on its own, a question card appears in the chat. Its "Can answer" field tells you who can answer.
Without a designated answerer, anyone in the chat who can talk to the bot can answer. If no option fits, you can also just reply in the topic with text. See CLI commands for the flags.
Terminal permission card (Claude Code)
Some Claude Code actions pop a confirmation dialog in the terminal, for example a risky rm caught by a built-in safety check, which appears even when permission prompts are skipped. Lark can't see that dialog, so the session would hang. Botmux turns it into a question card showing the tool name and the command or file path, with buttons labeled 「允许执行」 (allow) and 「拒绝」 (deny). The card text and buttons are currently Chinese only.
- Allow lets Claude run it; deny tells Claude no, and it continues another way.
- It waits 10 minutes by default. If no one presses anything, it counts as denied and Claude is told it timed out.
- A text reply in the topic also counts as denied; your words are passed to Claude as the reason.
- If the card can't be delivered (for example, the daemon is unreachable), it is denied too, instead of falling back to a terminal dialog no one can press.
- Change the wait with the environment variable
BOTMUX_PERMISSION_TIMEOUT_MS(milliseconds). It is clamped to between 1 second and 14 minutes (see Environment variables).
Dynamic single cards: one reply card per turn (preview)

The image is an illustration (in Chinese); the real look follows the Lark client.
By default, the status card, the thinking process and the final answer are separate messages. Dynamic single card mode puts the turn's progress, process, questions and final answer into one card that updates in place; the next turn starts a new card, and the previous answer stays.
Turning it on
- Dashboard: Bot config → Task Cards → Reply presentation, choose "Dynamic single card".
- Or an admin sends in a chat:
/botconfig set replyCardMode unified; switch back with/botconfig set replyCardMode legacy. - It takes effect from the next turn.
Want only one card? Choose dynamic single card and turn off "Show a separate status card" (on by default). The terminal status card is then no longer posted automatically while the reply card keeps updating; use /card to open one when you need it. disableStreamingCard and /card off also turn off this separate status card. The old final-only value is treated as "dynamic single card + separate status card off".
Which sessions are supported
- Supported: ordinary Lark conversations with Claude Code, Codex, Grok, TraeX, Pi and Kimi without a file sandbox (both regular groups and topics).
- Kimi's process comes from its local session log, which Kimi writes once per completed model step: thinking and tools update step by step rather than token by token, and the closing answer is delivered by
botmux sendrather than repeated in the process. - Not supported, still using the default mode: file-sandbox sessions (including
readIsolationand globalBOTMUX_SANDBOX=1), API-only, non-Lark channels, remote Riff/Mojo, adopt, local terminal sync, doc comments, video meetings, scheduled tasks, and v3 workflows. - Sandbox state is fixed when the session starts; changing the bot's sandbox switch does not affect running sessions.
What the card contains
- Title: the current phase plus elapsed time, such as ⏳ Queued, 💭 Working, ✅ Completed, ❌ Failed, ⏹ Stopped; while a question is pending it shows "Waiting for your response".
- Process: thinking text or summaries the CLI emitted, tool calls, progress notes and Q&A records in order, folded into a 📋 section when the turn ends. Internal thinking the CLI never printed cannot be shown.
/cot offin the chat or bot-levelcotEnabled: falsehides the process; progress and Q&A records stay.- To hide only tool calls: turn off "Show tool calls" in the Dashboard, or
/botconfig set replyCardShowTools off. Thinking summaries and progress still show, and/cot showwon't reveal hidden tools. This switch only applies to dynamic single cards.
- ⏹ Stop: also on the reply card while it runs; it only stops the current turn, and an old card cannot stop a new task. Codex RPC input mode has no Stop button.
- Width: adapts to the chat window.
Questions (Ask) live in the card too
botmux ask in the same turn, and Claude Code / Codex questions, open right inside the reply card with a "Waiting for your response" title. Once answered, timed out or expired, they fold into the process; multiple questions show one after another without overwriting each other. Multi-select, text answers and answering from the Dashboard all work as usual.
Large forms with more than 16 options or question content over 3000 bytes are still sent as separate cards. Approval / authorization cards are also sent separately.
Working with botmux send
botmux sendcounts as progress by default; send the final answer withbotmux send --response-kind final "full answer".- Repeated sends may return the same
messageId. If a script needs a separate message each time, use the default mode or--response-kind auxiliary. - Replying with an @ to this turn's asker (
--mention-back) still updates the same card; mentioning others, custom cards, images and files, and cross-session delivery are sent separately.
Limits
- The whole card is bound by Lark's 30 KB update limit. Only when it is exceeded is the process truncated, keeping the final answer and pending questions first, with a note on how much was omitted.
- Very long answers become a Markdown attachment, with a note in the card.
- A withdrawn card is not rebuilt automatically; there is no typewriter animation.
Switches at a glance
Bot-level defaults vs per-chat overrides
- Per-chat settings win over the bot-level default and only affect that chat.
/card ononly clears the chat-level off; a bot-level off still applies. /cardand/cotare admin-only (allowedUsers), status queries included. Lark cards can't show different views to different people, so one change affects everyone in the chat.silentTurnReactionsalso hides Codex App's "follow-up instruction received" receipt.
Quiet preset: one click in the Dashboard writes "thinking off, status marks silenced, status card off" at once, for chats that just want the conclusion. It is a one-time write; turning the preset off later does not revert the three switches, so turn each one back on yourself.
Hiding card buttons

Toggle each one under "Live card buttons" in the Dashboard, or:
Values: output (show output, export text, refresh), terminal, writeLink, compact (including idle auto-compact), stop, close. /botconfig unset hiddenStreamingCardButtons shows them all again.
Other card-related switches
All of these can be changed in the Dashboard or with /botconfig set <setting> on|off.
Pinning the current status card
With pinStreamingCard on, Botmux pins the current public status card to the top of the chat so the terminal and close buttons are always within reach.
- Per bot, off by default. Change it in the Dashboard or with
/botconfig set pinStreamingCard on|off; existing sessions try to follow right away. - Only the current public status card is pinned. Repo pickers, private
/cardsnapshots, reply cards, the thinking process, close cards and so on are never pinned. - Lark pins are per chat: with several topics or bots running in one chat, you may see several pins at once.
- To stop pinning in one chat:
/card pin off; to restore:/card pin on;/card pin statustells you whether it's off at the bot level, off for this chat, or active. - Pinning is best-effort: failures never affect posting, closing, relaying or anything else, and during errors you may briefly see no pin or an extra one. Botmux only removes pins it created itself, never pins from people or other apps.
Reply card footer

The footer at the bottom of the final reply card can show the items below; toggle each under "Reply card footer" in the Dashboard:
Where usage is shown
The usage line looks like ctx 23% · 5h 18% · 7d 5% · This turn ↑12k ↓3k · Total ↑1.2M ↓80k · Cache hit 92%. Missing items are simply left out.
usageDisplay decides where it goes:
This only affects display, not usage accounting.
Showing timing
Off by default. Turn it on in the Dashboard under Bot Config → Message cards → Task Cards → Waiting and execution time, or send /botconfig set showReplyTiming on (showReplyTiming in bots.json). Once on, the final reply footer shows "waited 3.2s · ran 23.4s", starting with newly received messages.
- Waiting: from Botmux accepting the message to actually handing it to the CLI, including queueing and cold start.
- Execution: from handing it to the CLI to seeing the final output. Codex App uses its own completion time.
Neither includes Lark delivery time. When timing can't be determined reliably (retries, restored old sessions, messages the model sent early via botmux send), it is not shown rather than guessed.
Appending your own text to the usage line
Want gateway quotas, build status or who's on call after the usage line? Configure a command on the bot in bots.json:
The command prints one segment per line, or JSON {"segments": ["…", "…"]}. For example, this output:
renders as ctx 14% · 01 5h 2% 7d 2% · 02 5h 4% 7d 2%.
Rules:
- At most 4 segments of at most 40 characters each, shown as plain text (Markdown is escaped).
- Run with
/bin/sh -c, 3-second timeout, stdin closed, non-zero exit counts as failure. The environment includesBOTMUX_LARK_APP_ID,BOTMUX_CLI_IDandBOTMUX_BOT_NAME(the bot's configured CLI). - No timer: a background refresh starts only while cards are rendered and the result is older than
refreshSeconds(default 60, range 10–3600); rendering never waits for the command. All of a bot's sessions share one result. - On failure the last good result is kept; once the last success is older than 10 minutes nothing is shown.
- Works for every CLI; follows
usageDisplayand is hidden with it underoff.
Automatic-recovery failure card
When an ordinary Claude message hits a transient model failure (API unreachable, DNS outage, dropped stream, ...), a bot with auto-continue after provider failures turned on continues it automatically (off by default; when off, this failure card appears right away, marked "not continued"). If it still fails by the limit, a failure card is posted in the original chat (or topic). It is the only notice for that message:
- It @-mentions the original sender, states the cause in one sentence (no raw error text), and adds an excerpt of the message, the time, how many continuations ran, until when, when the provider expected to recover, and why it stopped there.
- 🔁 Retry sends the message again as the original sender; the answer still goes to the original chat or topic. Only the original sender (while they can still talk to the bot) or a bot admin can press it. Each card can be retried successfully once, then shows who retried. The retried message asks the AI to check the current state first and avoid repeating work already done.
- A continuation that never produces a result (terminal idle for about a minute) also counts as failed, instead of staying "in progress" forever.
- If the Lark API is also down when the card is due, it keeps retrying (up to 24 hours) and lands exactly once; a daemon restart won't send it twice.
- Failed scheduled tasks get the card too, without a Retry button; run the task again manually if needed.
Stop, retry and spend
- ⏹ Stop: there by default, shown on the status card only while the turn is still running. It is the same as pressing ^C and keeps the session;
/stopin the topic does the same. Codex App sessions and sessions withcodexRpcInputon can't be stopped this way; pressing it only suggests/close. To hide the button:/botconfig set hiddenStreamingCardButtons stop, or switch it off under the Dashboard's live card buttons (see Hiding card buttons above). - 🔁 Retry: available on failure cards by default; the original sender or a bot admin can press it (see Automatic-recovery failure card above). For other failed or interrupted turns, send
/retryin the topic. - Spend: botmux only converts token usage into CNY after you set
pricingfor the bot inbots.json(the simplest is"pricing": { "usdCny": 7.2 }, which uses the built-in price table); without it the amount stays 0. In the current version the amount feeds monthly budget alerts (budget) and is not shown on cards; see Spend and budget. What the cards do show is the token usage line, see Where usage is shown above.
Richer messages with botmux send
Messages the agent sends with botmux send are separate messages that can carry images, files, videos and @ mentions. See CLI commands for all flags. These are the ones most related to cards.
Custom cards
--card-file / --card-json send raw Lark interactive card JSON.
⚠️ Custom cards allow display-only content and open_url buttons only. Any callback control (buttons with a
value, dropdowns, person pickers, date pickers, inputs, form submits) is rejected, so custom cards can't forge interactive callbacks.
Videos, @mentions, urgent pings and dry runs
These are all botmux send flags. The agent in the session calls them as needed; there is nothing to switch on:
See botmux send --help for the full list.
Semantic reply headers (--layout)
At key moments you can give a reply a colored header and tag:
Choose result, progress, risk (needs confirmation), blocked or handoff. Without --layout it's an ordinary reply card. It does not apply to custom cards or voice messages.
In the Dashboard under "Bot config → Reply Style" you can set whether the five writing recipes are injected for the agent, whether --layout may add headers, the theme (default / minimal / vivid), and each header's color and tag. Running sessions pick up the new settings after a restart.
Charts in messages (vega-lite)
A ```vega-lite block in the body renders as a native Lark chart:
What's supported:
- Inline
data.valuesonly, at most 500 rows; values are string / number / boolean / null. mark:bar(horizontal when only x is quantitative),line,area,point,arc(pie;innerRadius > 0for a donut). A pie takes onlytheta(value) andcolor(category); nox/y, andthetahas notitle.- Encoding channels:
x,y,color(series),theta; each accepts onlyfield,type,title.x/ytitles become axis titles and thecolortitle becomes the legend title. type: temporalis not parsed as a date; values show as categories in the given order, so sort them first.- At most 5 charts per card. The whole message must fit Lark's 30 KB; when it doesn't, charts step down "chart → 50-row table → 10-row table → note only".
For safety, Botmux rebuilds charts from the fields it recognizes and rejects data.url, transform, params, expr, signal, datasets, layer and similar. Unsupported or oversized charts become a one-line note plus a plain data table, the reason is printed on stderr, and the message is still sent.
Preview before sending: botmux send --dry-run sends nothing and needs no session; it prints {dryRun, bytes, fits, diagnostics, card}, where bytes is the real Lark request size. It renders the body only: no image/file upload, no @ resolution, no footer.
Updating a card in place after sending (card patch)
A successful botmux send --card-file/--card-json prints {"success":true,"messageId":"om_...",...}. With that messageId, botmux card patch updates the same card in place without sending a new message, which suits progress cards:
- The updated card goes through the same safety check as sending (display-only + open_url).
- The
sendexample passes--no-mention: every reply must pick one of--mention/--mention-back/--no-mention, or it is blocked (exit 2). - The bot identity comes from the current session. Errors such as a withdrawn message, missing permission or a non-card target are reported as-is (exit 1); usage errors exit 2. On success stdout is a single line of JSON.
Signed button: the clicker starts a turn as themselves (integrators)
A local integration can have the bot post a single-use button card into a chat. Whoever clicks the button starts the turn, just as if they had sent a message themselves. With triggerUserAuth on (credentialSource: local), credentials are issued for the clicker too, never falling back to the session owner.
How to post one
Call the daemon's local IPC endpoint POST /api/cards/click-turn (same local HMAC auth as /api/sessions/spawn; not a public route). Request body:
Success returns { ok, messageId, exp }; if the bot is not in the target chat you get 403 bot_not_in_chat.
Safety rules
- The daemon signs the button and each button works once; tampered, expired and repeated clicks are rejected, and a restart doesn't make it reusable.
- The clicker must both be allowed to talk to the bot and have operate rights (admin). People with talk-only grants can't use it; with
restrictGrantCommandson, people whose talk access comes only from a per-user grant (chat guestchatGrantsor global guestglobalGrants) can't either; members of a fully opened group are not affected by this rule. - A bot or app clicking does not start a turn and never falls back to the owner.
- A
sessionIdonly matches an active session of this bot; a miss is rejected rather than spawning a new one. If thechatIdhas no session yet, one is created with the clicker as owner; an existing session whose working directory differs from the signed one is rejected. - A new session without a signed
chatTypeis treated as a group; private chats must be signedp2p. - In sessions with cross-person interruption (
crossPrincipalInterruption) or per-person lanes, clicks are rejected with a message explaining why.
After a click Lark first shows "starting"; once the CLI actually accepts the input, the chat gets "Started this turn as you". If delivery fails, the turn's changes are rolled back and a failure notice is posted instead.
