Gates and blockers
An agent stops only at its target, at one of four gates, or at a blocker; otherwise it keeps going. Gates are planned stops that happen even when everything works, and blockers are problems the agent cannot resolve alone.
The four gates
Section titled “The four gates”| Gate | When | What you say |
|---|---|---|
| 01 Publish | New or changed approved work: publishing a plan; changing a task’s Goal, Scope, Acceptance or Merge, or a study’s Arms, Controlled or Adaptable; changing a protected path | “publish”, or approve the change |
| 02 Merge | A PR is merge-ready, unless its task says Merge: agent |
“merge”, or “merge #13” |
| 03 Budget | The next step would exceed the budget in tokens, time or GPU hours | “continue”, with a new budget if you like |
| 04 Conclude | All of a study’s sub-issues are closed and it awaits analysis | your conclusion, e.g. “conclude #10: …” |
Gate 02 in detail
Section titled “Gate 02 in detail”Under Merge: agent, the agent merges a merge-ready PR itself with python .github/scripts/merge.py <PR>, which refuses protected paths and heads without a passing review. Otherwise, or if merge.py refuses, the merge-ready PR is the request: the agent adds no label and no blocker comment, and waits for “merge”. See Merging.
Gate 03 in detail
Section titled “Gate 03 in detail”For a run task, GPU hours used are the sum over the issue’s runs, failed ones included, of wall time times the number of GPUs. Before launching a run that would take the total past Budget, the agent reports the hours used, the estimate for the rest and the runs not yet launched, and waits.
Blockers
Section titled “Blockers”The agent also stops when:
- the same failure happens 3 times in a row;
- 3
changesverdicts come in a row; - an ambiguity would change the deliverable;
- a study’s Controlled setting cannot be met without changing the comparison.
The last one is reported as Blocked: 这个对比按规格做不了,因为 <X> (“this comparison can’t be done to spec, because X”), with three options: change the implementation, relax the spec (which is gate 01), or drop the comparison.
How the agent asks
Section titled “How the agent asks”It asks once per blocker, with evidence, at most 3 options and a recommendation.
- You are in the session: it asks there.
- You are not: it adds
needs-decisionto the issue, posts a four-line blocker comment, and moves on to other ready work. It removes the label once you have answered.
Blocked: <one line>Evidence: <links>Options: <at most 3>Recommend: <option>What the agent handles alone
Section titled “What the agent handles alone”These are not blockers, and the agent does not ask:
- test or CI failures, merge conflicts and infra retries;
- bugs inside the task’s Scope;
- a
changesverdict: it fixes the findings and gets a fresh review of the new head; - changing an Adaptable setting within its rule, noted in the results comment.
A bug outside Scope becomes a new issue; the agent keeps working and keeps the fix out of the current PR.