The conductor
On this page
The conductor runs coding agents on tickets: clara start for one ticket, clara work for
every ready one. This page says how a run goes, which agents it can start, what limits hold
it, and how a person stays in charge. SECURITY-MODEL.md has the
full guarantees and how each is tested.
Agent runs cost money on the agent's own account. Try the loop first with clara demo, which
uses a scripted agent and spends nothing.
Chats and runs
At a terminal, clara start <id> opens a chat, not a run: the agent works the ticket with you
in that terminal, in the ticket's worktree and branch (D-158). Claude Code is the default;
--agent codex, gemini, cursor, copilot or antigravity opens the chat on that agent
instead (D-169). A chat pushes its branch, opens the pull request and hands the ticket in; the
review is the pull request. Only Claude Code's settings refuse a merge, a force-push or a push
to the base branch; the other agents are told the same rules and keep their own approval
prompts. clara chats lists the chats on this machine.
Everything below is about runs nobody types in: clara start <id> --headless, clara start
with no terminal or with --json, and clara work.
Before the first run
clara inithas written a board, with the checks it found (such asnpm test) and the install command your lockfile pins asconductor.setup.clara trusthas been run by a person on this machine. Nothing from the board's settings runs until then: not the checks, the setup commands, the router or a custom agent's command.- The agent's CLI is installed and signed in.
clara agentslists the agent programs on this machine, their versions and whether they are signed in, and every agent the board names with what would stop it from starting.
Only a person can start a run. An agent cannot start one through Clara.
How a ticket finds its agent
clara start <id> picks the agent in this order:
--agent <name>, when given.- The ticket's assignee, when that is an agent (
agent:claude). - The board's
router.command, when set: a trusted command that reads the ticket as JSON and prints the agent to use. It has 30 seconds. - The first rule in
routingwhosewhenquery matches the ticket. A rule withoutwhenmatches every ticket. A rule can set themodeltoo.
The agent's profile, .clara/agents/<name>.md, names its adapter, model, runtime,
max_parallel and permissions. An agent named after an adapter, such as claude or codex,
works without a profile. FORMAT.md has the fields.
What a run does
- Makes a git worktree under
CLARA_HOME, on a branch named for the ticket, such asclara/WEB-12-send-sign-in-links, fromconductor.base_branch. Your checkout is never touched, and runs working in parallel never share files. A ticket keeps its worktree and branch from one run to the next. - Runs
conductor.setup(such asnpm ci) once, when the worktree is made. - Claims the ticket as
agent:<name>. - Starts the agent with a prompt that holds the ticket's context pack. Ticket text is fenced as information, never as instructions.
- When the agent ends, runs the board's checks on its last commit. When they pass, the ticket
is handed in and goes to
in_review. When they fail, the agent is told what failed and tries again, up toconductor.max_attempts(2 by default). After that the ticket is blocked with the reason.
If the agent asks a question, the ticket is blocked and the run ends. Answer with
clara answer <id> ... and run clara start <id> --headless again: agents that can resume
carry on the same session.
A run's record, its events and its output, with secrets hidden, are kept in
.clara/.local/runs/ on this machine. They never travel with the board.
Working many tickets
clara work starts an agent on every ready ticket:
- First the tickets agents hold that can carry on, such as one whose question was answered.
Then the ready ones, in the order
clara nextgives. - Up to
conductor.max_parallelruns at once (3 by default), or--max, and each agent no more than its profile'smax_parallel. - As each run ends, it starts the tickets that run unblocked.
- Before it looks for work, it makes the tickets the board's routines are due.
clara work --dry-run # the plan as waves of tickets that can run together
clara work # work until nothing is ready and nothing runs
clara work --once # only what is ready now
clara work --watch # keep looking for work until Ctrl-C
Following and stopping runs
| Command | What it does |
|---|---|
clara runs [ticket] |
Runs on this machine, newest first. |
clara top |
Every run going, live. |
clara logs <run> [-f] |
A run's output; -f follows it. --raw shows the agent's own events. |
clara stop <run> |
Stops a run, from any terminal, as Ctrl-C would. |
Ctrl-C in clara start or clara work interrupts each agent first, then ends it. The web
board's runs view shows the same runs.
Limits
These are in conductor in config.json (FORMAT.md):
| Key | Default | What it limits |
|---|---|---|
max_minutes |
45 | How long one run may take. Binds every agent. |
max_turns |
100 | Turns in one run. Claude Code only. |
max_budget_usd |
5 | Spend in one run. Claude Code only. |
daily_budget_usd |
20 | What agents on this machine spend over a rolling 24 hours. |
max_attempts |
2 | Tries after failing checks, and send-backs by the reviewer agent. |
max_parallel |
3 | Runs at once. |
At the time limit, the agent gets an interrupt, then a stop, then a kill, by process group. When the daily ceiling is reached, new runs wait and you are told. A run going counts its whole spend limit until it ends, so runs started together cannot pass the ceiling between them.
Only Claude Code reports spend in dollars and takes a turn and spend limit. For the other agents only the time limit binds, and the daily ceiling counts each of their runs at its spend limit while it goes.
Permission profiles
Each agent profile has permissions:
guarded, the default. The agent may edit files in the worktree, run the board's checks and setup commands, read with git,git addandgit commit, and use Clara's tools where the agent has them (Claude Code, Codex, OpenCode and Copilot CLI; Gemini CLI, Cursor, Antigravity and custom agents run without them and end with their question or summary). Anything else is refused, or put to a person (below).auto. The agent's own safety classifier or reviewer decides, where it has one (Claude Code, Codex, Copilot CLI). The others holdautoasguarded.open. Refused: Clara does not start it.
Claude Code, Gemini CLI, OpenCode and Copilot CLI runs are refused git push, force and
history rewrites, worktree changes and gh pr create or merge by a rule Clara gives them.
Codex, Cursor and Antigravity take no such rule from Clara, so their sandbox alone keeps them
from pushing, and a custom agent is held only by what its command does. Landing work is a
person's approval.
The approval bridge
In a guarded Claude Code run, a tool its rules do not allow is put to a person through Clara's
clara_permission tool instead of being refused outright. The question shows in
clara start, clara work, clara runs and clara top. Answer it with:
clara allow <id> [note]
clara deny <id> [note]
Only a person answers. A run has at most three questions waiting, and each waits up to ten minutes. The other agents run headless with no bridge, so what their profile does not allow is refused.
The agents
| Adapter | Program | State |
|---|---|---|
claude |
Claude Code | Run for real with Claude Code 2.1.332 and Haiku on 2026-11-28, from claim to review (VERIFIED.md). scripts/claude-smoke.mjs repeats a capped run. |
codex |
Codex CLI | Built from its documentation, not yet run here. |
gemini |
Gemini CLI | As above. |
antigravity |
Antigravity CLI (agy) |
As above. |
cursor |
Cursor CLI | As above. |
opencode |
OpenCode | As above. |
copilot |
Copilot CLI | As above. |
custom |
Any command line | Built and tested with a stand-in command. |
demo |
The scripted agent of clara demo |
For the demo only. |
An adapter not yet run is labelled so in clara agents, clara start and clara work.
VERIFIED.md records what was checked against each agent's documentation.
SECURITY-MODEL.md has a table of what holds each agent in each
profile. Enforcement depends on each agent's own controls as documented.
Gemini CLI, Cursor CLI and custom agents cannot resume a session, so a ticket started again starts a fresh one, with the handoff note.
Custom agents
Any agent with a command line can work tickets through the custom adapter. Its profile gives
the command as a template, such as command: aider --message {prompt}, with the placeholders
{prompt}, {prompt_file}, {ticket} and {model}. The command is trusted like a check, and
started without a shell, so ticket text is always one argument. Clara cannot hold a custom
agent to guarded: it may do anything its own flags allow. It reports no spend, and it is
never used as a reviewer. See FORMAT.md.
The fake agent, for tests
Clara's tests never start a real agent. test/fixtures/fake-agent.mjs stands in for
claude -p behind the real Claude Code adapter: it speaks the same stream of events, calls
Clara's MCP tools and commits in the worktree. A mode chosen by FAKE_AGENT_MODE (or
FAKE_AGENT_MODES, one per attempt) makes it succeed, fail its checks, ask a question, ask
permission, hang, crash, run out of budget or turns, and more. FAKE_REVIEW_MODE drives it as
a reviewer and FAKE_PLAN_MODE as a planner. The browser journeys put a shim named claude on
PATH that runs it. It never ships in the package; to see the loop yourself, use clara demo.
On GitHub Actions
An agent whose profile says runtime: actions is worked by the work workflow instead of on
a machine. See GITHUB.md.