/agent-traffic-control:job-reports-success-while-its-worker-was-oom-killedfrom agent-traffic-control
A batch or cloud job lists as SUCCEEDED while the work inside it produced nothing, because the kernel's out-of-memory killer took a forked WORKER and the parent caught the failure, wrote its record and exited 0. Use when: (1) a run's own output says a worker "died"/"was terminated abruptly" but the execution listing says succeeded, (2) you are about to report "the job failed" or "the run died" to a coordinator who will quote you upstream, (3) a peer checks the listing, sees success and tells you your sentence is wrong, (4) a harness has classified the death as transient or retryable, (5) you are sizing a machine from a run that died and need its true peak. The platform logs a memory message only for a CONTAINER kill, so silence about memory is expected for a child kill and is NOT evidence against it. Record the cgroup counters (`memory.oom_control` oom_kill, `memory.failcnt`) at the start and end of every run so a kill is COUNTED rather than inferred, and read the kernel's own peak, because a half-second sampler misses a spike that arrives in five seconds. Name the layer that failed: "a worker was killed and the search returned nothing" and "the job failed" are different sentences and only one of them is true. NOT for a genuine application failure with a recorded exit status, and NOT for a container kill, where the platform does say so.
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.
A long research run fans routing work out to forked worker processes. One worker is killed by the kernel's out-of-memory killer. The parent process catches the resulting "a process in the process pool was terminated abruptly", records the failure in its own JSON, writes its log and returns 0 — which is correct behaviour for a harness that reports rather than crashes.
The result is three artefacts that disagree in a way nobody notices:
| artefact | what it says |
|---|---|
| the execution listing | succeededCount 1, condition Completed True |
| the run's own record | the work raised "a worker died while routing item 10 of 100", zero results written |
| the platform's logs | nothing about memory at all |
So "the run died" is wrong, "the run succeeded" is wrong, and the useful sentence is longer than either.
A managed runtime emits its memory-limit message when it kills the CONTAINER. A child process killed inside a container that stays alive is invisible to it: the task did not exceed anything the platform enforces, and from outside, nothing failed. Absence of a memory message is therefore the expected state for a child kill, not evidence that memory was not the cause — which is exactly the inference a reviewer makes when asked "was it really memory?".
Read the kernel's own counters into the run's record, at the start and again at the end. On cgroup v1:
CG=/sys/fs/cgroup/memory
cat $CG/memory.oom_control # oom_kill_disable 0 / under_oom 0 / oom_kill N
cat $CG/memory.failcnt # charges refused at the limit
cat $CG/memory.max_usage_in_bytes # the kernel's own peak, never reset
cat $CG/memory.limit_in_bytes
On cgroup v2 the equivalents are memory.events (oom_kill), memory.peak and
memory.max. Read both layouts: a runtime advertising a modern generation can
still present v1 inside the container, which is what the observed run did.
Two readings did the work in the observed case:
oom_kill was 0 at the moment the workers forked and 1 at the end. One line,
and the finding stopped being a guess. A coordinator quoting it upstream could
say "the kernel counted the kill" instead of "we think it ran out of memory".memory.max_usage_in_bytes was 7.41 GiB against an 8 GiB limit, while a
sampler polling memory.usage_in_bytes every half second had caught less: usage
went from about 3 GB just after the fork to about 8 GB within roughly five
seconds of work starting. Sample for the shape, but report the kernel's peak.getrusage(RUSAGE_CHILDREN).ru_maxrss is the peak of the LARGEST single
descendant, not a sum — and for a forked child it counts pages the child still
SHARES with the parent. A worker reading 2.70 GB beside a 2.57 GB parent has not
used 2.70 GB extra; it has copied about 0.13 GB of its own.
To get what a fan-out really costs the machine:
Reporting the per-child figure as a sum overstates the workers and understates the parent, and it points a fix at the wrong half. Say which number you read.
In the observed run each worker grew by roughly 1.2 GB within seconds of starting, on top of a 2.6 GB parent, and the cause is worth knowing because it decides the fix:
Fixes that follow: fewer workers, more memory, or holding the shared
structure in a form that survives forking (arrays rather than per-element
objects); a pre-fork gc.freeze() is the cheap partial. A fix that shares a
rebuilt per-worker index is aimed at nothing, because no such index exists.
Say which layer failed, what the run produced, and where each reading came from:
"The search returned no route: a routing worker was killed for memory at the first item, and the job itself finished and reported the failure. Container peak 7.41 GiB of 8 GiB, kernel
oom_kill1 (0 at the fork),failcnt0, read from the run's own record and the execution listing."
transient. A memory kill is not
retryable at the same size, so a retry classifier reading "worker died" as
transient will loop a run that cannot pass. Say so when you report it.leg-guard
refuses to start one while a peer's is running. It does not judge memory — a
process count cannot see RAM — so it prevents the contention case, not this one.
Worth installing anyway: on 2026-09-22 a leg died with exit=-15 while memory read
81% free, and the artefact was indistinguishable from an OOM kill. The guard that
would have prevented it is a contention guard, and the reading that would have
classified it is the receipt's refusal, not the exit code.parallel-gate-legs-killed-for-memory-count-cannot-see-ram
— the same killer one layer down, where a local test leg is stopped for memory
on a shared machine and a process-count guard cannot see RAM.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
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.