ReferenceCoding agents

Coding agents

bro command reference for coding agents.

7 min readEdit this page

See Init and config for shared conventions and environment variables.

Choose the interaction model that matches the task:

  • bro launch, bro claude, and bro codex preserve the harness's native interface.
  • bro code opens BitRouter's coding conversation and connects to an ACP agent.
  • bro run sends 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>...]

ArgumentDescription
[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
FlagDescription
--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-installFail instead of offering to install a missing supported harness
--no-startDo not auto-start a missing local daemon
--checkVerify the executable, endpoint, and route without launching
bro launch claude

Routed 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>...]

ArgumentDescription
[AGENT_ARGS]...Arguments forwarded verbatim to the native harness
FlagDescription
--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-installFail instead of offering to install a missing supported harness
--no-startDo not auto-start a missing local daemon
--checkVerify the executable, endpoint, and route without launching

bro claude-code

Alias for bro claude

Usage: bro claude-code [OPTIONS] [-- <AGENT_ARGS>...]

ArgumentDescription
[AGENT_ARGS]...Arguments forwarded verbatim to the native harness
FlagDescription
--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-installFail instead of offering to install a missing supported harness
--no-startDo not auto-start a missing local daemon
--checkVerify the executable, endpoint, and route without launching

bro codex

Launch Codex's native interface through BitRouter

Usage: bro codex [OPTIONS] [-- <AGENT_ARGS>...]

ArgumentDescription
[AGENT_ARGS]...Arguments forwarded verbatim to the native harness
FlagDescription
--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-installFail instead of offering to install a missing supported harness
--no-startDo not auto-start a missing local daemon
--checkVerify 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]

ArgumentDescription
<AGENT>ACP agent id from the bundled catalog or agents: config
[PROMPT]Prompt to send. Use - to read stdin
FlagDescription
--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
--directDo 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-startNever 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-allApprove every permission request the harness makes
--approve-readsApprove tool calls the harness labels read or search (the ACP tool kind); deny everything else, including unlabelled calls
--deny-allDeny 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 quiet

The 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]

ArgumentDescription
[AGENT]ACP agent id. Omit to choose an agent in the conversation
FlagDescription
--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
--directDo 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-startNever 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-5

Omit 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?

On this page