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.
Before you start
Section titled “Before you start”- You did the Quickstart: you have a clone of codeband with the binary at
build/codeband, built withjust build, which builds the page into the binary. - Your terminal is in the
codebandfolder. 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:
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.
-
Start the daemon, the code server and the web interface
If
codeband devfrom the Quickstart still runs, skip this step: it has loadedship_featuretoo and serves the web interface. Otherwise, open a second terminal, change to thecodebandfolder, set your Claude Code login as in the Quickstart, and startcodeband devin the example:Terminal window just examples/py-factory/devcodeband devprints the address of the web interface with a secret token to stdout. Then the code server logs the pipelines it loaded,ship_featureamong them, and the daemon logsListening. All three keep running. Your token is different:Output http://127.0.0.1:8765/?token=MDIR3UHKM5P77WSVRO6PHRVHZPNov 25 18:56:08.687 INF Loaded pipelines comp=codeserver pipelines="[intake run_program ship_feature write_hello]" folder=…/codeband/examples/py-factoryNov 25 18:56:08.716 INF Serving pipelines comp=codeserver address=unix:~/.local/state/codeband/codeserver.sock -
Open the web interface
Open the address that
codeband devprinted in your browser, then open the board ofship_featureathttp://127.0.0.1:8765/?view=board&pipeline=py-factory/ship_feature.codeband devserves the example under the name of its folder,py-factory, so the pipeline ispy-factory/ship_feature. The page keeps the token, so this address needs none. The board has the columnsNo stage,plan,buildandreview. -
Start a run
Back in the first terminal, start a run of
ship_featurewith 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-dstarts the run and returns at once.codeband runprints the run ID. Your run ID is different:Output gz8rjdpx0z -
Open the human step from its card
On the board, the card
Greet the teamis in the columnplanwith the running stepplanner. After the planner’s agent step, the card stays inplanand gets the markneeds an answer.Click the card. The page for the run opens at the human step
approve_plan#0, with the statusopen. It shows the question, the plan that the planner proposed, and under Answer a form with the fields Approve, Checks, Notes and Priority. -
Answer the human step
Check Approve. Under Checks, click Add and type
It has one line.Under Notes, typeKeep the greeting short.Leave Priority atnormal, and click Answer.The human step gets the status
answered, and the page shows the recorded answer andAnswered by ada., with your user name in place ofada:{"approve": true,"checks": ["It has one line."],"notes": "Keep the greeting short.","priority": "normal"}The run goes on: the list of steps gets
builder#0in the groupbuild, thenreviewer#0in the groupreview.
Check that it worked
Section titled “Check that it worked”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:
build/codeband show RUN_IDThe 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:
Run gz8rjdpx0zTitle Greet the teamPipeline py-factory/ship_featureStatus 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.patchTo 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.
Troubleshooting
Section titled “Troubleshooting”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 card has no needs an answer mark
Section titled “The card has no needs an answer mark”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.
Related
Section titled “Related”- 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 runor withcodeband 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.