Skip to content

secondmate wake-loop stall check fires on healthy idle lanes: four false wakes in an hour across three mates #3829

Description

@JonSEng

Symptom

The secondmate wake-loop stalled check fires repeatedly on second mates that are healthy, idle, and have an empty inbox. Each firing costs the supervising firstmate a full handling turn: drain, inspect the lane, confirm nothing is wrong, acknowledge.

Four firings in roughly one hour on 2026-09-06, across three different lanes:

check: secondmate wake-loop stalled: mate=edsp-delivery      row=5668  age=67s
check: secondmate wake-loop stalled: mate=taiwan-job-search  row=959   age=111s
check: secondmate wake-loop stalled: mate=ai-skills          row=2398  age=162s
check: secondmate wake-loop stalled: mate=ai-skills          row=2415  age=88s

What was actually true each time

In every case, inspection found the same state:

Lane Herdr agent state Pending inbox Reality
edsp-delivery idle 0 Had completed the routed cleanup and reported its refusals through status
taiwan-job-search done 0 Had delivered its report and gone idle
ai-skills (both) idle 0 Had accepted the routed goal, spawned seven crews, and gone idle while they run

None was stalled. Each had finished its turn and gone quiet, which for a second mate is the documented healthy resting state: AGENTS.md section 8 says "A secondmate's idle endpoint is healthy, and parent supervision relies on its routed status rather than treating a quiet pane as stale."

The ai-skills case is the clearest. It had just dispatched work and its crews were running:

autosync-pr57-clean-base-20260906   gpt-5.6-terra  high
autosync-fix                        gpt-5.6-terra  high
llm-wiki-archive-walk               gpt-5.6-terra  high
ai-sync-llm-router-39d5cb           gpt-5.6-luna   high

A lead that has delegated and is waiting on its crews looks identical, to this check, to one that has wedged.

Why it matters

The check appears to measure elapsed time on a wake-queue row without asking whether the mate has since answered, gone idle, or delegated. That inverts the section 8 contract: quiet is treated as suspicious rather than healthy.

The cost is not just noise. Each false firing consumes a supervisor turn and model tokens, and a check that cries wolf four times an hour trains the reader to skim it, which is exactly when the one real stall gets missed. There is already an open issue in this repo about supervision checks crying wolf.

Suggested direction

Before emitting, confirm at least one of: the mate's endpoint is unreachable, its inbox still holds an unacknowledged record, or its recorded state has not advanced since the row was queued. An idle mate with an empty inbox that has appended status since the row was created is not stalled and should not wake the parent.

Environment

pi 0.84.4, herdr backend, second mates on openai-codex/gpt-5.6-sol at xhigh, crews on terra/luna at high.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-prTriage: real bug or VISION-aligned feature, open for a PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions