Skip to content

Feature: UI to close/dismiss Done agents + bulk cleanup (sidebar has no close affordance) #10718

Open

Description

@howardpen9

Summary

When agents finish, the sidebar shows them as Done (green check) but provides no visible close / dismiss / delete control. On remote Mac mini hosts this leaves many live PTYs + agent processes (e.g. dozens of idle grok processes), which burns RAM/swap and makes the machine feel slow.

CLI can clean this (orca terminal close, orca terminal stop), but that is not discoverable from the UI and is awkward as daily hygiene.

Environment

  • Orca desktop 1.4.155 (com.stablyai.orca)
  • Host: Mac mini (16 GB), agents often driven remotely from another machine
  • Agents: Grok / Claude / etc. as Orca-managed terminals

Observed behavior

  1. Sidebar under a project/worktree shows N agents, many labeled Done - Grok (green ✓).
  2. Hover / focus on a Done agent row does not expose Close, Dismiss, or Remove.
  3. Status lights communicate “done” but not how to reclaim resources.
  4. Finished agents remain connected terminals; OS still has agent CLI processes (often --resume idle).
  5. Remote workflow amplifies this: sessions pile up across days without a “clean finished agents” path in UI.

Measured example before cleanup (same host):

Metric Value
orca terminal list 44 connected
grok processes ~75
RAM 16 GB with compressor pressure + swapouts

After CLI cleanup of zombie agent tabs (keep active shells): terminals 6, grok processes ~9.

Expected

  1. Per-agent close in the sidebar (X / context menu: Close tab, Kill agent).
  2. Bulk actions on a worktree or project:
    • Close all Done agents
    • Close all idle agent tabs older than N hours
    • Keep active / non-Done
  3. Optional warning badge when finished-but-still-connected agent count exceeds a threshold (e.g. >5) with one-click “Clean Done agents”.
  4. Optional setting: auto-close Done agent tabs after idle TTL (default off).
  5. Keyboard shortcut for “Close current agent tab” and “Close all Done in this worktree”.

Why it matters

  • ADE is built for fleets of agents; without lifecycle UI, fleets become memory leaks.
  • Remote mini / VPS users hit this first (16–32 GB boxes, many short sessions).
  • Status “Done” currently looks like a completed task, not a resource still held.

Workarounds today

# list
orca terminal list --json

# close one tab
orca terminal close --terminal term_xxx          # often works better than --tab alone
orca terminal close --terminal term_xxx --tab

# stop all terminals on a worktree (destructive to active ones too)
orca terminal stop --worktree path:/path/to/wt

These are fine for agents/power users, not for the default UI loop.

Related product note

orca terminal close --tab sometimes returns terminal_tab_not_found while the handle still appears in terminal list; plain orca terminal close --terminal <handle> succeeds. Worth aligning list/close lifecycle too.

Request

Treat agent process lifecycle as a first-class UI surface: Done should either free resources or clearly offer “Close & free”. Happy to test builds on macOS arm64 remote host setups.

Activity

  1. howardpen9 commented on Jul 26, 2026

    @howardpen9
    Author
    Image

    The screenshot from my laptop; I can't closed them on UI level. Which is annoying.

  2. howardpen9 commented on Jul 26, 2026

    @howardpen9
    Author

    Follow-up from real host (same remote mini)

    Two layers of “Done agents”

    1. Live PTYs — visible in orca terminal list --json. Closing with orca terminal close --terminal <handle> frees processes/RAM.
    2. Sidebar inline-agents history — worktree card shows N agents / Done - Grok with relative times even when no matching live terminal remains. After closing live tabs, the Done rows still show (green checks, no close affordance). CLI has no API to clear this history.

    So “cleanup” via CLI can free resources while the UI still looks crowded. That makes the missing UI close control worse: users think agents are still running when they’re already ghosts.

    Related close CLI quirk

    orca terminal close --terminal X --tab often returns terminal_tab_not_found while the handle still appears in terminal list. Plain orca terminal close --terminal X succeeds more reliably.

    Request add-ons

    • Clear / dismiss Done agent history on a worktree card (not only live tabs)
    • Distinguish live vs history in the sidebar (or auto-prune history when PTY is gone)
    • Right-click / X on Done rows
  3. howardpen9 commented on Jul 26, 2026

    @howardpen9
    Author

    Independent review (Kimi K3) — classification

    Cross-check by Kimi (Moonshot CLI, model k3) on the same host evidence. Summary for triage:

    Verdict: both (bug + missing feature)

    Piece Classification
    Done rows remain after live PTY is closed Bug — inline-agents / history not synced to terminal lifecycle
    No dismiss / clear affordance on Done rows Missing feature — UI and CLI
    Done status while agent process still connected Product gap — status misleads users about resource ownership

    Severity: P2

    Not P0/P1: no crash, no data loss; sessions often still resumable (grok --resume).
    Still P2 because:

    • Misleads users (“6 agents” looks live when backing PTYs may be gone)
    • Remote 16GB hosts accumulate live PTYs until closed, then still show ghost Done rows
    • Basic list UX invariant broken: items are not dismissible
    • Compounds over long-running remote sessions

    Two-layer model (confirmed useful for fix design)

    Layer Source of truth After orca terminal close
    A. Live PTY orca terminal list Removed; process/RAM freed
    B. Sidebar Done / inline-agents history Worktree card UI Often still shows Done-Grok rows — no CLI clear path

    Root issue for ghosts: Layer A close does not update Layer B.

    Suggested ship (minimum)

    UX

    1. Dismiss on Done row (hover X / context menu)
    2. On PTY close: remove or archive the matching Done row
    3. Bulk “Clear all Done” on worktree card

    CLI (illustrative)

    orca terminal dismiss --terminal <handle>
    orca terminal dismiss --worktree path:<path> --all-done

    Internal

    • Emit terminal_closed (or equivalent) from PTY layer
    • Worktree / inline-agents subscriber filters history on that event

    Related CLI quirk (same area)

    orca terminal close --terminal X --tab often returns terminal_tab_not_found while the handle still appears in terminal list. Plain close without --tab is more reliable.

    Out of scope / not Orca’s bug

    Aggressive third-party hygiene scripts that close mid-conversation agent tabs are operator error; session files remain resumable. That does not excuse missing lifecycle sync or dismiss UI.

    Confidence

    ~85. Would revise downward if Done rows are intentionally append-only audit history with documented TTL, or if a hidden dismiss gesture already exists.


    Source: live remote mini repro (Orca 1.4.155) + independent Kimi review on the same write-up.

  4. nwparker commented on Aug 3, 2026

    @nwparker
    Contributor

    Saw you closed this -- did you want this open @howardpen9 ?

  5. creatorKoo commented on Aug 9, 2026

    @creatorKoo

    Automation-specific repro

    Confirmed on Orca 1.4.177 with a Codex automation targeting an existing worktree (reuseSession: true).

    Each successful automation run:

    • completes normally,
    • leaves no live terminal,
    • adds one more non-dismissible Done - Codex row to the worktree card.

    After two runs, the card shows 2 agents, although orca terminal list reports no live terminals. Tapping the completed rows does not open anything. The count continues growing by one after every run.

    Expected: completed runs may remain in Automation Run History, but ghost inline-agent rows should be automatically pruned or offer per-row/bulk dismissal or a retention TTL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions