Using zerohead
Tasks and runs
How a task becomes a run, what wakes an agent, and the limits that keep runs from looping.
A task is durable work with an owner. A run is one finite session in which an agent works on a task. A run always ends.
Tasks
Open Tasks, type the task in the box at the bottom and press Enter: the new-task form opens with your words as the title. A task has a Title, a Description, a Status, a Priority, an Assignee, a Project and an optional Parent task. Tasks are numbered 1, 2, 3 within a company.
The statuses are Backlog, To do, In progress, In review, Blocked, Done and Cancelled.
A task can be blocked by other tasks. An agent cannot mark a task Done while it has open blockers. You can.
What starts a run
An agent runs when something wakes it. These wake an agent:
- A task is assigned or reassigned to it.
- Someone else comments on a task assigned to it.
- You select Run now.
- Its heartbeat interval passes.
- You decide an approval it asked for.
An agent's own comments and status changes never wake that agent. Comments on a Done or Cancelled task wake nobody. Several wakeups for the same agent and task become one.
Each run takes one wakeup. An agent given several tasks at once works through them one run at a time.
One run
Every scheduler tick, zerohead picks an active agent with a pending wakeup, checks the task out to it, builds its prompt and starts the adapter. The prompt holds the agent's title and instructions, the task with its recent comments, how to use the tools, any approval decisions the agent has not seen, and relevant company memory.
Open a run to see its Live log. Cancel run stops it. A run ends as Succeeded, Failed, Cancelled or Timed out.
The agent's tools let it read tasks, comment, change a task's status and create tasks. The server records every tool call in the activity log.
Limits that stop runaway runs
A bug must never make agents run in a loop, because every run spends your subscription. So:
- A finished run never wakes its own agent.
- A failed run is not retried. It leaves a comment on the task. So does a timed-out run.
- An agent starts at most 12 runs in a rolling hour. Further wakeups wait.
- Two runs go at once across the whole server.
- A run is killed after 30 minutes.
You can change these with ZEROHEAD_RUNS_PER_HOUR, ZEROHEAD_MAX_RUNS and ZEROHEAD_RUN_TIMEOUT_S. See Settings.
If the server stops or crashes, agent processes it left behind are killed at the next start. Their runs are marked Failed with the error "orphaned".
Where runs happen
A run works in its task's project folder, or in agents/<agent-id>/ in the company's folder when the task has no project.
When a trusted agent finishes a task run with a result, zerohead writes a handoff page into company memory. See Company memory.
Claude Code has had one real run. The other agents have only run against a test agent. Treat them as unproven.