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

Answer a human step in the web interface

Answer a human step in the web interface when you watch runs on the board and a card needs an answer. In this guide you start a run of the example pipeline ship_feature, which waits at the human step approve_plan after its first stage, and answer the human step with the form on the page for the run. At the end, the card has the mark finished in the column review, and codeband show prints answered by with your user name. If a function step fails, see Troubleshooting at the end of this page.

  • You did the Quickstart: you have a clone of codeband with the binary at build/codeband, built with just build, which builds the page into the binary.
  • Your terminal is in the codeband folder. Run each command from there unless a function step says otherwise.

How the web interface answers a human step

Section titled “How the web interface answers a human step”

ship_feature in examples/py-factory runs an agent step of the agent planner in the stage plan, then opens the human step approve_plan outside every stage block, then runs the stages build and review. The human step asks for a PlanVerdict:

examples/py-factory/py_factory/feature.py
class PlanVerdict(cb.Model):
"""A person's answer to the plan. The web interface builds its form from this type."""
approve: bool
"""True to build the plan. False stops the run."""
priority: Literal["low", "normal", "high"] = "normal"
notes: str = Field(default="", max_length=2000)
"""What the builder should also know."""
checks: list[str] = Field(default_factory=list[str])
"""What the reviewer must check."""

The run journal records the human step with the JSON Schema of its answer type, and the page builds a form from it: a checkbox for approve, a list for checks, a text area for notes and a choice for priority. The web interface passes the answer on to the daemon, as codeband answer does in a terminal. The code server checks it against the answer type, and the page shows the code server’s error text for an answer that it refuses. Every daemon client can answer an open human step of every run, and the first answer that the run accepts counts. The daemon records the user who runs codeband dev as the one who answered.

The agents of ship_feature run on the fake harness, which follows a script and runs no model. Each agent step waits two seconds before each of its text lines and tool calls, so you can watch the card move across the board.

  1. Start the daemon, the code server and the web interface

    If codeband dev from the Quickstart still runs, skip this step: it has loaded ship_feature too and serves the web interface. Otherwise, open a second terminal, change to the codeband folder, set your Claude Code login as in the Quickstart, and start codeband dev in the example:

    Terminal window
    just examples/py-factory/dev

    codeband dev prints the address of the web interface with a secret token to stdout. Then the code server logs the pipelines it loaded, ship_feature among them, and the daemon logs Listening. All three keep running. Your token is different:

    Output
    http://127.0.0.1:8765/?token=MDIR3UHKM5P77WSVRO6PHRVHZP
    Nov 25 18:56:08.687 INF Loaded pipelines comp=codeserver pipelines="[intake run_program ship_feature write_hello]" folder=…/codeband/examples/py-factory
    Nov 25 18:56:08.716 INF Serving pipelines comp=codeserver address=unix:~/.local/state/codeband/codeserver.sock
  2. Open the web interface

    Open the address that codeband dev printed in your browser, then open the board of ship_feature at http://127.0.0.1:8765/?view=board&pipeline=py-factory/ship_feature. codeband dev serves the example under the name of its folder, py-factory, so the pipeline is py-factory/ship_feature. The page keeps the token, so this address needs none. The board has the columns No stage, plan, build and review.

  3. Start a run

    Back in the first terminal, start a run of ship_feature with a title for its card and a path for the patch of its code change:

    Terminal window
    build/codeband run -d py-factory/ship_feature --title "Greet the team" --patch /tmp/greeting.patch

    -d starts the run and returns at once. codeband run prints the run ID. Your run ID is different:

    Output
    gz8rjdpx0z
  4. Open the human step from its card

    On the board, the card Greet the team is in the column plan with the running step planner. After the planner’s agent step, the card stays in plan and gets the mark needs an answer.

    Click the card. The page for the run opens at the human step approve_plan#0, with the status open. It shows the question, the plan that the planner proposed, and under Answer a form with the fields Approve, Checks, Notes and Priority.

  5. Answer the human step

    Check Approve. Under Checks, click Add and type It has one line. Under Notes, type Keep the greeting short. Leave Priority at normal, and click Answer.

    The human step gets the status answered, and the page shows the recorded answer and Answered by ada., with your user name in place of ada:

    {
    "approve": true,
    "checks": [
    "It has one line."
    ],
    "notes": "Keep the greeting short.",
    "priority": "normal"
    }

    The run goes on: the list of steps gets builder#0 in the group build, then reviewer#0 in the group review.

On the board, the card Greet the team is in the column review with the mark finished. Show the run in the first terminal, with the run ID that step 3 printed in place of RUN_ID:

Terminal window
build/codeband show RUN_ID

The status is finished, and the run journal names the user who runs codeband dev as the one who answered, here ada. The last line is the path of the patch:

Output
Run gz8rjdpx0z
Title Greet the team
Pipeline py-factory/ship_feature
Status finished
…
▸ planner#0 agent step of planner
✓ planner#0 finished after 4.3s, $0.00
▸ approve_plan#0 human step opens
✓ approve_plan#0 answered by ada after 26.6s
▸ builder#0 agent step of builder
✓ builder#0 finished after 6.2s, $0.00
▸ reviewer#0 agent step of reviewer
✓ reviewer#0 finished after 4.2s, $0.00
/tmp/greeting.patch

To stop, press Ctrl-C in the terminal of codeband dev.

When the human step closes before you answer

Section titled “When the human step closes before you answer”

The form follows the human step as the run journal shows it. While you type, someone else can answer the human step, for example with codeband answer in a terminal, or the run can be cancelled or fail. Then the form turns read-only. The page shows what happened, such as the recorded answer and Answered by grace., or Closed: ada cancelled the run before an answer., and keeps the text that you typed under Your text, kept as you typed it:.

Edit as JSON shows the answer of the fields as JSON, and Show the fields goes back. An answer type that the fields cannot show, such as a list of objects, opens in the JSON editor.

For an error that this page doesn’t cover, see Run problems.

The form shows answer rejected: … does not accept the answer

Section titled “The form shows answer rejected: … does not accept the answer”

The code server refused the answer, because it does not match the answer type. The text after it names the field and the problem, such as Input should be a valid boolean for "approve": "maybe" in the JSON editor. The human step stays open: fix the answer and click Answer again. When the run ended in the meantime, the form turns read-only.

The planner’s agent step has not ended yet. Each agent step of ship_feature takes about five seconds. When the card has the mark failed, its reason says why the run ended.

  • Human step: where a person answers, who may answer and which answers a human step accepts.
  • Answer a human step: add a human step to a pipeline of your own and answer it in the terminal of codeband run or with codeband answer.
  • Web interface: the board, the page for one run and what the web interface passes on to the daemon.
  • Cancel a run in the web interface: stop a run from its card or its page.