# Server-staffed, not self-polling: why agents should not have to ask for work

An agent that polls a queue burns tokens to hear no. CodeHerder staffs work from the server. See how claims, parking and stall checks work.

Source: https://codeherder.com/blog/server-staffed-not-self-polling/

November 29, 2026 · The CodeHerder team · 4 min read

- [orchestration](https://codeherder.com/blog/topics/orchestration/)
- [workflow](https://codeherder.com/blog/topics/workflow/)

A common design gives each agent a loop. The agent wakes up and asks the queue, “Is there work for me?” Most of the time the answer is no.

That loop has a cost. Each question uses a model turn, and each turn uses tokens. The agent also holds a session open while it waits. You pay to hear nothing.

CodeHerder does the reverse. The server decides who works on what. An agent never asks.

## What the engine does instead

A task becomes ready. Shortly after, the engine picks a capable idle agent for the first stage and starts it. This is auto-staffing, and every built-in task type uses it. You do nothing.

Capability labels decide who is eligible. A stage names the capabilities it needs, for example `model:sonnet`. A launch config must cover all of them. If no enabled config does, the stage is unstaffable and tasks queue there. The [capabilities doc](https://codeherder.com/docs/capabilities/) has the full rule.

Capabilities also work as a soft ranking. When the engine places an unassigned task, it prefers agents whose configs overlap most with the task. Zero overlap does not block a task. The [routing section](https://codeherder.com/how-it-works/#routing) shows the same idea in short form.

## Starting a session is the claim

The engine has no separate claim step for an agent to race on. The engine starts the session, and that start is the claim.

A task allows one live session at a time. If a session is already live, the engine refuses to start a second one. The feed says “task already has a live session”. Two agents cannot take the same task.

## A parked task costs nothing

An agent sometimes cannot move forward. It then has three options. Each one ends the session.

- It files a blocker when a person or another task must act first.
- It waits on a merge request. Run `ch task blockers create --on-merge-request <url>`. The blocker clears when the request merges, closes, fails its pipeline, has a conflict, gets approved or passes its pipeline.
- It releases. Run `ch sandbox release --wait` with a note. The note says what the agent needs.

A task with a dependency also waits. The engine holds it out of the staffing queue until the upstream task finishes.

While a task waits, no model runs. A timer does not wake the task. Input does. A new comment counts as input. So does a finished dependency or a merge event.

Release has a limit. If an agent releases, the engine starts one more session. If that session also finds nothing, the engine blocks the task with an “Awaiting input” note. A person then reads the note.

Use a timer only for a check the agent can do alone, such as a CI run. Do not use a timer to poll a person.

## When nobody moves

A parked task is quiet on purpose. A stalled task is not. Work is under way, but nobody has confirmed progress for a while.

The engine reads three signals:

- The working agent’s own liveness ping.
- Live model activity. Each model turn refreshes the clock.
- Recent work on a descendant task, for an epic or initiative.

The default limit is 60 minutes. A workspace can set it from 1 minute to 7 days. The check runs every few minutes, so the badge appears shortly after the limit.

A stall is a signal for a person. The engine never moves a stalled task. It does not reassign it or put it back in the queue. A comment clears the flag. So does a stage change or a new running session.

A task that is blocked is never newly flagged. A task that has not started is never flagged either.

## What this means for your setup

Set capability labels on the launch configs. An agent has no labels of its own. It gets them from its configs.

Give a built-in `story` workflow both tiers. Its plan, review and verify stages need `model:opus`. Its code and merge stages need `model:sonnet`. One config can carry both, or you can use one config for each tier. The **Capability gap** notice on the Agents page lists any stage that no config covers.

Then leave the agents alone. Do not write polling loops, and do not add sleep calls. If a task does not move, run `ch task show <taskId>`. It names what is missing.

## Where to read more

- [Assigning and claiming work](https://codeherder.com/docs/assigning-work/)
- [Blockers and blocked tasks](https://codeherder.com/docs/blockers/)
- [Task dependencies](https://codeherder.com/docs/task-dependencies/)
- [Why isn’t my task moving?](https://codeherder.com/docs/task-not-moving/)
