Skip to content
codeband is pre-release. These docs describe its first release, and some of what they describe is still being built.

Run problems

Each section on this page starts from the exact text that codeband run, codeband check or the daemon prints, says what causes it and how to fix it. After the fix, codeband run prints Started run and the run gets past the error. The examples use the default state folder ~/.local/state/codeband, the factory review-factory in the folder ~/review-factory, its pipeline review-factory/review and its agent reviewer. The output blocks leave out the lines that codeband run prints for each step between Started run and the final line.

Where you see it Text Section
codeband run, exit code 2 no daemon answers on … No daemon
codeband daemon or codeband dev, exit code 1 another daemon uses the state folder … Another daemon
codeband daemon or codeband dev, exit code 1 check git: … git missing or too old
codeband daemon or codeband dev, exit code 1 A message about the factories table The factories tables of codeband.toml
The daemon’s log, codeband check or the web interface The name of a factory that failed A factory failed
The daemon’s log The code server does not answer, so … Code server does not answer
codeband run, exit code 1 start run: invoke: factory …: code server unavailable: … Code server unavailable
codeband run, exit code 1 start run: invoke: factory …: the factory does not load: … Factory does not load
codeband run, exit code 1 start run: run request rejected: … Run request rejected
codeband run, exit code 1 start run: find the repository of … Not a git repository
The daemon’s log, while a run goes on The code server does not answer, so the run invokes it again Code server stopped during a run
The daemon’s log, while a run goes on, or codeband answer The factory does not load, so the run waits for it, or check the answer: the factory does not load: … Factory stopped loading during a run
codeband show or the web interface A run that stays running after you removed its factory from codeband.toml The factory of a run left codeband.toml
codeband run, exit code 1 failed: … How a failed run reads, then the section for its kind
codeband run, for an agent step or a shell step the pipeline names the sandbox …, which … does not define: … Sandbox not defined
codeband run, for an agent step or a shell step start the sandbox: the image … is not on this machine, … Image not on the machine
codeband run, for an agent step or a shell step start the sandbox: reach Docker at … Docker not reached
codeband check, exit code 1 the variable … has no value: … Variable without a value
codeband check, exit code 1 …: the harness … has no login: … Harness without a login
codeband check, exit code 1 …: claude 2.1.329 is older than 2.1.330 or …: run claude --version: … Harness program missing or too old
codeband run, for a shell step ✗ … exit code 126 after …, or a failure that the same command does not have in an agent step or in your terminal Shell step fails where an agent step passes
codeband run or the daemon’s log WRN Setup problem … message="…" codeband check finds a setup problem, then the section for the message

The CLI and the daemon find each other through the state folder, and the daemon finds each code server at the address in codeband.toml. Most problems before a run starts come from a process that is not running, that uses another state folder, or that listens on another address. Architecture shows the processes and how they connect.

no daemon answers on …: start one with 'codeband daemon'

Section titled “no daemon answers on …: start one with 'codeband daemon'”

Cause: No daemon listens on daemon.sock in the state folder that codeband run uses. Either no daemon runs, or the daemon uses another state folder because XDG_STATE_HOME, CODEBAND_STATE_DIR or --stateDir differ between the two terminals. codeband run exits with code 2.

Output
no daemon answers on ~/.local/state/codeband/daemon.sock: start one with 'codeband daemon'

Fix:

  1. In a terminal of its own, start the daemon with codeband daemon, or the daemon and the code server of one factory together with uv run codeband dev in the factory folder. The daemon logs Starting daemon with its state_dir, then Listening with its socket, and keeps running.
  2. If a daemon already runs, compare its state_dir with the folder in the error. Set the same CODEBAND_STATE_DIR or XDG_STATE_HOME in the terminal of codeband run, or pass --stateDir with the daemon’s folder.

Check: Run codeband run review-factory/review again. It prints Started run and a run ID.

Cause: A daemon already holds the lock daemon.lock of this state folder. One state folder has at most one daemon, because the daemon is the only process that writes run data. The new codeband daemon or codeband dev exits with code 1.

Output
another daemon uses the state folder ~/.local/state/codeband

Fix:

  1. Use the daemon that already runs: codeband run reaches it through the same state folder.
  2. To restart it, press Ctrl-C in its terminal. If it runs in the background, find its process ID with pgrep -f 'codeband.*daemon' and stop it with kill PROCESS-ID, where PROCESS-ID is the number that pgrep printed. Then start codeband daemon or codeband dev again.

Check: The daemon logs Listening socket=~/.local/state/codeband/daemon.sock and keeps running.

Cause: The daemon runs git --version when it starts, because every run needs git. It needs git 2.42 or later on the PATH of its environment. codeband daemon or codeband dev exits with code 1 and names what it found:

Output
check git: git 2.41.0 is older than 2.42

The daemon checks no harness program and no login when it starts. An agent step that needs one of them fails with the attempt failure kind setup, which AgentStepFailedError describes. codeband check finds these problems before a run.

Fix: Install or update git, and make sure the terminal of the daemon finds it: git --version prints the version the daemon checks. Then start the daemon again.

Check: The daemon logs Checked programs with the version of git, such as git=2.53.0.

codeband daemon or codeband dev stops at the factories table

Section titled “codeband daemon or codeband dev stops at the factories table”

Cause: codeband daemon serves the factories that the [factories.NAME] tables of codeband.toml name, and exits with code 1 when it finds no config file, a file without a factories table, a name with a character other than lowercase letters, digits, - and _, a table without a code_server of the form unix:PATH or http://HOST:PORT, or two tables with the same code_server. codeband dev serves only the factory in its working folder, and exits with code 1 when its config file has a factories table.

Fix:

  1. For codeband daemon, add a table for each factory, such as [factories.review-factory] with code_server = "unix:/home/ada/.local/state/codeband/codeserver.sock", or fix the table that the message names. Give each factory a code server on an address of its own.
  2. For codeband dev, remove the factories tables from the file that it reads, or pass --config with a file without them. To serve the factories of the file, start codeband daemon and a code server for each one instead.

Check: The daemon logs Listening socket=~/.local/state/codeband/daemon.sock and keeps running.

Cause: The daemon could not load a factory of codeband.toml: its code server does not answer at the address of code_server, or its code does not load. The daemon starts anyway, logs the name of the factory with the reason, and runs the pipelines of the other factories. No run of the failed factory starts, and its runs in progress wait until the factory is back. codeband check names it in its first lines and exits with code 1, and the pipelines screen of the web interface shows it with the reason.

Fix: For a code server that does not answer, see the next section. For code that does not load, see start run: invoke: factory …: the factory does not load: ….

Check: codeband check names no factory that failed.

The daemon logs The code server does not answer, so runs start once it does

Section titled “The daemon logs The code server does not answer, so runs start once it does”

Cause: The daemon started before the code server, or the code server listens on another address than the code_server of its table in codeband.toml. The daemon keeps running and logs the address it tried:

Output
WRN The code server does not answer, so runs start once it does factory=review-factory code_server=unix:~/.local/state/codeband/codeserver.sock err="code server unavailable: unavailable: dial unix ~/.local/state/codeband/codeserver.sock: connect: no such file or directory"

Fix:

  1. In the factory folder, start the code server on the address of code_server. For unix:STATE/codeserver.sock, where STATE is the state folder of the daemon, that is the default address of the code server when it gets the same state folder. The command is codeband codeserver, run in the environment of the factory: uv run codeband codeserver for the Python SDK. See Python SDK for its flags.
  2. The code server logs Loaded pipelines with the names of your pipelines. The daemon needs no restart.

Check: codeband run review-factory/review prints Started run.

start run: invoke: factory …: code server unavailable: …

Section titled “start run: invoke: factory …: code server unavailable: …”

Cause: The daemon runs, but no code server listens on the address in codeband.toml of the factory that the message names, here codeserver.sock in the state folder, so the daemon cannot check the run input. codeband run exits with code 1.

Output
start run: invoke: factory review-factory: code server unavailable: unavailable: dial unix ~/.local/state/codeband/codeserver.sock: connect: no such file or directory

Fix: Start the code server as in the section above, then run codeband run again.

Check: codeband run review-factory/review prints Started run.

start run: invoke: factory …: the factory does not load: …

Section titled “start run: invoke: factory …: the factory does not load: …”

Cause: The daemon reached the code server, but the code of the factory that the message names does not load. The text after does not load: says why. codeband run exits with code 1 and no run exists.

Output
start run: invoke: factory review-factory: the factory does not load: ~/review-factory/pyproject.toml has no list of strings at [tool.codeband] pipelines
Text after does not load: Cause Fix
… has no list of strings at [tool.codeband] pipelines The factory does not list its pipelines Add pipelines = ["module:function"] under [tool.codeband] in pyproject.toml
pipelines entry '…': importing … failed: and a traceback A module of the factory raises when the code server imports it Fix the error in the traceback
… is defined twice: as … and as … Two function steps or agents share a name, and the name is the first part of their step IDs Rename one of them

The code server logs the same text once when it starts, as ERR The factory does not load comp=codeserver folder=… err=…, and keeps running. The runs of the factory that are in progress wait until it loads, as the section on a factory that stops loading during a run shows.

Fix:

  1. Fix the factory as the table says.
  2. If you changed the factory, codeband dev loads it again on its own. A code server that you started with codeband codeserver loads the factory once, when it starts: stop it with Ctrl-C and start it again.

Check: The code server logs Loaded pipelines with your pipeline’s name, and codeband run review-factory/review prints Started run.

Cause: The daemon reached the code server, and the code server refused the run request. The text after rejected: says why. codeband run exits with code 1 and no run exists.

Output
start run: run request rejected: the factory has no pipeline 'reviw'
Text after rejected: Cause Fix
the factory has no pipeline 'reviw' The name after codeband run is not a pipeline of the factory Use a name from the code server’s Loaded pipelines record, after the name of its factory, such as review-factory/review
the pipeline does not accept the input: … --input does not match the pipeline’s parameters: a required field is missing, a value has the wrong type, or a field is no parameter. The validation errors follow Fix the fields that the errors name

A pipeline name without its factory, such as review in place of review-factory/review, names no pipeline, and codeband run exits with code 1.

Fix: Fix the pipeline name or the run input as the table says.

Check: codeband run review-factory/review prints Started run.

start run: find the repository of …: not a git repository

Section titled “start run: find the repository of …: not a git repository”

Cause: codeband run works on the git repository of the folder you start it in, or of the folder in --repo, and that folder is in no git repository.

Output
start run: find the repository of .: git rev-parse: exit status 128: fatal: not a git repository (or any of the parent directories): .git

Fix: Change to a folder of the target repository, or pass it with --repo PATH/TO/REPO, where PATH/TO/REPO is any folder in the repository. The CLI reference lists the flags of codeband run.

Check: codeband run review-factory/review prints Started run.

Cause: You removed or renamed the [factories.NAME] table of a factory and restarted the daemon while a run of one of its pipelines had not ended. The run keeps its status and does not fail. It waits, as it does while its code server does not answer, because the daemon finds a code server by the name of the run’s factory.

At each try, the daemon logs the run and the name of its factory.

Output
WRN The daemon serves no such factory, so the run waits for it run=wvm3fz5fbf factory=review-factory failures=3 wait=4s

Fix:

  1. To continue the run, add the table again under the old name, with the address of a code server of that factory, and restart the daemon. The run goes on from its run journal.
  2. To end the run, cancel it with codeband cancel RUN-ID, where RUN-ID is the ID that codeband ls shows.

Check: codeband show RUN-ID shows the run as running with new steps, or as cancelled.

The daemon logs The code server does not answer, so the run invokes it again

Section titled “The daemon logs The code server does not answer, so the run invokes it again”

Cause: The code server stopped while a run goes on, for example because you stopped it to load changed code. A factory reload of codeband dev stops it for about a second, and the run goes on after that without a fix. The run keeps its status and does not fail. A run waits in the same way while the code of its factory does not load, as the next section shows. The engine invokes the code server again after a wait that starts at 1 second and doubles up to 30 seconds, or at once when the code server of a factory reload answers, and logs each failure:

Output
WRN The code server does not answer, so the run invokes it again run=wvm3fz5fbf factory=review-factory failures=3 wait=4s err="code server unavailable: unavailable: dial unix ~/.local/state/codeband/codeserver.sock: connect: no such file or directory"

An invocation that runs longer than the longest function step timeout of the factory plus one minute counts as a failure too. While the code server is stopped, codeband answer fails with check the answer: code server unavailable and the human step stays open. Answer it again once the code server runs, as Answer a human step shows.

Fix: Start the code server in the factory folder on the address of its table in codeband.toml. The daemon needs no restart. If you changed pipeline code, read When pipeline code changes during a run first.

Check: The daemon logs no more does not answer lines for the run, and the run goes on to its next step or its end.

The daemon logs The factory does not load, so the run waits for it

Section titled “The daemon logs The factory does not load, so the run waits for it”

Cause: The code server runs, but the code of the run’s factory no longer loads, for example because you saved a file with a syntax error or defined a function step twice. The run keeps its status and does not fail. The engine invokes the code server again after a wait that starts at 1 second and doubles up to 30 seconds, or at once after the next factory reload of codeband dev, and logs the reason at each try:

Output
WRN The factory does not load, so the run waits for it run=qw2xt0wv96 factory=review-factory failures=3 wait=4s err="the factory does not load: ~/review-factory/pyproject.toml has no list of strings at [tool.codeband] pipelines"

While the factory does not load, codeband answer fails with check the answer: the factory does not load: and the reason, and the human step stays open.

Fix: Fix the code as the table of start run: invoke: factory …: the factory does not load: … says. If you changed the factory, codeband dev loads it again on its own. A code server that you started with codeband codeserver loads the factory once, when it starts: stop it with Ctrl-C and start it again. The daemon needs no restart, and an open human step takes an answer again.

Check: The daemon logs no more The factory does not load lines for the run, and the run goes on to its next step or its end.

A run that fails ends with one line that starts with failed:, and codeband run exits with code 1. The line has the run failure kind, the step ID of the step that failed and the message, in this order: failed: KIND: STEP-ID: MESSAGE. The line leaves out the parts that do not apply. A step ID such as check#0 is the name of the function step, shell step, agent or human step, a # and a counter.

Kind Meaning Section
definition_error Pipeline code uses one name for two kinds of step definition_error
diverged Pipeline code no longer matches a recorded step of the run diverged
pipeline_error Pipeline code raised an exception that it did not catch, such as a failed agent step or a failed function step Agent step failures, Handle a function step that fails or times out
invalid_record A recorded value no longer decodes as its type, for example after a function step’s return type changed Start a new run
No kind The engine could not continue the run. The message says why Fix what the message names, then start a new run

A run that failed stays failed: its run journal keeps every step it recorded. Fix the cause and start a new run with codeband run.

Cause: Pipeline code gives the same name to two kinds of step, such as the function step check and a shell step cb.shell_step([...], name="check"). The kinds share the counter of the step IDs, so a name names one kind of step.

Output
Started run t33rbmas1e
✓ check#0 function step
failed: definition_error: pipeline code uses the name 'check' for a function step and for a shell step: give one of them another name

Fix:

  1. Rename one of the two steps in pipeline code, for example the shell step to name="run_checks".
  2. codeband dev loads the changed code on its own. Stop a code server that you started with codeband codeserver with Ctrl-C and start it again.

Check: codeband run review-factory/review gets past the step and ends without definition_error.

Cause: A run moves forward by run replay: each invocation runs the pipeline function from the start, and every recorded step returns its recorded value. Recorded steps win over changed pipeline code. Two changes stop the run replay, and the run fails with diverged:

Message What changed
recorded step check#0 is a function step, the code asks for a shell step The step with this ID is now another kind of step
recorded step check#0 started at COMMIT-A, the code now starts it at COMMIT-B An agent step or shell step now starts at another commit

Both happen when the code server loads changed pipeline code while a run of that pipeline is still going on, also in a factory reload of codeband dev:

Output
Started run m4hn3arr71
failed: diverged: check#0: recorded step check#0 is a function step, the code asks for a shell_step

A changed input of a recorded step does not fail the run. The step returns its recorded value, and the run continues.

Fix:

  1. Start a new run with codeband run. The new run records its steps with the code that the code server loaded.
  2. To keep a run that is going on from diverging, start the code server with changed code only after the run has ended, or change code only after the last step that the run has recorded.

Check: The new run ends without diverged.

AgentStepFailedError: agent step … failed: …

Section titled “AgentStepFailedError: agent step … failed: …”

Cause: An agent step ended without a step output, and pipeline code did not catch the AgentStepFailedError that the agent step raised. The run fails with pipeline_error, and the message is the traceback. Its last line names the agent step, the attempt failure kind and the message:

Output
Started run svcpj9a58g
failed: pipeline_error: Traceback (most recent call last):
…
File "~/review-factory/review_factory/pipeline.py", line 24, in review
agent_step = reviewer.do(req)
…
codeband._model.AgentStepFailedError: agent step reviewer#0 failed: invalid_output: 2 validation errors for ReviewOutput
approved
Input should be a valid boolean, unable to interpret input [type=bool_parsing, input_value='maybe', input_type=str]
For further information visit https://errors.pydantic.dev/2.14/v/bool_parsing
summary
Field required [type=missing, input_value={'approved': 'maybe'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.14/v/missing

An attempt is one run of the agent step by its harness, the program that runs the agent, in its own workspace. The engine retries a failed attempt depending on the kind of its attempt failure, as Attempts and retries lists. AgentStepFailedError comes after the last attempt, and its kind is the attempt failure kind of that attempt. The daemon’s log has a line for each failed attempt, with its kind and message: Attempt failed, retrying with the wait in retry_after when the engine starts another attempt, and Attempt failed when it does not.

Attempt failure kind Cause Fix
invalid_output The step output does not match the agent’s output type, as in the example above, or the agent ended without a step output Read the validation errors. Make the prompt ask for each field of the output type, or change the output type
timeout The attempt ran longer than the agent’s timeout, 30 minutes by default. The message is the attempt ran longer than its timeout Give the agent a smaller piece of work, or a longer timeout
rate_limit The model provider limited the rate of requests, and the limit still held after the engine’s last retry Wait and start a new run, give the daemon longer waits with --rateLimitBackoff, or lower the number of agent steps that run at the same time
api_error The model provider’s API failed, or the connection to it dropped Start a new run later
crash The harness ended before it reported how the attempt ended, for example because something stopped its process Read the message: it ends with what the harness printed last
setup The attempt could not start: the harness has no login, a variable of the [env] table of codeband.toml has no value, or the harness program is missing or older than its minimum. The message names the variable or the program and ends with run codeband check, such as the harness claude has no login: set one of CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY in codeband.toml or in the environment of the daemon; run codeband check. A sandbox name that codeband.toml does not define, an image of a docker sandbox that is not on the machine and a Docker that the daemon does not reach also fail the attempt with setup, with a message that names the sandbox, the image or where the daemon looked. The engine does not retry it Run codeband check, and fix each problem it prints as codeband check finds a setup problem says. For a sandbox, see Sandbox not defined, Image not on the machine and Docker not reached. Then start a new run
error Any other failure, such as a login that the model provider rejected or a workspace that could not be made Fix what the message names

Fix:

  1. Fix the cause that the table gives for the attempt failure kind.

  2. To let the run go on after a failed agent step, catch AgentStepFailedError in pipeline code. This pipeline stops the run with a reason instead of failing it:

    pipeline.py
    @cb.pipeline
    def review(instruction: str) -> None:
    try:
    reviewer.do(ReviewInput(instruction=instruction))
    except cb.AgentStepFailedError as err:
    raise cb.Stop(f"the reviewer gave no review: {err.kind}") from err

    The run now ends as stopped, and codeband run exits with code 3:

    Output
    Started run mc17fyqy8f
    stopped: the reviewer gave no review: invalid_output

AgentStepFailedError has the fields step_id, kind and message. The Python SDK reference lists them.

Check: A new run of review ends without AgentStepFailedError in its last line.

the pipeline names the sandbox …, which … does not define: …

Section titled “the pipeline names the sandbox …, which … does not define: …”

Cause: The pipeline names a sandbox definition, such as @cb.pipeline(sandbox="go") in Python, and the codeband.toml of the daemon has no [sandbox.go] table. Each agent step of the pipeline fails with the attempt failure kind setup after one attempt, and the message names the sandbox and the file:

Output
codeband._model.AgentStepFailedError: agent step reviewer#0 failed: setup: the pipeline names the sandbox go, which ~/.config/codeband/codeband.toml does not define: add a [sandbox.go] table

A shell step of the pipeline does not run its program. It is not ok, and its output is one line with the same message after codeband: . When the daemon read no config file, the message says it read no config file, so add a [sandbox.go] table to codeband.toml. codeband check does not test sandbox definitions, so it does not report this problem.

Fix:

  1. Add the table to the codeband.toml that the message names, with the kind of the sandbox:

    codeband.toml
    [sandbox.go]
    kind = "host"

    The [sandbox.NAME] reference lists its keys. When the name in the pipeline is a typo, fix the pipeline instead.

  2. Restart the daemon. It reads codeband.toml when it starts.

Check: Run the pipeline again. Its agent steps get past the attempt failure kind setup, and the step request on the run page of the web interface shows the sandbox as go (host).

start the sandbox: the image … is not on this machine, …

Section titled “start the sandbox: the image … is not on this machine, …”

Cause: The pipeline’s sandbox definition is of the kind docker, and its image is not on the machine of the Docker that the daemon uses. The daemon never pulls an image. Each agent step of the pipeline fails with the attempt failure kind setup after one attempt:

Output
codeband._model.AgentStepFailedError: agent step reviewer#0 failed: setup: start the sandbox: the image ghcr.io/example/go-agents:1.25 is not on this machine, and codeband pulls no image: run docker pull ghcr.io/example/go-agents:1.25

A shell step of the pipeline is not ok, and its output is the same message after codeband: . codeband check does not test images, so it does not report this problem.

Fix: Run the command of the message, or build the image with that name:

Terminal window
docker pull ghcr.io/example/go-agents:1.25

The daemon reads the image at the start of each agent step and shell step, so the next run finds it without a restart.

Check: Run the pipeline again. The step request on the run page of the web interface shows the sandbox as go (docker, sha256:…).

Cause: The pipeline’s sandbox definition is of the kind docker, and the daemon reaches no Docker where it looked. Docker is not running, or the daemon looks in another place than your docker program, because DOCKER_HOST, DOCKER_CONTEXT or DOCKER_CONFIG differ between the daemon’s terminal and yours. The message names the address and where it came from:

Output
codeband._model.AgentStepFailedError: agent step reviewer#0 failed: setup: start the sandbox: reach Docker at unix:///var/run/docker.sock (no DOCKER_HOST and no current context): failed to connect to the docker API at unix:///var/run/docker.sock; check if the path is correct and if the daemon is running: dial unix /var/run/docker.sock: connect: no such file or directory

The part in brackets is DOCKER_HOST when that variable set the address, and the context and the config file when a context of the docker program did.

Fix:

  1. Start Docker, such as Docker Desktop.
  2. Run docker version in the daemon’s terminal. When it reaches Docker and the daemon does not, start the daemon again from that terminal, so that it gets the same DOCKER_HOST and DOCKER_CONTEXT.

Check: Run the pipeline again. Its agent steps get past the attempt failure kind setup.

A shell step fails, but the same command passes in an agent step or in your terminal

Section titled “A shell step fails, but the same command passes in an agent step or in your terminal”

Cause: The program of a shell step gets PATH, HOME and USER of the daemon’s environment, the variables of the [env] table of codeband.toml and the variables that the shell step names. No shell reads your shell profile, such as ~/.zshrc, first. Your terminal reads it, and so does the Bash tool of Claude Code before it runs a command of an agent step. A tool manager that your profile sets up, such as asdf, then finds its tools in your terminal and in an agent step, but not in a shell step. An asdf shim such as go that does not get ASDF_DATA_DIR exits with code 126 and prints nothing:

Output
▸ program#0 shell step: go version
✗ program#0 exit code 126 after 0.1s
stopped: the program exited with code 126 and wrote no output

When a script or a justfile recipe runs the tool, the line shows the exit code of the script, not 126, and the output holds only what the script prints. A script that reads the empty output of the tool can then name a wrong cause, such as go fix changes pending.

Fix:

  1. In your terminal, run the command with only the variables of a shell step: env -i PATH="$PATH" HOME="$HOME" USER="$USER" go version. It fails as in the shell step, and echo $? prints 126.

  2. Add the variables that your profile sets, one at a time, until the command passes. For asdf, env -i PATH="$PATH" HOME="$HOME" USER="$USER" ASDF_DATA_DIR="$ASDF_DATA_DIR" go version prints the version of Go.

  3. Add each variable that the command needs to the [env] table of codeband.toml, with the value of the daemon’s environment:

    codeband.toml
    [env]
    ASDF_DATA_DIR = { env = "ASDF_DATA_DIR" }
  4. Start the daemon again from a terminal that sets the variable. The daemon reads its environment and codeband.toml when it starts.

Every agent step and every shell step gets the variables of [env]. For a variable that one program needs, name it in env of cb.shell_step instead.

Check: Run the pipeline again. The line of the shell step starts with ✓, such as ✓ program#0 exit code 0 after 0.2s.

codeband check tests the setup that the agent steps and shell steps of your pipelines need, and prints one line per problem after the problems of the preview graphs. It exits with code 1 when it finds one. codeband run prints the same text as a Setup problem warning and starts the run, and the daemon logs it when it gets a changed factory. An agent step that starts with such a problem fails with the attempt failure kind setup, and its message is the same text followed by ; run codeband check.

Cause: A variable of the [env] table of codeband.toml has no value. Every agent step and shell step gets every variable of [env], so each of them would fail. The reason after the name says which source failed:

Output
the variable DATABASE_URL has no value: the daemon's environment does not set DATABASE_URL
the variable CLAUDE_CODE_OAUTH_TOKEN has no value: its command ran past its time limit of 30s

Fix:

  1. For a value source, give it a string that is not empty.
  2. For an env source, set the variable in the terminal of the daemon, then start the daemon again: the daemon reads its environment when it starts.
  3. For a command source, run the command in the terminal of the daemon. It must exit with code 0 within 30 seconds and print the value. The line holds the first line of what the command printed to stderr, such as the message of a locked password manager.

Check: codeband check prints no line for the variable.

Cause: A pipeline has an agent step on a harness, and none of the login variables of that harness has a value. The line starts with the pipelines that need the harness:

Output
review-factory/review: the harness claude has no login: set one of CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY in codeband.toml or in the environment of the daemon

Fix: Add one of the variables that the line names to the [env] table of codeband.toml, such as CLAUDE_CODE_OAUTH_TOKEN = { command = ["op", "read", "op://Private/claude/token"] }, and start the daemon again. Or export it in the terminal of the daemon and start the daemon again. codeband check tests that the variable has a value, not that the login works.

Check: codeband check prints no line for the harness.

…: claude … is older than … or …: run claude --version: …

Section titled “…: claude … is older than … or …: run claude --version: …”

Cause: A pipeline has an agent step on Claude Code, and the daemon finds no claude on the PATH that an agent step gets, finds one older than 2.1.330, or claude --version runs longer than 10 seconds. An agent step gets the PATH of [env] in codeband.toml when the file sets one, and the PATH of the daemon’s environment otherwise. The line starts with the pipelines that need the harness:

Output
review-factory/review: claude 2.1.329 is older than 2.1.330
review-factory/review: run claude --version: exec: "claude": executable file not found in $PATH
review-factory/review: claude --version ran past its time limit of 10s

Fix: Install or update Claude Code, and make sure that the PATH of an agent step finds it: claude --version prints the version that the daemon checks. The daemon reads its environment and codeband.toml when it starts, so start it again after you change the PATH.

Check: codeband check prints no line for the harness.

  • Architecture: which process starts, runs and records what, and how they find each other through the state folder.
  • codeband CLI: every flag, environment variable and exit code of codeband run and codeband daemon.
  • Python SDK: cb.AgentStepFailedError, cb.Stop and the code server’s flags.
  • Glossary: the terms this page uses, such as agent step, attempt and invocation.