Band Band

Coding Agents

Band is an agent orchestrator that works with multiple coding agents through a unified adapter pattern. You choose which agent powers your chat panes, and Band handles message dispatch, output streaming, session management, and lifecycle tracking regardless of which agent is running underneath.

Supported Agents

Band currently supports three coding agents. They are auto-detected on first launch by looking for their binaries (claude, codex, opencode) on your PATH and added to the codingAgents setting. Each adapter implements the same CodingAgent interface, so switching between them only takes a settings change — no workflow modifications.

Feature Claude Code Codex OpenCode
Cost tracking Yes Yes No
Session listing Yes Yes Yes
Real-time streaming Yes Yes Yes
Tool use visibility Yes Yes Yes
Custom model selection Yes Yes Yes
Skill discovery Yes No No

The Adapter Pattern

Band uses a factory function (createCodingAgent) that accepts a configuration object with a type field and returns the appropriate adapter. Each adapter implements the CodingAgent interface (defined in packages/coding-agent/src/types.ts):

  • runSession(prompt, sessionId?, options?) — Starts an agent session and yields an async generator of events.
  • abort() — Cancels the currently running session (optional).
  • listSessions(dir) — Returns previous sessions for a directory (where supported).
  • getSessionInfo(sessionId, dir) / getLatestSession(dir) — Fast lookup of a single session's metadata.
  • getSessionMessages(sessionId, dir, options?) — Reads paginated message history with a tail / offset+limit cursor.
  • listSkills(), listModes(), listModels() — Capability discovery (where supported).

All adapters emit a common set of AgentEvent types (see packages/coding-agent/src/events.ts): session-start, text-delta, tool-use, tool-result, session-result, and error. The Band task runner consumes these events and broadcasts them to the dashboard UI in real time.

Selecting the Default Agent

Open the Band dashboard and navigate to Settings. Under the Coding Agents section, configure the agents available on your machine and pick a default. The agent type values are:

  • claude-code — Claude Code (auto-detected from claude on PATH)
  • codex — Codex CLI (auto-detected from codex on PATH)
  • opencode — OpenCode (auto-detected from opencode on PATH)

Each agent entry can specify its own command (custom executable path) and model. The defaultCodingAgent setting picks which one new chat panes use unless a per-pane override is set. Existing running sessions keep their original agent until they complete and a new session starts.

Agent Pool

Band maintains an in-memory agent pool keyed by chat pane ID. When a message is sent, Band checks the pool for an existing agent instance. If none exists, it creates one using the chat pane's configured agent type, model, and mode. This means each chat pane gets its own isolated agent instance with its own working directory, session state, and configuration. Agents are removed from the pool when a chat pane is removed or the workspace is deleted.