Skip to content

fix: extend the watchdog for transcript-observed subagents - #395

Merged
matthias-scale merged 2 commits into
mainfrom
fix/subagent-transcript-busy-budget
Sep 23, 2026
Merged

matthias-scale merged 2 commits into
mainfrom
fix/subagent-transcript-busy-budget

Conversation

@matthias-scale

Copy link
Copy Markdown
Owner

Third of the agent-state detection faults found on ub1. The first two shipped in #389.

Problem

A Claude pane whose subagents are only visible in the transcript (no hook
authority, no closing report) fell back to the 20-minute parent budget
AGENT_BUSY_STALE_SILENCE. So the parent flipped to supervisor_stale while
its subagent was still writing to agent-*.jsonl, and the sidebar dropped it
back to done.

Change

agent_status_watchdog_deadline_with_activity() now grants the long
DEFAULT_SUBAGENT_STALE_SILENCE budget when the pane holds live subagents and
the transcript witness is Fresh, independent of hook authority. The clock
anchors on the later of the witness time and pane activity, so fresh evidence
extends the budget but never rewinds it.

Stale and Unknown transcripts keep the ordinary budget unchanged.

Verification

cargo nextest run -E 'test(/detect::manifest|terminal::state/)' — 275 passed
on the merged head. Three new tests cover the fresh, stale, and
never-rewind cases; no existing expectation was modified.

refs #389

https://claude.ai/code/session_01VWN7qDGntr6KuwPKn8Fi5g

@matthias-scale matthias-scale added the claimed:cl-6438c7c3 Herdr PR claim label label Sep 23, 2026
@matthias-scale
matthias-scale merged commit 219ffc2 into main Sep 23, 2026
6 checks passed
@matthias-scale
matthias-scale deleted the fix/subagent-transcript-busy-budget branch September 23, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claimed:cl-6438c7c3 Herdr PR claim label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant