Coding agents
bro command reference for coding agents.
See Init and config for shared conventions and environment variables.
Choose the interaction model that matches the task:
bro launch,bro claude, andbro codexpreserve the harness's native interface.bro codeopens BitRouter's coding conversation and connects to an ACP agent.bro runsends one ACP prompt headlessly and returns NDJSON, text, or only the final answer.
These commands do not imply the durable multi-attempt workflow described in BitRouter's architecture proposals. They run or connect to the selected harness using the released ACP and launch surfaces.
bro launch
Launch a coding-agent harness as an interactive native-TUI child. Routed harnesses are pointed at the local BitRouter daemon; own-auth harnesses launch directly and are not redirected. The human drives the harness's own TUI directly (use bro run for a headless ACP prompt). Follows cargo run's separator convention: bitrouter options come before --, everything after -- is forwarded to the agent verbatim, e.g. bro launch codex -- --search.
Harnesses that route by env/args (claude, codex) are launched without touching any config file. Those that route by synthesized config (opencode, pi, hermes, openclaw) get it under .bitrouter/launch/ — your own agent config is still never modified.
The agent authenticates to BitRouter with BITROUTER_API_KEY when it is set; otherwise a local placeholder is used (fine under the skip_auth default written by bro init). A missing claude / codex binary is offered for install via its official native installer; other harnesses report their own install command instead.
Usage: bro launch <AGENT> [OPTIONS] [-- <AGENT_ARGS>...]
| Argument | Description |
|---|---|
[AGENT] | Which agent harness to launch: any catalog harness with an interactive binary (claude, codex, opencode, pi, hermes, openclaw, grok, or agy; catalog ids such as claude-acp, codex-acp, pi-acp, and hermes-acp also resolve). Own-auth harnesses such as grok and agy launch direct and are not redirected |
[AGENT_ARGS]... | Arguments forwarded verbatim to the native harness |
| Flag | Description |
|---|---|
--model <ID> | Pin the harness's model to a daemon-routable id |
-c, --config <CONFIG> | Path to bitrouter.yaml |
--base-url <BASE_URL> | Override the BitRouter inference base URL |
--no-install | Fail instead of offering to install a missing supported harness |
--no-start | Do not auto-start a missing local daemon |
--check | Verify the executable, endpoint, and route without launching |
bro launch claudeRouted harnesses point their model traffic at the local daemon. Own-auth harnesses launch directly. Use --check to verify the executable, endpoint, and route without starting the harness.
bro claude
Launch Claude Code's native interface through BitRouter
Usage: bro claude [OPTIONS] [-- <AGENT_ARGS>...]
| Argument | Description |
|---|---|
[AGENT_ARGS]... | Arguments forwarded verbatim to the native harness |
| Flag | Description |
|---|---|
--model <ID> | Pin the harness's model to a daemon-routable id |
-c, --config <CONFIG> | Path to bitrouter.yaml |
--base-url <BASE_URL> | Override the BitRouter inference base URL |
--no-install | Fail instead of offering to install a missing supported harness |
--no-start | Do not auto-start a missing local daemon |
--check | Verify the executable, endpoint, and route without launching |
bro claude-code
Alias for bro claude
Usage: bro claude-code [OPTIONS] [-- <AGENT_ARGS>...]
| Argument | Description |
|---|---|
[AGENT_ARGS]... | Arguments forwarded verbatim to the native harness |
| Flag | Description |
|---|---|
--model <ID> | Pin the harness's model to a daemon-routable id |
-c, --config <CONFIG> | Path to bitrouter.yaml |
--base-url <BASE_URL> | Override the BitRouter inference base URL |
--no-install | Fail instead of offering to install a missing supported harness |
--no-start | Do not auto-start a missing local daemon |
--check | Verify the executable, endpoint, and route without launching |
bro codex
Launch Codex's native interface through BitRouter
Usage: bro codex [OPTIONS] [-- <AGENT_ARGS>...]
| Argument | Description |
|---|---|
[AGENT_ARGS]... | Arguments forwarded verbatim to the native harness |
| Flag | Description |
|---|---|
--model <ID> | Pin the harness's model to a daemon-routable id |
-c, --config <CONFIG> | Path to bitrouter.yaml |
--base-url <BASE_URL> | Override the BitRouter inference base URL |
--no-install | Fail instead of offering to install a missing supported harness |
--no-start | Do not auto-start a missing local daemon |
--check | Verify the executable, endpoint, and route without launching |
bro run
Run one ACP agent prompt headlessly. Streams NDJSON by default, or text / quiet output when selected explicitly
Usage: bro run [OPTIONS] <AGENT> [PROMPT]
| Argument | Description |
|---|---|
<AGENT> | ACP agent id from the bundled catalog or agents: config |
[PROMPT] | Prompt to send. Use - to read stdin |
| Flag | Description |
|---|---|
--prompt-file <PATH> | Read the prompt from a file |
--load <NATIVE_SESSION_ID> | Load a harness-native session and replay its history |
--resume <NATIVE_SESSION_ID> | Resume a harness-native session without replaying history |
--cwd <PATH> | Working directory supplied to the agent session |
--direct | Do NOT route this session's LLM traffic through the daemon — let the harness use its own provider auth. Routing is attempted by default when the harness supports headless redirection |
--base-url <BASE_URL> | Override the gateway base URL (else derived from server.listen) |
--model <MODEL> | Pin the harness's model (via its model env var / -c model=) |
--no-start | Never auto-start a local daemon when none is running — fail fast |
--turn-timeout <SECS> | Per-turn deadline in seconds |
--result-schema <JSON|@PATH> | JSON Schema — inline JSON or @path — required of the final reply |
--approve-all | Approve every permission request the harness makes |
--approve-reads | Approve tool calls the harness labels read or search (the ACP tool kind); deny everything else, including unlabelled calls |
--deny-all | Deny every permission request. This is the default |
--permission-policy <JSON|@PATH> | Per-tool policy, inline JSON or @path: {"autoApprove":[…],"autoDeny":[…],"defaultAction":"approve"|"deny"}. Entries match the ACP tool kind (read, edit, execute, …), the tool-call title, or its first word. autoDeny wins over autoApprove; an unmatched request uses defaultAction, else the mode flag |
--format <FORMAT> | Output: ndjson (the default), text (the transcript as code <agent> prints it to a pipe), or quiet (assistant text only) Possible values: |
- ndjson: One self-describing JSON object per line | |
- text: | The transcript as the piped bro chat <agent> compatibility path prints it |
- quiet: | The assistant's text and nothing else [default: ndjson] |
-c, --config <CONFIG> | Path to bitrouter.yaml |
bro run codex-acp "Review the current diff" --format quietThe default permission policy denies requests. Choose an explicit approval mode or pass a per-tool policy when the task needs tools.
See Headless for prompt input, output formats, session controls, and approval policies.
bro code
Open BitRouter's coding conversation, or connect directly when an agent id is supplied
Usage: bro code [OPTIONS] [AGENT]
| Argument | Description |
|---|---|
[AGENT] | ACP agent id. Omit to choose an agent in the conversation |
| Flag | Description |
|---|---|
--load <NATIVE_SESSION_ID> | Load a harness-native session and replay its history |
--resume <NATIVE_SESSION_ID> | Resume a harness-native session without replaying history |
--turn-timeout <SECS> | Per-turn deadline in seconds for an agent session |
--direct | Do NOT route this session's LLM traffic through the daemon — let the harness use its own provider auth. Routing is attempted by default when the harness supports headless redirection |
--base-url <BASE_URL> | Override the gateway base URL (else derived from server.listen) |
--model <MODEL> | Pin the harness's model (via its model env var / -c model=) |
--no-start | Never auto-start a local daemon when none is running — fail fast |
-c, --config <CONFIG> | Path to bitrouter.yaml for a local Code session |
--socket <SOCKET> | Explicit local control socket for read-only operations |
bro code
bro code codex-acp --model openai/gpt-5Omit the agent id to choose inside the conversation, or pass an ACP agent id directly. --load replays a native session; --resume resumes it without replaying history.
How is this guide?