/agent-traffic-control:orchestrator-rule-too-strict-stalls-agent-silentlyfrom agent-traffic-control
A safety rule you wrote into an agent's brief can be so strict that its precondition never holds — and the agent then does exactly the right thing, which is nothing, for as long as you leave it running. Nothing errors, nothing goes red, and the agent's own status reads as work in progress, so the stall is invisible from every surface you would normally check. Use when: (1) an agent has been running a long time with no product and no failure; (2) you gave an agent a guard phrased over the WHOLE repo, org or fleet — "only when nothing else is running", "only when the queue is empty", "only when no other session holds a lock" — in an environment that is never quiet; (3) you are wondering why nothing has merged, shipped or landed and no check is failing; (4) you are about to write a precondition into a brief and want it scoped so it can actually be satisfied. The fix is to scope every guard to the OBJECT the agent is acting on, not to global quiet: for a lander, the branch's own head is finished-green, the PR is BEHIND, and no run is in progress ON THAT BRANCH. The general form is a question to add to your own routine — ask each stalled agent whether one of YOUR rules is what is blocking it.
Trending skills
7-day visitors to each skill page
Ships in agent-traffic-control. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You write a guard into an agent's brief to stop it doing something dangerous. The guard is correct in spirit and its precondition is scoped too wide, so in a busy environment it never holds.
The agent obeys. It checks the precondition, finds it unmet, waits, checks again. It is behaving exactly as instructed and it produces nothing.
Every surface that would normally tell you says the wrong thing:
| Surface | What it shows | What it means |
|---|---|---|
| the agent's status | running | it is running |
| CI | green / nothing new | nothing was pushed |
| the PR list | open, no new activity | nobody merged anything |
| the agent's own notes | "waiting for the safe window" | the window will never open |
There is no error to find, and a correctly-waiting agent is indistinguishable from a busy one. This is what makes an over-strict rule more expensive than a wrong one: a wrong rule usually breaks something and tells you.
The observed cost: a landing agent was told that gh pr update-branch was safe
only when nothing was running repo-wide. In a repo with several lanes pushing all
night, that is never true. The agent waited correctly and shipped nothing for an
hour. Nothing went red. It was found by asking, out of band, why nothing had
merged — not by any signal the system produced.
Any of these:
Not for: an agent burning budget on a polling loop — that one is loud, produces a
stream of no-op notifications, and is
subagent-external-wait-orchestrator-takeover.
The failure here is the opposite: silence, and no tokens spent at all.
The rule is one substitution: replace "when nothing is running" with "when nothing is running on this thing". The danger a guard like this exists to prevent is almost always local — you do not want to disturb this branch's in-flight run, and another lane's run on another branch was never the hazard.
The concrete case — when is gh pr update-branch safe on a PR? All three, and
all three are about that one branch:
PR=123
BRANCH=$(gh pr view "$PR" --json headRefName -q .headRefName)
# 1. The branch's CURRENT head is finished and green — not "a run passed once".
gh pr checks "$PR" # every check has a conclusion, all pass
# 2. The PR is actually behind its base — otherwise there is nothing to update.
gh pr view "$PR" --json mergeStateStatus -q .mergeStateStatus # BEHIND
# 3. No run is in progress ON THAT BRANCH. Other branches are irrelevant.
gh run list --branch "$BRANCH" --status in_progress --json databaseId -q 'length'
gh run list --branch "$BRANCH" --status queued --json databaseId -q 'length'
# both zero → safe to update-branch
The repo-wide version of check 3 — gh run list --status in_progress with no
--branch filter — is the rule that stalls. It is the same command minus one flag,
which is exactly why it is easy to write and hard to spot afterwards.
For each guard in the brief, answer two questions in writing:
Prefer report over wait in any brief that will run unattended:
If the safe window has not opened after 10 minutes, STOP waiting and report:
which condition is unmet, what you measured, and the PR you would have acted on.
Do not keep waiting silently.
That single instruction converts the entire failure mode into a message.
The general form, and the part worth keeping even if you never touch a landing lane:
Ask each agent whether one of YOUR OWN rules is what is blocking it.
The agent almost always knows. It has the brief in front of it and it can name the clause. But it will not volunteer it — from inside the agent, obeying an instruction is not a problem to report, it is the job. So the information only surfaces if you ask for it by name:
Status check: are you blocked? If yes, quote the exact sentence from your brief
that is blocking you, say what you measured, and say what you would do if that
sentence were removed.
Ask this of every long-running agent that has produced nothing, before you go looking for a bug in anything else.
While a fleet is running, this is the two-minute sweep:
# Agents alive a long time with nothing to show for it
# → for each, ask the blocked-by-my-own-rule question above.
# And check the fleet-level fact that the stall hides:
gh pr list --json number,title,mergeStateStatus,updatedAt \
--jq '.[] | select(.mergeStateStatus == "BEHIND")'
After rescoping a guard:
--branch, --label,
a path.A landing agent's brief carried this guard, in good faith:
Only run
gh pr update-branchwhen nothing is running in the repo.
It was written to prevent a branch update from cancelling or invalidating an in-flight CI run. The intent was right. The scope was the whole repo, and the repo had several lanes pushing continuously, so the condition never held.
The agent checked, waited, checked, waited. An hour with no merge. No failure, no red check, no error message, and a status that read as work in progress the entire time. The discovery path was a human question — "why hasn't anything merged?" — which is not a monitoring strategy.
Rewritten per-branch, the same guard admits the same safety and actually opens:
finished-green on the branch's current head, mergeStateStatus: BEHIND, and zero
in-progress or queued runs on that branch. Other lanes' runs stopped being the
agent's business, because they never were.
subagent-external-wait-orchestrator-takeover
§The instruction that causes this most often.merge-queue-thrash-stop-inflow-and-open-prs-as-drafts.
Check which one you have before rewriting anything: rescoping a guard that was not
the blocker just removes a safety net.agent-refusal-with-evidence-beats-literal-compliance.subagent-external-wait-orchestrator-takeover
— the loud failure: an agent that polls instead of stallingmerge-queue-thrash-stop-inflow-and-open-prs-as-drafts
— when nothing lands and no single brief is at faultagent-refusal-with-evidence-beats-literal-compliance
— authorising the agent to say your instruction is wrong, with the evidencesubagent-reports-complete-but-pr-unmerged
— the other gap between an agent's status and what actually landedgh pr update-branch and
gh run list — the --branch filter is
the whole difference between the rule that opens and the rule that does notWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wan-huiyan/agent-traffic-control --plugin agent-traffic-control118 skills in this plugin
/agent-refusal-with-evidence-beats-literal-complianceA dispatched agent that does exactly what you asked can ship a defect you would
have stopped yourself, because it can see something at the worksite that you
could not see when you wrote the brief. Use when: (1) you are writing a brief
that prescribes a specific fix, threshold, wording or value rather than the
outcome you want; (2) an agent reports that it did not do what you asked and
you are deciding whether that is insubordination or judgement; (3) an agent
asserts "this is fine" or "not needed" with no measurement behind it; (4) you
are reviewing overnight output and want to know which decisions were checked
and which were assumed. Two halves, and both are needed: give the agent
explicit permission to satisfy the INTENT of an instruction while refusing its
letter, and REQUIRE the evidence with the refusal — what it built or measured,
what that showed, what it did instead. Evidence is the whole difference between
a refusal you can bank and one you have to re-litigate. Four agents correctly
declined an instruction in a single run; one built the suggested fix, measured
that it turned a silent safe refusal into a permanently red pipeline, and
reverted it unpushed.
/auto-merge-rearms-while-agent-live-kill-then-disarm-verifyDisarming auto-merge on a PR whose agent is still running does not hold it —
the agent re-arms within minutes and the PR merges, because arming is a step in
the agent's brief and disarming is not an instruction to the agent at all. Use
when: (1) you want to STOP a pull request from merging that an agent opened and
armed, for review, for a rethink, or because it is landing into a queue you are
trying to drain; (2) a PR you disarmed merged anyway; (3) you are telling agents
which PRs are on hold and want the hold to be enforced rather than announced;
(4) you are about to run `gh pr merge --disable-auto` and have not decided what
to do about the agent. The order is KILL THE AGENT FIRST, THEN DISARM, THEN
VERIFY the disarm by reading `autoMergeRequest` back — a disarm you did not read
back is not a hold. The stronger form needs no ordering at all: convert the PR
to a draft with `gh pr ready --undo`. A draft cannot merge whatever any agent
does to it, so the hold survives an agent you missed, an agent that restarts,
and an agent you did not know about.
/batch-member-cites-a-path-only-a-non-member-addsYou wrote something correct that the default reader cannot reach: a batch member citing a
path only a NON-member adds, or a rule, ruling or ledger sitting on an unlanded branch.
/batch-merge-subject-is-not-evidence-a-member-landedYou are about to close, delete the branch of, or mark as landed a pull
request because a batch, roll-up or merge-train commit on the target branch
names it in the subject line, and because the member's own commits all
predate that merge by wall clock. Neither of those is evidence. A batch
branch is assembled at some moment BEFORE it merges, so anything the member
pushed after assembly is outside it, and the subject records INTENT at
assembly time rather than CONTENT at merge time. Use before closing a
member, when an ancestry check against a squashed batch says no, or when a
member's branch still shows commits ahead of the target. Compare file
content against the target branch instead, expecting exactly one legitimate
difference: the shared aggregate file every member appends to.
/check-a-stale-branch-is-not-undoing-newer-main-workA branch built on an out-of-date main is about to merge, or has merged, and may undo work
that landed since. Use when a green, conflict-free PR deletes files you never touched,
newer values or a whole redesign vanish after a sibling PR merged, rows of a shared ledger
(tracker, registry, CHANGELOG) disappear or revert, or when `git diff main...HEAD` or a
reviewer says your small PR touches dozens of files you did not change.
/ci-leg-skipping-moves-minutes-it-does-not-remove-themYou are about to propose, price or approve a CI cost saving that works by
making a job or matrix leg SKIP on pull requests — a path filter, a safe
list, a changed-files gate, an exemption list. Check first whether the
pipeline runs a complement or backstop on merge, on push, or nightly:
many do, and then the legs a pull request skipped are exactly the legs some
later run executes, so a branch that goes green once and merges bills the
same total either way and the wall clock does not move at all. Use when
pricing a filter change, when a percentage saving is quoted with no basis,
or when choosing between filtering legs and batching pull requests. The
question that separates money from bookkeeping is whether the change
removes RUNS or merely moves LEGS.