Skip to content
CodeBook

Work orders and planning

Track a goal across dependent work items and multiple workflows.

A work order groups the cards needed to achieve a goal. Its rollup includes progress, active runs, blocked work and tokens across workflows.

Plan the work

Describe the goal and constraints. A planner can propose items and dependencies. Review the proposal before turning it into cards: check the scope, acceptance criteria, destination workflows and ordering.

A work order can also arrive from a linked OpenBook space as an epic: the planner writes its stories, and they wait for a person's approval before any card exists. See epics from OpenBook. The concierge can open a work order for you as well, with its plan lines as proposals.

Templates make recurring work orders reusable. Dependencies determine which items are waiting on others. The critical-path and risk views help explain why a goal may be delayed, and the report can be printed for review.

Learn from earlier work

When it plans, the planner is shown a small sample of this factory's earlier work orders: some that finished, some that were cancelled, and some where something went wrong. For each, it sees how the work was split into stories and what CodeBook recorded: how many stories finished or were dropped, verified test runs, the station checks' verdicts, milestone checks, replans and the settled model spend. Where nothing was recorded, the planner is told it is unknown.

These are records, not a score and not a reason why something happened. Finishing a story is not proof that it was good, and a spend figure is recorded usage, not a bill. The sample covers at most six work orders and can be cut short. CodeBook reads those records again before the planner's answer is used; if they changed, ask for a new plan. Nothing here changes routing, autonomy or the factory's policy: you still review the proposed stories.

With EvalBook linked and Ask EvalBook what became of earlier work when planning a work order on under Connected apps → What's shared, the planner also sees EvalBook's measurements of the same work orders, marked as EvalBook's. If EvalBook cannot answer, the plan goes on without them.

Planning history

Open a work order and expand Planning history in its plan. The latest 50 invocations show the planner, plan or replan, instruction version, status, attempted model calls and recorded tokens. A replan links to the preceding invocation. Failed or partial attempts remain visible with their reason; proposals saved before a provider failure remain in the plan.

The planner uses the instruction release configured in Agent studio. It selects a version before the first model call and retains it throughout that invocation. A later replan selects the release current when it starts. Without a release, the history labels the invocation Live instructions. Historical work orders from before this feature have no invented history.

Each invocation also has Model input history. It lists the latest 50 prepared inputs, including fallback attempts: turn, model, input bytes, shortened earlier items, approved-memory inclusion and omission, request hash, and the person or factory-supervisor replan that authorized it. These are fitted logical requests prepared for Bookbag SSO. They do not prove provider delivery or replay historical prompt bodies.

Approved memory refreshes before each turn. CodeBook checks current access, goal, pause state, tool permissions and applicable supervisor authority before a call and again before using its answer. If those change while an answer is pending, planning stops; earlier proposals remain inert and autonomous replanning does not create cards from them. Ask for a new plan after resolving the change.

Completion records that planning ran, not that its proposal was correct. Review the proposed scope and acceptance criteria before creating cards. Planner execution counts stay separate from station quality results.

Control execution

Pause or resume a work order when priorities change. Cancellation includes cleanup of the tracked work, but cannot undo external effects already performed. Inspect active external runs and repository changes before assuming a cancellation reversed them.

The planner proposes work. A workflow supervisor handles bounded exceptions during execution, a specialist can take one class of failure, and a factory supervisor sits above every workflow with a closed list of options, including replanning the unmet rest of a partially met work order. See factory supervision. A person chooses the permitted actions and reviews exceptions beyond those limits.

Use operations for active work and events to connect external outcome signals.

Run a supervised overnight order

  1. In Work orders, create a cloud order with one goal, the repository or service, what is out of scope, and how a reviewer can tell it worked. For a migration, name the existing fixtures and the outputs they must preserve. Enter Spend limit (USD, optional), Deadline or both before creating the order. The date field uses your local time zone. When proposing the order through chat, ask to see the exact stop time and zone before approving.
  2. Review the planner’s proposed milestones and story dependencies. Look for one observable behavior and one acceptance check per pull request. Confirm where people approve changes, who verifies the merged result and which prerequisites must finish before parallel work starts. Approve the items you want materialized as cards.
  3. Open the order and choose Open a manager for a dedicated conversation. Review its separate token ceiling before starting it. Give the manager the order reference, your acceptance criteria and which decisions require a person. The manager follows the order’s stories and can report what needs you. An overnight deadline is a stop time. It does not promise an uninterrupted run of that duration.
  4. Return to the same order reference, such as WO-7, in the morning. Read Executive report, inspect the proof and PR commit for each completed milestone, and check any blocked or unverified items. In a connected chat, ask “Show WO-7 in Payments. Which checks passed on which commit, what did it cost, and which decisions need me?” Reading the report does not start another worker.

Read the limits

On the order What it tells you
Spend limit at configured rates USD ceiling shared by the planner, manager, workers, model-assisted CI mapping and analysis linked to the order's cards, and eligible hosted proofs. The manager’s token ceiling can stop its own session earlier. External CI, deployment charges and billing under your provider contract remain separate.
Reserved Funds set aside before an operation starts. Concurrent workers share the balance. A timeout or an incomplete provider usage report can leave the reservation outstanding.
Recorded and available Known spend and the amount other work can still reserve. An outstanding reservation reduces what is available.
Last operation held The reason a step could not run, for example an unpriced model, an unfundable reservation, or an executor unable to enforce the deadline or spend cap.
The deadline has passed New work is held. Inspect completed work and any provider request already sent. If more work is needed, create a follow-up order with a newly approved limit.

A limited order uses text matching for knowledge retrieval. Hosted proofs with a spend cap require a prepared Modal environment and a configured sandbox rate. A local runner can also provide capped no-charge module proofs when a person explicitly declares no execution charges and starts runner 2.2 with its local opt-in. Protocol 1 supports only the strict macOS native sandbox and in-process tests, with no network, child processes, setup, custom environment or retained folders. This declaration does not meter the machine’s costs or waive model charges.

A capped local proof pins its command and commit and applies one total deadline to checkout and execution. Paused proofs stay queued until resume; cancelled or completed orders cannot start them. An already claimed proof can report while paused, but a cancelled order refuses its result. An ordinary local or external executor unable to enforce the order’s limits remains held. Read Last operation held, then choose a supported executor or correct its approved configuration. Overnight command reference

Review the change

The GitHub draft shows the checks known at its opening commit and the decision requested from the reviewer. After another push, open GitHub Checks for the current head. A reviewer can end a submitted GitHub review with Review minutes: 8. The dashboard shows the average reported time and how many merged PRs contributed. Reviewing a pull request · Productivity metrics

For a recurring production bug, add an incident check to the repository’s CI.

Changes that ship together

Use release units in a work order to record changes across repositories and their merge order.

Choose who handles an unavailable milestone check

Open Factory settings → Controls & autonomy → When a milestone check cannot run. Select a choice and save it. The separate Any story it wrote setting controls which stories the manager can start.

  • Ask me sends the attempt to you for review. You can resolve the obstacle and retry, or explicitly approve passing that attempt by hand.
  • Pass it when every story’s own tests passed counts the milestone when every member story has a verified passing run of its own tests. If evidence is missing or a member’s latest verified test failed, it asks you.
  • Use verified story tests, otherwise let the manager recover counts the milestone when every member has a verified passing repository test for its recorded source commit. With incomplete evidence, the manager follows a specific proof or repair through an approved local executor. Explicit sign-offs stay with the person responsible.
  • Hold keeps the milestone and dependent work waiting until the check can run and pass. Nobody receives a decision request.

For example, suppose a verifier times out and two stories still lack usable evidence. Under manager recovery, the factory can queue the missing test for one story and create or reuse a repair for another whose test failed. The work order shows the next action or the prerequisite holding it. If the executor returns after losing a proof, the factory can issue one replacement. Once repairs finish and merge, the manager checks readiness before retrying the milestone. A timeout supplies no passing evidence. If a test reports that every case was skipped, the milestone stays open.

Decide a milestone check from chat

Read work_orders with the factory and order. Under milestones[].check, compare route with the manager and person lists in needs_you. Follow the owner and action for that exact attempt. A running check waits. Check again starts a fresh attempt. For example, if check 84 is routed to the manager for retry under the recovery setting, call decide_milestone_check with the observed check ID and policy.

{"factory":"Example factory","order":"WO-7","check":84,"decision":"retry","authority":"manager","expected_policy":"manager_recovery"}

Read requested_check and the returned check.id and check.attempt to distinguish the old attempt from the new one. Follow work_orders for the outcome. The repositories entries identify each repository, commit and proof run IDs. Inspect unresolved for gaps and created_story_ids and ready_story_ids for subsequent work. If another operator already changed the check, refresh the order and review the new attempt before deciding.

Pass by hand records a person's decision and retains the failed evidence. Show the owner the exact factory, order, attempt, evidence gap and proposed reason. Only after they explicitly approve that target and reason, send the same factory, order and check with decision: "waive", approved: true and their reason (up to 1,000 characters). A prior decision on a different attempt requires fresh approval. The signed-in caller needs factory write access. Implementation story #163

Mark a completed order Done from chat

Read the order and check its rollup, milestone results and linked stories. When authorized to close the completed order, call update_work_order with the status change alone.

{"factory":"Example factory","order":"WO-7","status":"done"}

Check work_order.status in the returned order. CodeBook refuses completion while proposed items or unrun proposed milestone checks remain. Inspect those items with the owner. Closing an order records its administrative status. Verify a deployment separately in Coolify.

Check the connected server's MCP tools/list catalog for these tools and the supported status values. On an older server, use the corresponding buttons in the website's work-order view. Proof settings have their own approval flow. Proof definition approval · Implementation story #165