Never flag a native mirror as needing attention - #1161
Merged
Conversation
A harness-native subagent mirror is a read-only projection (spec 0079): the operator cannot send it input, resume it, or approve anything on it. Painting the "needs you" dot on such a row promises an action that does not exist — the owning harness drives the child, and the operator's lever is the owning session's own row. The fleet tally already excludes mirrors for this reason (spec 0169), but the row itself painted the dot, and the collapsed-ancestor rollup let a mirror's marker light its parent — reintroducing exactly the native-child noise the tally was written to drop. Suppress it at the source: the daemon no longer raises the marker on a session carrying native provenance, and each projection clears any marker a previous build stored, so an unarchiving mirror can't resurface one. The rollup skips mirrors, and the TUI row, `construct ls`, and the web UI decline to paint a stored marker for one, so an upgrade over existing state is quiet too. Amends spec 0054 with the exclusion and its tradeoff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A harness-native subagent mirror no longer wears the blue "needs you" dot — not on its own row, not rolled up onto a collapsed ancestor, not in
construct ls, not in the web UI.Why
Spec 0054 defines the dot as "this session is waiting on you," cleared by looking at it. Spec 0079 defines a native mirror as a read-only projection: the operator cannot send it input, resume it, interrupt it, or approve anything on it — the owning harness drives the child entirely. So the dot named an action that does not exist, and the only row the operator can actually act on is the owning session's.
The codebase already half-agreed.
fleet_status_bucketsskipsnative_subagent.is_some()with a test asserting "a native-only attention mark must not enter the wants-you tally on its own row" (spec 0169) — but the row itself painted the dot anyway, anddescendants_need_attentiondidn't skip mirrors, so a collapsed parent rolled up its native children's dots. That is exactly the "a busy Claude/Codex child tree drowns the fleet signal" failure 0169 was written to prevent, arriving through the back door.Mirrors do get flagged today: projected child events run through
handle_event, which applies the normal marker logic. Terminal mirrors are archived immediately so the dot is usually short-lived, but the rollup leak and 0079's unarchive-on-new-activity path make stale mirror dots real.How
Suppressed at the source rather than per-renderer, so every surface agrees without each one having to remember the rule:
daemon/src/session/events.rs— the marker is not raised for a summary carrying native provenance. Each projection also clears the field, which retires markers persisted by earlier builds so they can't resurface when a mirror unarchives.cli/src/app.rs—descendants_need_attentionskips mirrors, so no collapsed ancestor lights up for one. Construct-owned subagents and forks still roll up.cli/src/ui.rs,cli/src/main.rs,daemon/assets/index.html— the row,construct ls, and the web UI decline to paint a stored marker for a mirror, so upgrading over existing state is quiet too.Adjacent consumers needed no changes: the group-header rollup delegates to
descendants_need_attention, and MIDI feedback readsneeds_attentionstraight through, so both follow the daemon.Spec 0054 gains the exclusion as a decision bullet plus its accepted tradeoff (a genuinely stalled native child raises no dot of its own; the operator acts through the owning session, which flags normally when it stops).
Tests
native_mirror_never_raises_needs_attention(daemon) — a mirror that produces unwatched output and then stops carries no marker. Assertsunseen_activityis still recorded, so the suppression is "because of what a mirror is," not "by pretending it was idle." Also covers the legacy-stored-marker clear.collapsed_parent_does_not_roll_up_native_mirror_attention(TUI) — no dot on the mirror's own row, none on the expanded parent, none rolled up when collapsed; a Construct-owned sibling still rolls up.cargo test --workspace: 2448 passed, 0 failed, 7 ignored.Media
Skipped deliberately. The visible delta is a dot that no longer appears, and staging it needs a real Claude/Codex child that stops while unfocused — a recording of "nothing happens" is weaker evidence than the two tests. Happy to add a before/after pair if a reviewer wants one.