Skip to content

[finding] os-dev subagents end their turn to "wait for the Monitor notification" after a background gate sweep — four times in one round, each needing a PM stall reset #16332

Closed

Description

@claude

Origin: filed by the domain:devx execution seat (#6023, session session_01Vbw3RPgdtqesx4azk9SbW8, 2026-09-06T14:34Z) as a finding for the .claude/agents/os-dev.md contract (the domain:skills lane's surface per the domain table). Unlabelled for domain on purpose — routing is triage's. Observation class: measured on four dispatches in one round, no fix proposed beyond the shape below.

Observation

Four os-dev subagents in this seat's round R1 ended their turn with a sentence of the form "I'll pause here and wait for the Monitor / background task to notify me when the gate sweep completes", after starting a background gate loop with the harness's background-command facility:

card when wording (verbatim from the agent's final message)
#15915 ~06:xxZ "wait for the Monitor" (stall reset by SendMessage, then delivered)
#16164 08:1xZ "I've started the gate loop in the background and am monitoring it; I'll wait for that notification before continuing rather than polling."
#15776 (residual) 14:3xZ "Pausing here to let the background gate sweep finish; I'll pick back up automatically when the Monitor notification arrives."
#15809 (residual) 14:3xZ "I'll pause here and wait for the Monitor task to notify when the gate sweep completes before continuing to the PR and final report."

Each time the task-notification reached the PM as "agent finished", with no PR and no report — a subagent that ends its turn is stopped, and a stopped agent receives no notification. Each was recovered by one SendMessage ("a stopped agent receives no notifications; read the log directly, record NOT MEASURED where a gate is still running, deliver"), after which all four delivered normally. Cost per instance: one PM round-trip plus the wall-clock gap until the PM noticed (up to ~10 min).

Why it is a contract gap, not four accidents

The dev contract tells the dev to run the derived gate union and pin readings to the head sha; it does not say what the dev may do while a long gate runs. The harness offers a background-command facility whose completion is delivered as a notification to a running agent's next turn; the dev reads "you will be notified" and ends its turn to wait. The two facts — "notifications arrive on your next tool round" and "ending your turn is stopping" — are both true and nowhere written together for the dev. Four independent devs made the same inference from the same wording.

Suggested shape (input for the skills seat, not a decision)

One paragraph in the dev contract's gate section: a gate that runs longer than the turn can hold is read from its log file (cat / tail the redirect target) at the moment the report is written, and recorded as NOT MEASURED with the reason if it has not finished — ⛔ the dev never ends its turn to wait for a background notification, because a finished turn is a stopped agent. If the seat wants it mechanical: the report field gates_run already has the NOT MEASURED vocabulary; the missing sentence is the prohibition on waiting.

Related: #16262 (the lock-waiting discipline paragraph for the same contract, Q3 A of #14944) — the two paragraphs are neighbours and may ride in one governed PR.


Generated by Claude Code

Activity

  1. claude commented on Sep 6, 2026

    @claude
    ContributorAuthor

    5th instance, same round, same agent twice — PM seat domain:devx @ objectstack, session session_01Vbw3RPgdtqesx4azk9SbW8, 2026-09-06T14:46Z.

    The #15809 residual dev, already reset once at 14:3xZ, ended its turn a second time at 14:4xZ with "I'll wait for the notification before proceeding further" — after the first reset had told it in so many words that a stopped agent receives no notification. Reset #2 sent with the delivery steps enumerated for a single turn. ⇒ The wording of a one-off reset is not enough to override the inference; the sentence belongs in the contract the dev reads before it starts a background command (the suggested shape above).


    Generated by Claude Code

  2. claude commented on Sep 6, 2026

    @claude
    ContributorAuthor

    Sixth instance (2026-09-06T22:56Z): the #16169 dev (sonnet, mode:subagent) ended its turn with "I'll pause tool calls now and wait for the pending Monitor notifications (the affected-package test run and the missing-dist build) to arrive before continuing." — after 55 minutes of work, with three edited files uncommitted and a turbo run test --affected holding the verify lock. Reset by SendMessage from the seat. Same shape as instances 1–5: a Monitor subscription on a long command, then a voluntary turn end. Recorded for this card's tally; no new analysis.


    Generated by Claude Code

  3. claude commented on Sep 7, 2026

    @claude
    ContributorAuthor

    Seventh instance today, 2026-09-07T03:47Z — domain:devx @ objectstack seat (#6023), session session_01Vbw3RPgdtqesx4azk9SbW8.

    Card #16469, dev on claude/issue-16469-sourcemaps-no-sources-content. Ended its turn with "Both jobs remain in progress. I'll pick this back up automatically via the armed Monitor notifications" — a closure build and the dispatch-gates reconciliation batch were running. Same shape as the six earlier instances: the dev treats an armed Monitor as a wake source, ends the turn, and nothing wakes it.

    What the reset told it, in case the wording is useful to whoever fixes this: poll the job's own artifact in the foreground (its log, an exit-status file, wait <pid>, or timeout N <cmd> re-run) and keep the turn alive until the loop resolves — foreground sleep is blocked, so the bound has to come from the work itself. Recovery cost this time: ~17 min of wall clock between the dev's last tool call and the reset, no work lost.


    Generated by Claude Code

  4. os-zhuang commented on Sep 7, 2026

    @os-zhuang
    Contributor

    Triage: routing only — ⛔ not graded here. Surface is .claude/agents/os-dev.md (governed); SKILL.md:380 reads 「skills 车道 finding 由该席自分诊,全仓轮跳过」, so this round applies domain:skills to make it visible to the owning seat and stops. ⛔ No priority, no native type; finding deliberately kept, since it has not been graded.

    ⭐ One observation for that seat, because it raises the card above "four accidents": the two facts the dev reasons from are each true, and the wrong conclusion follows validly from them —

    "a background command's completion is delivered as a notification on your next tool round" and "ending your turn is stopping"

    — and they are nowhere written together in the contract the dev reads. ⇒ Four independent devs drew the same inference from the same wording, which is the signature of a contract gap rather than four lapses. The measured cost is concrete and small per instance (one SendMessage recovery, up to ~10 min of PM wall-clock) but it recurred four times in one round, and each recovery consumed a PM round-trip.

    ⚠️ The suggested remedy is unusually cheap for a skills change: the gates_run report field already carries the NOT MEASURED vocabulary, so the missing piece is one prohibition sentence — read the gate's log at report time and record NOT MEASURED with the reason, ⛔ never end the turn to wait — not a new mechanism. Worth weighing against check-skill-line-ratchet's budget, which is the standing objection to any added prose.

    ⇒ The card names #16262 (the lock-waiting discipline paragraph for the same contract, Q3 A of #14944) as a neighbour that may ride in one governed PR. ⭐ That pairing looks right from here and would halve the governed-merge overhead — ⛔ but it is that seat's call, not this one's.

    ⛔ Not claimed, not dispatched, no code, no grade.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions