Claude Code Tab
Situation when you type /claude |
What happens |
|---|---|
The project already has a claude terminal worker |
Its tab opens, or gets the focus if it is open |
claude is installed, no worker yet |
A claude worker is added to .mbm/workers.json and its tab opens; toast added claude to workers.json |
claude is not installed |
A Claude Code is not installed dialog offers Install / Cancel |
A worker named claude runs another command |
Toast a worker named "claude" already runs another command; rename one of them |
/claude runs Anthropic's Claude Code CLI in a terminal tab of this project, so it works beside
your mBm sessions: hand text to it, split it next to main, and let it message the other workers.
The command is also in the palette as Open a Claude tab.
This tab is the way to use a Claude Pro or Max subscription with mbm2: Claude Code signs in
with your subscription itself. mbm2 does not offer the subscription as a model provider and does
not pool several subscriptions (ADR 0269 A6). Pay-per-use Anthropic API keys are ordinary
providers in /connect (Connect). Rename the tab like any worker with
<leader>shift+r.
Open It
-
In the project, type
/claudeand pressreturn. -
The tab bar appears with the new tab focused, drawn as a browser tab in the accent colour:
○ 1 main ╭────────────╮ shop-api ──────────╯ ● 2 claude ╰─────────────────────────────────────────────────── -
The first time in a folder Claude Code asks whether you trust it. Answer it yourself in the tab; team messages are pasted, and an unanswered dialog would swallow them.
-
Sign in to Claude Code in that tab if it asks.
mbm2never reads, copies or stores its credentials.
Switch back with alt+1 (or <leader>tab), and to Claude with alt+2. Next time you start
mbm2 in this project the tab is restored if it was open.
Install Claude Code From mBm
When claude is on neither your PATH nor where Anthropic's installer puts it
(~/.local/bin/claude, ~/.claude/local/claude), /claude asks first and downloads nothing:
Claude Code is not installed
mBm can install it with Anthropic's official installer, which runs:
curl -fsSL https://claude.ai/install.sh | bash
Install Cancel
⇆ select enter confirm esc cancel
| Choice | Effect |
|---|---|
Install (highlighted first), return |
Opens a terminal tab claude-install that runs the installer, so you see its output |
Cancel, or esc |
Nothing is installed |
On Windows the dialog shows and runs
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://claude.ai/install.ps1 | iex".
| Installer result | What follows |
|---|---|
Exit status 0 and claude found |
The claude-install tab closes and the Claude tab opens, as in Open it |
| Non-zero exit | Toast the Claude Code installer exited with status <n>; its output stays in the claude-install tab |
Exit 0 but claude still not found |
Toast the installer finished but claude is still not found; see the claude-install tab |
The installer runs where terminals run: on the runtime host. In local mode that is your machine.
Choosing Install again while the installer tab is still running focuses that tab instead of
starting a second installer.
What Is Written
/claude adds this worker to the project's workers file (created if missing):
{
"workers": [
{ "name": "claude", "kind": "terminal", "command": "claude" }
]
}
When the installer placed claude outside your PATH, command is its absolute path. Edit the
worker like any other (Workers), for example to pass arguments:
{ "name": "claude", "kind": "terminal", "command": "claude", "args": ["--model", "opus"] }
The arguments are Claude Code's own; check claude --help.
Claude On The Team
With the runtime on this machine, mbm2 starts Claude Code with two extra arguments: an
--mcp-config file for this run that points at the mbm2_team message server, and
--allowedTools for its five tools only (list_workers, send_message, list_tasks, add_task,
update_task). Claude Code can then message main and the other workers and use the shared board
(Teamwork). Its own configuration and sign-in are not changed.
Example: from main, hand a task to Claude.
- In
main, select the paragraph to hand over (or select nothing to use the last reply). <leader>f, pickclaude,return. The text is pasted into Claude's input as one paste:sent to claude — alt+2.- Go to the tab (
alt+2) and pressreturnthere to submit it.
Example: watch Claude and mBm side by side. In main, /split, choose claude. A terminal pane
needs at least 80×12 cells; in a smaller window the split hides until the window grows.
Keys Inside The Claude Tab
| Key | Goes to |
|---|---|
Everything you type, including esc and ctrl+c |
Claude Code |
shift+tab |
mbm2: next tab (Claude Code's own mode cycle does not receive it while another tab is open) |
ctrl+x (the leader), then a workspace key |
mbm2: <leader>tab next tab, <leader>o overview, <leader>f hand-off, … |
<leader><leader> |
A literal ctrl+x to Claude Code |
alt+1 … alt+9 |
mbm2: jump to that tab |
Close the tab with <leader>shift+w; while Claude runs it asks in a box in the middle of the screen,
Close claude? with Yes and No (No focused, esc keeps the tab).
Closing removes its terminal on the runtime.
With --attach
With a remote runtime, the tab runs claude on the server, so Claude Code must be installed and
signed in there. The install offer checks this machine, not the server. The team bus is off for a
remote runtime, so Claude runs without the team tools.
Pitfalls
| Symptom | Cause and fix |
|---|---|
could not add claude: workers file has comments; edit it raw to keep them |
/claude will not rewrite a commented workers.jsonc; add the worker by hand |
no project directory to keep the claude tab in |
mbm2 has no project directory to write .mbm/workers.json into; start it in your project |
| A team message is still in Claude's input | Check Needs You and inspect the draft before submitting it. See Teamwork. |
| The first message vanished into a dialog | Claude Code's trust question was open; answer it, then resend from /team or by hand |
claude works in your shell but /claude offers to install |
The CLI is somewhere else than PATH and the two installer locations; put it on PATH |
Published from revision f88fc66f 2026-11-30