8000 Fix stale agent rows in the sidebar by strayge · Pull Request #435 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

Fix stale agent rows in the sidebar - #435

Merged
amirlehmam merged 3 commits into
amirlehmam:masterfrom
strayge:feat/sidebar-agent-roster
Nov 4, 2026
Merged

amirlehmam merged 3 commits into
amirlehmam:masterfrom
strayge:feat/sidebar-agent-roster

Conversation

@strayge
@strayge strayge commented Nov 4, 2026 •
Copy link
Copy Markdown
Contributor

Problem

The sidebar keeps showing an agent as idle after it exits because retained hook or observer history establishes its presence independently of the shared agent roster. Identified agents that report no state also incorrectly appear idle.

Changes

  • Derive sidebar agent membership and state from the shared roster.
  • Remove activity-history fallbacks that recreate released agents or infer idle state.
  • Show silent agents as “reports no state” rather than “Idle.”
  • Keep tool, skill, background-shell and approval details attached to roster-backed sessions.
  • Update tests for released agents, silent agents and sidebar status consistency.

Testing

  • Full test suite: 6,478 passed, 10 skipped.
  • Typecheck passes.
  • Manually tested with pi agent.

@strayge
strayge marked this pull request as ready for review November 4, 2026 02:45
strayge and others added 3 commits November 4, 2026 11:58
A roster member whose state is `unknown` has made no claim, so the
sidebar row must not pin it to "reports no state" while fresh hook or
observer activity shows it running a tool. Fresh activity (same 5 s
window as before) now reads as working with that tool label. Membership
stays roster-gated, so retained history still cannot bring a released
agent back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its only writer hard-coded it to false once idle claims moved to the
shared agent roster, so it could no longer affect any status chain.
Remove it from StatusTextInputs and mergedAgentSignals, move its tests
onto the roster idle count, and rewrite the hookActivity comments in
App.tsx that still described entries kept forever to tell idle from a
plain shell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@amirlehmam
amirlehmam force-pushed the feat/sidebar-agent-roster branch from 5b1c87c to b72ac2a Compare November 4, 2026 10:59
@amirlehmam
Copy link
Copy Markdown
Owner

Thanks, this fixes the ghost rows: agent presence now comes from the shared roster, and released agents no longer come back from old hook history. 18 of your tests fail if the src change is reverted, so it's well covered.

Before merging I added two commits:

  • unknown falls back again. wmux has a rule that an agent reporting unknown falls back to the heuristic rather than reading as idle. The PR had dropped that, so Claude without hooks (consent declined, ssh, or detection off) showed "reports no state" while the observer saw it running a tool. A roster entry in state unknown now uses fresh hook or observer activity (the same 5 s window as before) for its working state and tool label. Membership is still roster-only, so your ghost-row fix stands. The deleted test is restored, and a new one checks that a released agent with fresh history still doesn't come back.
  • Dead input. claudeIsIdle was always false at its only writer, so it is removed, and the comments about hookActivity are updated.

Merging; it ships in the next release.

@amirlehmam
amirlehmam merged commit 9f2cd1f into amirlehmam:master Nov 4, 2026
@strayge
strayge deleted the feat/sidebar-agent-roster branch November 8, 2026 18:03
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.

2 participants

0