deepwork
Multi-agent workflows on iii with the kanban board as the task list: parallel implementation tickets, tests and independent verification/review once per integrated wave, and bounded rounds. Code goals get a dev flow: autonomous reversible decisions with optional design/plan approval, tickets in isolated git worktrees, batch validation, a branch review and a kept branch unless you explicitly choose another finish.
# With the iii engine running
iii call directory::download-kit kit=iii/deepwork@0.10.0Exact versions are immutable. Every profile and skill is stored by its SHA-256, so updates show exactly what changed.
Readme
Open as markdowndeepwork
Give Deepwork a goal and a team of agents works it, with the kanban board as the task list:
- Deepwork breaks the goal into tickets.
- Each ticket gets a lead agent; code tickets have one implementation phase.
- Leads run in parallel, in waves.
- Rounds repeat until the goal is done, nothing is left, progress stalls, rounds run out or the budget is spent.
A goal that changes code in a git repository runs the dev flow. By default (approve=auto), Deepwork decides routine local reversible details and starts the plan without a card; consequential ambiguities still need your decision. Pass approve=on for design and plan approval. Each code ticket is implemented in its own git worktree, with one commit, then integrated on the run branch. One batch worker writes the tests for the integrated wave; verification and review run side by side on that combined result. Cards become Done only after their batch passes (verify=off skips the check and marks them accepted). The whole branch is reviewed and kept locally by default. An explicit finish choice can merge it, open a PR, or open a PR that merges once CI is green; autonomy never authorizes those actions by itself. Other goals (research, reading, analysis) run the plain flow: the plan starts automatically unless approve=on, and each ticket is worked and verified. When at least two tickets finish with a result, and the run was not stopped, blocked or over budget, one last ticket merges the results into a single verified report that cites the ticket behind every claim (synthesize=off turns it off).
Deepwork needs only the harness, state, kanban and ide workers.
Profiles
| Profile | What it does | Model to pin |
|---|---|---|
deepwork |
the orchestrator you talk to | none: uses the session's |
deepwork-lead |
runs a ticket or an integrated batch through its phases | a fast, cheap one |
deepwork-worker |
research, reading, analysis | optional |
deepwork-impl |
implements a card, or writes tests and repairs a batch | a strong one |
deepwork-adversary |
verifies and reviews a dev batch, or verifies a plain ticket | a mid-tier one |
deepwork-verifier |
base of the checkers, used for judges | none: each judge sets one |
Every profile except deepwork is hidden.
Install
iii call directory::download-kit kit=iii/deepwork apply=true --timeout-ms 1200000Sometimes the reply is a plan instead of an install. That happens when there are warnings or decisions, for example a profile with the same id already exists. Review the plan and apply it in the ADE under Directory → Kits, or run:
iii call directory::kits::apply plan_id=<plan_id> --timeout-ms 1200000Applying can take minutes. If the command times out, the apply keeps running, so check Directory → Kits instead of running it again.
Pin the models
The kit ships without models because it can't know your providers. Add a model: <provider>::<model> line to these files:
agents/deepwork-lead.md(optional: without a pin,lead_model=autopicks a lighter sibling of the orchestrator's model from the same provider, or the orchestrator's own model when its provider lists no prices;lead_model=<provider>::<model>names one from any provider)agents/deepwork-impl.mdagents/deepwork-adversary.mdagents/deepwork-worker.md(optional)
Use the provider::model form so reasoning_effort reaches the provider. Kit updates keep your edits.
A tier without its own model uses the one set on Default (agents/default.md). If Default has none, it uses the orchestrator's model, also when lead_model runs the leads on a lighter one (the leads pass the orchestrator's model to their phases). An unpinned lead spends one turn per phase on that model. With judges=, deepwork-verifier must resolve no model at all, Default included, or the run won't start.
Run it
In the console, pick Deepwork and type the goal. To change the defaults, add an args: line:
Add per-user rate limits to the login route.
args: max_rounds=2 concurrency=4 budget_usd=5| Arg | Default | What it does |
|---|---|---|
flow |
auto |
dev for code goals in a git repository, plain for the rest. Set it to force one |
approve |
auto |
decides routine local reversible choices and starts without a Plan card; asks only for consequential ambiguity. on requests design, plan and finish approval. auto/off keep the branch without a Finish card; neither bypasses permissions or safety boundaries |
synthesize |
on | in the plain flow, ends the run with one ticket that merges the done tickets' results into a single report, verified like any other ticket. It runs when at least two tickets are done, and not after a stop, a block or the budget. off reports per ticket |
plan_only |
off | on plans and stops: the run ticket and its cards go on the board, nothing runs. Edit the cards, then start with resume=<R> |
isolation |
ticket |
in the dev flow, each code ticket works in its own worktree, branched from the run branch and integrated before batch validation. shared runs every ticket in the run worktree. In both, tickets whose implementation paths in Files: overlap wait for a later wave of the round; fallout outside Files: is not part of that check and can still conflict; reserved test paths may overlap |
max_rounds |
3 | rounds over the queue |
attempts |
2 | tries per ticket lead and per batch lead. A rejected batch retries aggregate tests/repairs and checks, without restarting every card |
concurrency |
8 | leads per wave, at most 8. A ticket waits for its Depends on: tickets. With isolation=shared, tickets that change the same implementation file never share a wave |
verify |
on | checks each dev wave as a batch; plain tickets are checked individually |
verifier |
deepwork-adversary |
the checker profile: deepwork-adversary* or deepwork-verifier* |
judges |
– | comma-separated model ids. One deepwork-verifier per model checks each dev batch or plain ticket and the majority wins. At most 7 in the dev flow, 8 in the plain flow |
deadline_min |
20 | minutes each code or work phase gets |
verify_deadline_min |
2 × deadline_min |
minutes each check phase (verify, review, judges), the critic and the baseline get: a full suite, a database suite and a linter outlast a code phase, and a check past its deadline writes no verdict |
verify_model |
same |
in the dev flow, the model of the batch verify phase, which runs the project's commands and compares their output. lead uses the lead model, <provider>::<model> names one; review, judges and the critic keep the child model |
min_free_gb |
5 | in the dev flow, the free space the run keeps on the disk that holds the repository and on /tmp, where long runs write their logs: checked before the baseline and before each batch, and the run finishes blocked: disk under it instead of failing phases on a full disk. 0 turns the check off |
min_free_mem_gb |
4 | in the dev flow, the available memory a batch check needs before it starts. Under it, the run waits 30 minutes and looks again, up to three times, before it finishes blocked. Verification that times out twice raises a run-health question instead. 0 turns it off; hosts without /proc/meminfo skip it |
critic |
on | a last check for anything missing once the queue is empty, and a second pass when the round that ran its findings landed new commits. In the dev flow, this is the branch review: every defect in the run's diff becomes a card, proven by a failing check or marked Not proven (one that needs a person's decision, or is not proven, goes to Backlog as pending) |
max_items |
5 × concurrency |
the most tickets a run creates |
budget_tokens |
– | soft cap on the run's input plus output tokens, checked before each wave like budget_usd. Unlike budget_usd it works with subscription models (claude-code, Codex), whose cost the harness cannot price |
budget_usd |
– | soft cost cap. It is checked before each wave, and no new wave starts once it is reached. A model without catalog pricing, or a call without usage, isn't counted, so the cap can be overshot |
notify |
– | a function id that gets the final report, such as a Slack or email send |
project |
– | an existing kanban project (id or name) for the run. Without it, the run takes the goal ticket's project, else the board's project that covers what the goal changes, and creates one named for the product or area only when none does |
release |
– | an existing kanban release (id or name) for filing cards. Without it, the run takes the goal ticket's release, else an active or planned release that covers the goal, else creates the next one in the project's series. Dev validation groups the current wave, not all cards in that release |
resume |
– | the key of an earlier run ticket to pick up from the board instead of planning anew (see Resume a run) |
finish |
keep |
in the dev flow, how the branch ends. pr rebases the branch on the base, pushes it and opens a PR ready for review, watches its CI (a failing check gets a Fix CI card) and moves the run ticket to In review; pr-merge also squash-merges it once CI is green. Both are the Finish answer given up front: no Finish card is asked. They act only on a run that completes; any other run keeps its branch |
Hard cost cap
The console only has the soft budget_usd and budget_tokens. A run started from the board by the kanban dispatcher gets the rule's max_total_tokens as a hard cap (see the kanban README, Board dispatch). For a hard cap on a run you start yourself, use the CLI:
iii call harness::send --json '{"message":"<goal + args>","model":"<provider::model>","options":{"agent":"deepwork","max_cost_usd":5,"max_total_tokens":2000000}}'You must pass model, because the profile sets none. Every model the run uses needs catalog pricing, judges included. With approve=on, design, plan and finish questions show up in that session in the console and on the linked card. The default approve=auto asks only when a consequential decision cannot be resolved from the goal, evidence and repository conventions. Material assumptions go in both the run ticket's description and kanban::question::record; push, merge, discard and production writes are never implied by autonomy.
A profile's functions: list is the contracts it preloads into the prompt, not a permission list. If you restrict the session with options.functions, don't copy that list: the run needs harness::ask, harness::ask::withdraw, harness::link-card, kanban::question::record, state::barrier (the wave and phase wakes are its conditions), router::models::list, directory::search_functions, engine::functions::info, harness::observe with the functions it observes (state::on-changed, shell::on-job-finished, harness::on-timer: a session may observe only functions its policy allows), and every function its phases use (coder::*, shell::*, the cards' Verify lines), because a child's policy can't exceed its parent's. The simplest is "functions":{"allow":["*"]}, plus your own deny.
The dev flow
Design. Deepwork reads the repository, chooses the simplest in-scope reversible approach and records material assumptions. It asks one consolidated question with a recommendation only for consequential ambiguity (scope, acceptance, compatibility, security, data loss or external cost);
approve=onopts into the full design approval flow.Plan. The design goes on the run ticket. Each task becomes a subtask with
Files:,Tests:,Implement:,Verify:andCommit:lines. A ticket you named, or that the run ticket mentions, becomes a subtask of the run ticket with its card appended instead of a copy; a goal that is itself a ticket key makes that ticket the run ticket. When the goal needs a browser and the browser worker reports a problem, the card carries apreflight: browser: …line; the run goes on. Withapprove=autooroff, work starts directly. Withapprove=on, you answer one card: Start, Stop, or type changes; changes rewrite the plan before a new approval.Worktree. The run gets a new branch,
deepwork/<slug>, in.worktrees/<slug>. It starts from the remote's default branch (origin/main), fetched first, not from the branch you have checked out, so a stale or already merged branch can't leak into the run; the run ticket says when commits of your checkout are left out. A repository without anoriginstarts from its checked-out branch. That folder is excluded locally, so your checkout is untouched. Run Deepwork from the repository's top folder; if the files the goal names are outside it, Deepwork stops and names the folder to start from. The test suite, the linter and the typecheck run once, as a background job, to get a baseline; anything already red there is passed to every check as known, so it never fails a batch. Each code ticket then works in its own worktree,.worktrees/<slug>-<key>, on a branch off the run branch. A fresh copy may need an install step before it builds (a Node project): Deepwork reads it from the repository and runs it in each ticket worktree. Build output is never shared between worktrees. Code cards defer test and verification commands to the batch in the run worktree, so those builds reuse the run worktree's cache.Code tickets and batches. Each ready wave follows this path:
- Implement each card in parallel and commit its code. Test paths in
Tests:are reserved for the batch worker; there is no per-card tests or check session. - Integrate the successful cards on the run branch. Cards whose implementation paths in
Files:overlap never share a wave; a card that still conflicts (fallout in a file its card did not list) retries next round and does not enter this batch. Cards remain In progress. - One batch worker reads the cards and writes their regression tests together in the run worktree, then commits the tests. This is no longer a test-first workflow: it does not prove a failing test before implementation.
- Verify and Review run in parallel on the same commit. Verify runs the distinct
Verify:commands, the full suite and the linter once, keeping every card's acceptance expectations. Review checks the combined diff, scope, test coverage and behaviour, without rerunning the commands. Withjudges=, the judges replace Verify. - When both pass, the cards become Done/verified. With
verify=off, the batch still writes tests, skips the check and marks the cards accepted; it does not claim they passed.
Scope is each card's
Files:andTests:plus its fallout: edits elsewhere that only keep the project consistent with the card's change (another use of a name it renamed, removed or re-typed, a regenerated golden, a registry entry for a surface it added, removed or re-typed), never new behaviour or a weaker test. The code phase makes them, except in a file a sibling card has dirty in a shared worktree, which the batch worker fixes; review accepts them, so a contract change does not fail a batch on scope alone.A rejected batch goes back to its batch worker with all reasons. It repairs code or tests within the cards' combined scope, commits, and checks again, up to
attempts. It does not replay every implementation or cherry-pick integrated commits again. A batch still failing after those attempts (or missing, or inconclusive) does not end the run: its cards stay In progress, the round closes, and the next round repairs that batch first, with every reason, before any other wave. Only when rounds run out are its cards parked as unverified in Backlog, their changes kept on the run branch and named in the report. Blocked or stuck batch leads keep those outcomes. Checks grade every card: a card that passed goes to Done/verified even when the batch failed, unless it shares a file with a failing card, and the repair checks only the failing cards (the verified ones may not change).Both
isolation=ticketandisolation=shareduse this gate, including a one-card wave. Reading and research cards keep their Work → Verify flow. Withisolation=ticketthe next wave codes in its own worktrees while a batch is being validated, and a card whose dependency is in that batch can start then; its integration waits for the batch. Withisolation=sharedno later wave starts while a batch is being validated.- Implement each card in parallel and commit its code. Test paths in
Branch review. Once the queue is empty, a reviewer checks the whole diff for missing work. It reuses the latest verified batch's suite/lint evidence when the commit and commands still match, otherwise it runs them. Its findings become cards for the next round. A defect in code the run committed is always a fix card with regression coverage, never a loose end: a loose end it leaves at a line the run changed becomes a card too, and one that needs your decision, or that it could not prove, waits in Backlog as
pending. When that round lands new commits, a second pass reviews them.Finish. By default the branch and worktree stay as they are, without a question. With
finish=pr(orpr-merge) the run opens the PR itself: it rebases the branch on the current base (a conflict stops the runblocked, with nothing pushed), pushes it, and opens a PR ready for review whose title names R and follows the repository's commit style, since a squash merge keeps it. Withapprove=on, you pick one: merge into the base branch (main), push and open a PR, open a PR and merge when CI is green, or keep the branch. To discard the branch, typeDiscard(the card holds four options).Land. After either PR option, Deepwork watches the PR's checks (
gh pr checks --watch, as a background job, for up to an hour, after waiting up to five minutes for a new PR's checks to appear). On green, the merge option squash-merges the PR, deletes the remote branch and removes the worktree, and the plain option comments✅ CI passed — PR #<n> <url>, ready for reviewon the run ticket and moves it to In review with aPR #<n>pill until a person merges it. A repository with no checks counts as green. If a check fails and rounds remain, Deepwork reads the failed log, makes oneFix CI: <check>ticket, runs a round for it, pushes the fix and watches again. Otherwise it reportsCI: <state>, PR openand keeps the worktree. It needsgh, signed in.
Sub-agents work only inside their worktree. They never push, merge, rebase, reset, switch, stash or clean. Deepwork pushes or merges only when you pick that at the finish, and a run never deploys or writes to production unless your latest message asks for it. Loose ends the goal doesn't need are not tickets: they go in the report and, when any remain, in one Follow-ups: <goal> subtask in Backlog labelled pending, a checklist from which you promote a line to its own ticket. At the end the run ticket goes to Done only when nothing is left: otherwise it stays in Backlog labelled blocked, unverified, unfinished or pending (only cards waiting for your decision remain), and resume=<R> clears the label.
The board
Comments are for people. Every comment says something you need to know, in plain words, with evidence you can open: the command and its result (
pnpm test → 3304 passed, 13 skipped), a commit, a PR or CI link. Only the orchestrator comments, and only for:- a card's outcome, once, when it leaves the run (
✅ Verified — …,❌ Failed — …,⚠ Unverified — …), with its evidence and commit; - a blocker only you can clear, with evidence and a next action; questions and answers are mirrored automatically from the harness;
- plan changes, CI and merge results, and the final report on the run ticket.
Retries, dispatches, green checks and status changes get no comment: the lanes, labels and pills show them. Run bookkeeping (rounds, branch review passes, the base check, landed commits) lives in state, never in comments, so a resume doesn't depend on them.
- a card's outcome, once, when it leaves the run (
Run ticket. It is titled
deepwork: <goal>and labelleddw:run. Every ticket of the run is its subtask, so its page shows the run's progress. Its description opens with the goal and the design; the args, sessions, models, branch and worktree sit at the end under## Run details. AProgressthread on it gets one reply per round that changed something you'd want to know, e.g.Round 1/3 — done: KAN-585, KAN-586 (verified, commit 308b0978) · next: branch review, with the cost as a lower bound (≥ $1.84 so far) when the harness reports it. The final report opens with the result, then the cards, what needs you, how to continue and the evidence.Cards. Every card opens with one or two plain sentences on what changes and why. The contract the agents work from (files, tests, acceptance and verify lines) follows.
Pills. A card's pill says what it is doing now (
working,validating,fixing validation,retry queued) or names its outcome (blocked,stuck,unverified). The run ticket showsround N/M. The board derivesneeds youfromopen_questions; Deepwork never writes that pill.Queue. The subtasks in To do are the queue, in board order. In progress means the ticket is being implemented or its integrated batch is being validated; the pill says which. The session tree shows each lead as
<KEY> · <title>, with its phases under it.Route a ticket. Set its assignee to
deepwork-worker*ordeepwork-impl*. With any other assignee, a ticket that changes code or files runs asdeepwork-impl, and any other ticket runs asdeepwork-worker. To add your own tier, createagents/deepwork-impl-<name>.mdwithextends: deepwork-impl(ordeepwork-worker) and amodel.Change the plan. Tell Deepwork in the chat. It edits the queued subtasks from the next round. Running tickets finish first, then each one gets a follow-up.
Steer between rounds. You can:
- add a subtask on the run ticket and move it to To do;
- reorder To do;
- comment on a ticket to steer its retry;
- move a Backlog card to To do to run it again.
Resume a run. If the orchestrator's session is lost (the console closed it, the engine restarted), start Deepwork again with
args: resume=<R>. If the original root session still has an open question, answer it there before resuming from a new session. Otherwise it adopts the run ticket: the goal, args, branch and worktree come from the card, a batch still being validated is adopted and awaited, never stopped (a stop kills its suites with SIGKILL, so their restores would not run), a batch that was not verified is repaired first (its cards are already on the run branch, so their code is not redone), In progress tickets whose lead is gone andunfinishedBacklog tickets go back to To do and build on what was already committed, and the rounds continue from where they stopped;max_roundsthen counts the rounds this resume runs. A finished run resumes the same way, as long as its worktree still exists; only failed, blocked or stuck cards need you to move them to To do.Questions. Every run asks through
harness::ask, including runs started from the board or CLI. Each question names the card it blocks (or R), the waiting cards, its class and why it matters inabout; the recommended option hasrecommended: true. Kanban mirrors the question and answer on that card. Design, plan, finish and consequential questions useexpires_in_min: 4320withon_expiry: "block". An unanswered question stays open while independent work continues, and a late answer arrives as a message. After the blocking expiry, the run finishes blocked only if it cannot proceed; the expired question still accepts your answer. A direct message mid-run still answers its open card; Deepwork withdraws that ask before applying the message. It also withdraws a question once the answer is no longer needed. A sub-agent returns its question to the orchestrator, which asks you.The run files its work where the board already keeps it. It takes the goal ticket's project and release, else the existing project and release that cover the goal; it creates a project only for a new product area, named for it (never
deepwork: <goal> · <id>), and a release in the project's series (<prefix> · R<next> — <outcome>). A plan of more than 8 items with deliverables you could ship apart gets one release per deliverable.Skip a ticket. Move it from To do to Backlog. Don't drag In progress cards, because Deepwork's next write overrides your move. Deleting a card removes it from the run.
Outcomes.
- Done tickets carry
verifiedoraccepted. - Backlog tickets carry
blocked,failed,unverified,unfinished,stuckorpending. - Tickets dropped from the plan are
canceledand go to the board's canceled column. Older boards may lack one: add it in the Kanban settings. Otherwise those tickets go to Backlog with thecanceledlabel.
Deepwork only changes these outcome labels, so your own labels stay.
- Done tickets carry
Prerequisites
kanban with the default columns: ids
backlog,todo,in_progressanddone, anddone_status: done; question mirroring, derivedopen_questions, andkanban::question::recordfor material assumptions.state with the defaults: the kv adapter (redis won't work),
store_method: file_basedandevents_enabled: true(so writes callstate::on-changed).harness with
max_depthof at least 3 andmax_childrenof at leastconcurrency. The defaults, 3 and 8, are enough. It must support durableharness::askquestions withabout, recommended options and expiry,harness::ask::withdraw, andharness::link-card. Deepwork links its root session once R exists, including on resume.Approval rules, only when the project runs the
approval-gateworker (a project without it prompts for nothing, so skip this). These functions must run without a prompt:Who Functions the harness state::barrierorchestrator harness::spawn,harness::metrics,harness::stop,harness::link-card,harness::ask::withdraw,state::compare-and-set,state::get,kanban::question::record,kanban::ticket::list,kanban::project::list,kanban::project::create,kanban::release::list,kanban::release::create,shell::exec,shell::exec_bg,shell::status,shell::kill, plusdirectory::agents::getwithjudges=leads harness::spawn,harness::status,harness::stop,harness::observe,harness::unobserve,harness::observers::list,state::list,state::compare-and-setphase sub-agents state::compare-and-set,kanban::ticket::get,shell::exec,shell::exec_bg,shell::status,shell::kill,harness::observeandshell::on-job-finished(long runs),coder::read-file, plus whatever the work needs.deepwork-implalso needscoder::create-fileandcoder::update-file. Checkers, and the worker of the plain flow's synthesis ticket, also needstate::getA phase call that waits for approval parks its ticket as
blocked. If every lead in a wave waits for approval, the run ends asblocked.Function policy. Under the harness default (
default_functions: allow*) nothing is needed. A narrowed policy must allowharness::ask,harness::ask::withdraw,harness::link-card,kanban::question::recordand the functions the run observes:state::on-changed,shell::on-job-finished,harness::on-timer(private event sources: allowing them lets the agents observe them, not call them).harness::stop. Withapproval-gate, the repository rules (iii-permissions.yaml) may deny it with a'!harness::stop'line. To allow it, remove that line and add- harness::stop. An allow above the deny line is not enough, because the console makes every deny rule session-wide. If you keep the deny, leads that time out are parked asstuck.Project and release creation. The repository rules allow a
kanban::project::createwhoseleadisdeepwork(ruledeepwork-run-project) and denykanban::release::create. With older rules, add that rule or passproject=; to let a run start a release, allowkanban::release::createor passrelease=. A refused create is noted on the run ticket and the run goes on without that project or release.Trust. Any agent that can create or update kanban tickets can add a subtask to the run ticket. That subtask then runs with the orchestrator's permissions.
How it works
Each round takes the run ticket's To do subtasks and runs them in waves of
concurrencyleads.For each wave, the orchestrator moves the tickets to In progress and spawns one
deepwork-leadper ticket. It then waits on onestate::barrierwake with a deadline.A dev code lead runs just Code and returns its implementation result. After integration, one batch lead runs Work (tests/repairs), then Check (Verify and Review in parallel), and retries the batch on rejection. Plain ticket leads keep Work and Check. Every lead returns one result to state.
The orchestrator wakes when every implementation lead has written or the deadline passes, then again when the batch lead returns or times out. With a harness that tells a parked parent when a child ends, a lead or the orchestrator also wakes when a child ends without a result and fails that attempt at once, instead of waiting out the deadline; older harnesses send no such notice, so the deadline applies. A lead with no valid result is stopped, and its ticket is retried next round. If the lead can't be stopped, the ticket is parked as
stuck. With a harness and ide that reap background jobs on stop, the stop also kills the hostshell::exec_bgjobs of the stopped lead and its phases (a sandbox job is only marked killed; its in-VM process runs until itstimeout_msorsandbox::stop); with older ones those jobs keep running.Dev code tickets wait in In progress for the batch gate. Verified and accepted tickets then go to Done. Failed implementations go back to To do while rounds remain; a failed batch is repaired first in the next round, its cards still In progress, and parks them in Backlog as unverified only when rounds run out. Their code is never replayed.
The run ends when one of these happens:
- rounds run out;
- nothing is left;
- progress stalls;
- the budget is spent;
- approvals block it;
- you stop it.
The report goes on the run ticket, into the chat and to
notify.
A command that outlives the foreground cap (shell::exec stops at 120 s), such as the baseline, the full suite or the first build in a fresh ticket worktree, runs as a background job (shell::exec_bg), in any phase. The agent observes shell::on-job-finished with args { job_id } for that job, reads shell::status once (a job that already ended is read there), and otherwise ends its turn; the harness wakes it with the exit code when the job ends. It never polls, and it kills a job whose wake expires. This needs the observe v2 release of ide, which hosts shell::on-job-finished.
A check that fails on the machine rather than the code (no disk space, a port in use, a service that does not start, a tool timeout while the tests pass) says env: in its verdict. The batch lead runs that check once more on the same commit, without a repair. Verification that times out twice raises a run_health question: retry only the unfinished checks (recommended and the on_expiry answer after 30 minutes), retry with a longer deadline, or stop the run. Either retry checks the same commit without another work phase, retains completed results, and the longer option doubles verify_deadline_min; another timeout asks again. Stopping keeps the integrated cards unverified. Other environment failures retain the bounded machine wait. The run reads the repository's AGENTS.md or CLAUDE.md first, and passes its build, test and environment rules to every phase.
Results go through state rather than kanban events. State has compare-and-set, and a kanban outage won't lose results.
Not yet: a hard cost cap from the console.