Skip to content

Never flag a native mirror as needing attention - #1161

Merged
edwin-zvs merged 1 commit into
mainfrom
fix/native-mirror-attention-dot
Aug 2, 2026
Merged

Never flag a native mirror as needing attention#1161
edwin-zvs merged 1 commit into
mainfrom
fix/native-mirror-attention-dot

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

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_buckets skips native_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, and descendants_need_attention didn'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.rsdescendants_need_attention skips 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 reads needs_attention straight 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. Asserts unseen_activity is 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.

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.
@edwin-zvs
edwin-zvs merged commit 6b1db6d into main Aug 2, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the fix/native-mirror-attention-dot branch August 2, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant