CodeHerderSearch⌘KCtrl KGet started →

Auto tasks — the agent chooses the workflow

File a task whose workflow the agent picks for itself from your stage library, and set the floor and ceiling that bound what it may pick.

Most tasks run a fixed pipeline. A story plans, builds, gets reviewed, merges and gets verified. That is the right amount of process for most work. It is too much for a one-line typo fix, and it may be too little for a risky change. An auto task lets the agent decide. You file the task. An agent reads it and builds a workflow that fits. It picks only the stages the work needs from your workspace’s stage library.

Filing one

Create it like any other task, with --type auto:

ch task create --title "Rotate the staging API key" --type auto

In the web app, open the New task form and pick Auto from the type list.

An auto task can stand alone or sit under a story. It cannot sit under an epic. See Understanding the task hierarchy for the nesting rules. Like most types, an auto task is staffed automatically. CodeHerder assigns an agent and the composing stage starts on its own.

What happens next

An auto task starts in a stage called auto. The agent’s only job there is to decide the rest of the workflow. It happens in three steps:

  1. CodeHerder staffs the composing stage. An agent reads the task and its acceptance criteria. It judges how much process the work needs.
  2. The agent picks and orders stages from the library. It reads the stages it may choose from. Then it submits an ordered list. A small change might get code → merge. A change that needs more eyes might get code → review → merge → verify.
  3. CodeHerder builds the workflow and moves the task into its first stage. This happens in one step. From then on, the task runs the workflow the agent picked, like any other task.

The agent can only pick stages that already exist in your library. It cannot write a new stage, change a stage’s prompt, change whether a stage can commit code, or change a stage’s model tier. Each stage it picks keeps the content from your library, or from the CodeHerder built-ins, as defined.

For this one task, the agent can also set how the chosen stages connect:

  • which stages each stage can move to, and which moves need an approval gate
  • which skills a stage loads
  • how many times a stage can go back for rework
  • where a failed check sends the task, and whether that check runs and is required
  • how many rejections a stage takes before it escalates, and to which model tier
  • where a task that waits on a merge request goes back to when the merge request’s checks fail or a reviewer starts a new thread

The agent decides how much process a task needs and how the steps connect. It never decides what a stage does.

What you see afterwards

After the workflow is composed, the task carries it as a fixed pipeline:

  • ch task show <taskId> prints workflow pin: auto_composed.
  • ch task show <taskId> also prints a composed row. It lists the stages the agent chose, the stage it composed at, who composed it, and the reason it gave. The reason shows in the CLI only, not in the app.
  • ch workflow show <taskId> prints the full workflow, with every stage and setting the agent chose.
  • On the task page, a Custom workflow badge appears next to the status. A Custom workflow stages list shows what the agent chose.

An auto task composes its workflow once. The composed pipeline is what the task runs from then on. It works like a workflow override that you set by hand.

When enough auto tasks of one type have finished, Composition outcomes shows whether the agent’s choices helped. It compares success rate, turnaround time and rework against tasks of the same type that ran a hand-pinned or default workflow.

Bounding what it may choose

By default, only your library limits the agent’s choice. To set tighter guardrails, set a composition policy for the workspace. A policy can require a review stage, require a check, or limit the model tiers.

ch workspace composition-policy show
ch workspace composition-policy set --floor review --floor merge --ceiling model:sonnet --ceiling model:opus --required-verification test --required-verification lint
ch workspace composition-policy clear
  • --floor <stageKey> (repeatable) names a library stage that every composition must include. With the example above, each chosen workflow must contain a review stage and a merge stage. The agent can add other stages and use any order.
  • --ceiling <model:tier> (repeatable) is an allow-list of model tiers, not a maximum. CodeHerder refuses a composition if any stage requires a tier that is not on the list. It also refuses one if a stage escalates to such a tier after rejections. This applies even to a tier that sounds “lower”. Name every tier you allow.
  • --required-verification <id> (repeatable) names a check that every composition must run as required, not optional. At least one stage must declare the check. Every stage that declares it must mark it required. One optional declaration fails the policy. The built-in code stage declares test and lint as optional. With the example policy, a workflow passes only if its stages mark them required. Check your stages before you require a check.
  • set checks your input. Each --floor must name an enabled stage in your stage library. A repeated entry in any list is refused. Each --ceiling entry must start with model:, for example model:opus.
  • set replaces the whole policy. If you leave out --floor, --ceiling or --required-verification, that list ends up empty. It does not keep the old value. Pass everything you want to keep.
  • clear removes your workspace’s own policy. The workspace then uses the policy of a parent workspace, if there is one. Clearing a workspace with no policy of its own does nothing and is not an error.
  • The policy inherits down the workspace tree, like agents and repositories do. show tells you whether the policy is your own or inherited.
  • Any workspace member can run show. Only a workspace owner or admin can run set or clear. An agent working in a session cannot set or clear the policy, even with an admin role. Run both as yourself.
  • The composition policy has no web UI yet. Use the CLI.

show prints the policy as rows:

floor stages: review, merge
required verifications: test, lint
tier ceiling: model:sonnet, model:opus
source: —
updated by: Dana Admin (3f2c…)
updated at: 2026-10-18T09:30:00Z

With no ceiling set, tier ceiling prints (unconstrained), because every model tier is allowed. The source row reads — for your workspace’s own policy. For an inherited policy, it reads inherited from <workspace>. The updated by and updated at rows appear for a workspace’s own policy.

To preview what the agent may pick for a task, run ch workflow composable-stages <taskId>. Any workspace member can run it. It prints a header and then a table of stages.

The header shows the floor stages, the required verifications, the tier ceiling, the policy source, the composing stage and the bootstrap stages. The bootstrap stages are the stages the task passes through before the agent’s choices begin. The table lists every stage the agent may select. For each stage it shows the key, the label, the owner (your workspace, a parent workspace or CodeHerder), whether an agent works it, whether that agent can commit code, and the fields and verifications the stage declares.

CodeHerder checks the policy wherever a workflow is chosen, not only when an auto task composes its own. It applies the same floor, ceiling and required verifications to:

A policy change does not re-check tasks that already run a workflow. One rule has an exception. A hand-pinned workflow that uses no library stages has nothing to check the floor against. CodeHerder skips the floor for that pin. The ceiling and the required-verification rule still apply. Clearing a pin is never checked. It stops choosing a workflow, so there is nothing to hold to policy.

If a selection breaks the policy, CodeHerder refuses it and lists every problem at once. That covers each missing floor stage, each tier outside the ceiling and each required-verification gap. The agent gets the same list, fixes everything and submits again. CodeHerder writes nothing until a selection passes, so a refusal costs nothing.

Things to know

  • The composing stage has one way forward: composing. You cannot advance an auto task out of its composing stage before it has a workflow. CodeHerder rejects the attempt and points you to the composition step. You can still block or cancel the task from there. You cannot archive it. While the task waits, the task page shows an Awaiting workflow composition caption.
  • A task composes once. After composition, the task’s pipeline is set and nothing is left to compose.

When not to use it

Sometimes you already know the shape of the work. A bug fix may always need review. A small change may never need it. Use a story, bug or task then. You get that shape predictably, with no composing step. Use auto when the right amount of process is the open question. Good fits are a mixed backlog of odd jobs, or work where nobody knows if it needs review until someone reads it.

Last updated

Try it on one repository for two weeks.

File a task. An agent builds it. You see the cost of each task.

Try "pricing", "connect a device", or "who reviews the code"

↑↓ move · ↵ open · esc close