Common Pitfalls and How to Avoid Them
Problems that keep coming up in the community, roughly ordered by how common they are. If something misbehaves after installing or upgrading, scan this page first — it is most likely a known issue. Not sure where to start? Jump to General troubleshooting approach at the end.
Find it by symptom
Bot permissions / app creation (most common)
Symptoms vary: the CLI seems to "quit mid-session", the group gets no messages, botmux history returns 400… The root cause is usually incomplete bot permissions. It typically comes from one of three things: reusing a bot from an old app, not creating the app with the latest botmux setup QR flow, or missing permissions when creating the app by hand.
Fix: use the latest botmux setup to recreate the app by QR code. It configures every permission and publishes a version for you. Don't reuse a bot from an old app, and don't skip permissions when creating one by hand.
Environment / installation
botmux: command not foundright after installing:~/.botmux/binisn't on PATH yet. Both the curl and npm installs write it into your current shell's startup file (such as.zshrc/.bashrc), but it only takes effect in a new terminal (or after yousourcethe file). If it still fails, addexport PATH="$HOME/.botmux/bin:$PATH"to the startup file by hand.- npm install fails with
no prebuilt binary package: the npm package also installs a self-contained binary now, picked from a per-platform subpackage. If that subpackage didn't land, you get this error. → Trynpm i -g botmux --forcefirst; if that doesn't help, use the curl install (no Node needed). npm itself requires Node ≥ 22. - Running from source,
botmux start/restartrefuses with "cannot load an SQLite engine": the session store needs Node ≥ 22.13 (≥ 23.4 on 23.x) or bun. The check runs before the old processes are stopped, so your live bots keep running when it refuses. → Re-run with a suitable interpreter as the message suggests (for examplebun dist/cli.js restart). Don't use a barenode: it follows PATH and may land on an old version again. - A
cliId: "gemini"bot doesn't start: Gemini CLI is no longer maintained and its adapter has been removed; other bots are unaffected. → ChangecliIdto"antigravity"(commandagy: install it and sign in with a Google account, or configure a Gemini API key), and drop thecliPathOverride/wrapperCli/modelyou set for Gemini. See Gemini CLI has been removed. - First launch stuck on a dialog: some CLIs ask on first start "Trust this folder?", "Sign in / update?", "Use the API key found in your environment?" and so on. botmux can't answer these from Lark, so it posts a notice in the topic, such as "⚠️ Claude Code is stuck on a folder trust confirmation". Your message is held back and never typed into the dialog. → Open the Web Terminal (or the local machine) and make the choice; processing continues automatically. Usually you only need to do this once.
Lost environment variables (high frequency)
- bash users put variables in
.bash_profileand sessions don't see them: botmux starts sessions withbash -i, which only reads.bashrc. → Addsource ~/.bash_profileto.bashrc, or put the variables straight into.bashrc. zsh users use.zshrc; fish users use~/.config/fish/config.fish. This is the most common cause ofAPI Error 403and gateway token errors. - Under root, Claude reports "cannot be used with root/sudo privileges": Claude Code refuses
--dangerously-skip-permissionsas root. When botmux detects root, it injectsIS_SANDBOX=1for Claude-family CLIs automatically, so usually there's nothing to do. If your wrapper wipes the environment and the error persists,export IS_SANDBOX=1yourself (for PM2 / systemd / Docker, set it in that startup environment).
Custom wrapper / gateway integration
When you wrap the CLI in your own script (for example to go through an internal gateway), two problems are common:
- Arguments aren't passed through: if the script doesn't forward
"$@"correctly, the CLI never receives arguments like--session-id. - The script blocks arguments botmux needs: for example it filters out
--settings, or reportsunknown option '--images'. Startup fails and drops into a shell.
How to pin it down: get the exact launch command botmux ran and run it yourself. Two ways to get it: click "Copy reproduce command" in the Dashboard session list (it contains credentials such as tokens, so keep it private), or find the Spawning fresh CLI: line in botmux logs.
Input / submission
- A multi-line message gets submitted as several messages: some TUIs treat newlines and tabs in the prompt as Enter or autocomplete. botmux now types into Codex and CoCo as one bracketed paste. When you send multi-line content with
botmux sendyourself, use a heredoc too. - The model answered in the terminal, but nothing reached Lark: by default, the final reply relies on the model calling
botmux senditself. Weak or wrapped models tend to forget it, or keep calling it without stopping. → Two options:- Use a stronger model, or add firmer prompt constraints;
- For supported CLIs (Claude Code, Codex, CoCo and others), turn on Auto-forward final reply (
replyDelivery: "transcript"): botmux takes the last answer of the turn straight from the CLI's session record and posts it to Lark, so it no longer depends on the model callingbotmux send. SeereplyDeliveryin bots.json Configuration.
botmux send --imageswith 6 or more images may fail silently: → Send at most 4 at a time, in batches.
A message got no response: read the diagnosis card
Automatic, nothing to configure. When a message handed to the CLI can't be confirmed for a while, botmux first looks at what the terminal is showing, then posts a card that names the cause (the error code is still submit_unconfirmed) instead of a generic "submit could not be confirmed":
Processes / connections
-
One Lark bot connected by two programs at once: whichever grabs the long connection first wins, so botmux works on and off. → Give each bot to one program only.
-
tmux lsdoesn't show the bot's sessions: botmux sessions run on their own tmux server, so add-L botmux, e.g.tmux -L botmux ls. See Tmux Session Persistence. -
After a manual
tmux kill-session, the session comes back: the daemon still thinks the session is alive, and the next message brings it back. → To really end it, send/closein the topic, or runbotmux delete <session ID>on the command line. -
With
defaultWorkingDirset, every new topic starts a session right away: that's the expected effect of "skip repo selection" — no repo picker card first. Remove the setting if you don't want it. If the configured directory doesn't exist, botmux won't quietly run somewhere else; it posts a "Working directory not found" card. Pick a directory there and the message starts right away, no need to resend:
-
Running
botmux restartinside a bot's own terminal, then seeing sporadic token / gateway errors: the session carries runtime variables (TMUX,LARK_*,BOTMUX_*and so on). botmux scrubs these at its process boundaries, but if you still hit such errors, restart once from a clean shell that is not inside tmux. -
/reponumbers shift: when a new repo joins the list, the numbers after it move. → Don't hard-code numbers in automation; use/repo <project-name>or/repo <path>.
Disk / logs
tmux-server-*.logfills up the disk: these files only appear when tmux is started withtmux -v/-vv. They never rotate and can grow to hundreds of GB on a long run. botmux itself never passes-v, so you can safely delete them without touching botmux's logs.
Collaboration
- Two bots keep @-mentioning each other: if every message ends with "send to @the other bot", it loops forever. → Usually one side stopping ends it. The real cause is a chatty model, so add constraints.
Dashboard / security
- Don't post a Dashboard link with a token into a group: the token is your login credential; posting it hands the key to everyone in the group. It stays valid until you run
botmux dashboard rotate, which issues a new token and invalidates old links immediately;botmux dashboardandbotmux dashboard currentdon't rotate it. For stricter setups, bind the Dashboard to the local machine only:BOTMUX_DASHBOARD_HOST=127.0.0.1. More in Dashboard · What the token in the link is. - The Dashboard won't open: first run
curl http://<host>:<port>/__health. If it returns{"ok":true}, the service is fine, and the problem is most likely on the browser side: a proxy that isn't bypassed, the wrong host (a Mac's intranet IP may have changed), or an old link whose token has been rotated.
General troubleshooting approach
When something "won't start" or "behaves oddly", go through these three steps first:
- Reproduce the launch command: use "Copy reproduce command" in the Dashboard, or find the
Spawning fresh CLI:line inbotmux logs, and run it by hand. Permission, argument and sign-in problems usually show up right away. - Check the Web Terminal: open the session's Web Terminal and read the real error from the model or gateway.
- Let the agent diagnose: hand the symptom to your local agent and let it investigate. If you fix something, PRs to the community are welcome.
