Skip to content

[Feature]: Let the Agents panel clear settled and idle agents #5918

Description

@LordMerc

Area

apps/web

Problem or use case

On a long-lived thread the Agents panel accumulates every subagent it has ever spawned, and there is no way to hide any of them. Finished agents (completed / failed / cancelled / interrupted) and idle ones stay in the list forever, so the one agent that is actually working ends up buried under history.

This gets worse the more useful a thread is. A thread that has run several workflows can show a dozen-plus dead rows above the single running agent, and scanning for live status turns into a hunt.

Idle is the annoying case specifically. An idle agent is not finished, so it never reads as "done", but it is also not doing anything — it just sits there looking like it might still matter.

Proposed solution

Add a Clear inactive button to the Agents panel footer. It hides every agent in the current thread that is not actively working — both settled and idle. Agents in pending, running, or waiting stay visible.

Nothing is destroyed. The clear is a per-thread timestamp cutoff:

  • The footer shows N hidden · Show all while a cutoff is active, so it is always reversible.
  • The empty state becomes "No active agents" with the hidden count and a Show all button.
  • The cutoff lives in localStorage, keyed per thread.
  • Any agent that starts working again reappears on its own, because its updatedAt moves past the cutoff.
  • Workflow groups clear atomically — if any member is still working or newer than the cutoff, the whole coordinator/member group stays visible, so you never see a workflow with holes in it.

Explicitly out of scope: this is presentation-only. Clearing does not cancel an agent, delete provider history, or touch orchestration state. No server changes.

Why this matters

Anyone running multi-agent threads for more than a few minutes. The Agents panel's job is to tell you what is happening now, and right now it competes with an unbounded, unfilterable log of what already happened. A one-click way to collapse to "just the live ones" makes the panel usable on exactly the threads where it matters most.

Smallest useful scope

A single Clear inactive button that hides non-working agents for the current thread, with Show all to undo it. Client-side only, no persistence across devices, no per-agent dismissal, no auto-clearing.

Alternatives considered

  • Clear only terminal agents. Simpler, but leaves idle agents on screen — which is most of the clutter in practice, so the button would look broken.
  • Per-agent dismiss (an × on each row). More precise, but it is a click per agent when the common case is "hide all the dead ones at once".
  • Auto-hide after a timeout. Removes control from the user and makes agents vanish while you are reading them.
  • Collapsible "Earlier" section. Some grouping already exists; it still leaves everything on screen and does not help when the history is long.
  • Reloading the page / switching threads. Doesn't help — the panel rebuilds from the same state.

Risks or tradeoffs

  • Idle is treated as clearable, which is a judgment call. An idle agent is resumable, so someone could reasonably argue it should stay. The reappear-on-resume behavior is what makes this safe, and Show all is always there.
  • Cutoff state is per browser. Clearing on desktop does not clear on mobile. Acceptable for a view preference.
  • The stored map grows one entry per thread you have ever cleared, so it needs a cap (oldest dropped first) to avoid unbounded localStorage growth on long-lived installs.
  • Interaction with Agents panel (new in #5219): a resumed subagent stays in Earlier and stops updating - 0.0.32-nightly.20260806.1014 #5529 (resumed subagent stays in Earlier and stops updating). A cutoff based on updatedAt depends on that field advancing on resume; if it does not, a resumed agent could stay hidden. Worth checking these together.

Examples or references

Related: #5529, #5219.

Contribution

I would be open to helping implement this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions