Skip to content

TUI session list shows no activity spinner for background shell commands #51810

Open

Description

@kernel-oops

Description

In the TUI session list, the activity spinner beside a session covers a running turn and running subagents, but not background shell commands. A session whose turn has ended while it runs a long command in the background (for example a full test suite started with the shell tool's background option) shows no spinner in the list, so it looks idle, while the footer inside that session correctly shows 1 shell.

The list already treats background subagent work as activity, so leaving out background shells looks like an oversight.

Plugins

None needed.

OpenCode version

v2.0.16 (also the current v2 branch)

Steps to reproduce

  1. In a session, have the agent start a long command in the background (for example sleep 300 via the shell tool with background enabled) and let its turn end.
  2. Open the session list (/sessions).
  3. The session has no spinner, although the footer inside it shows 1 shell until the command exits.

Screenshot and/or share link

n/a

Operating System

Linux

Terminal

n/a

Activity

  1. github-actions commented on Sep 28, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #28175: requests persistent live session status in the TUI, including visibility into background sessions.
    • #51336: requests a persistent session activity indicator and notes that background shell tasks may not be visible.
  2. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the clear report, @kernel-oops!

    To restate the request: the session list (/sessions) should show its activity spinner while a session still has background shell commands running after its turn has ended, the same way the footer inside the session shows 1 shell.

    Right now the list's spinner only covers a session, or one of its subagents, actively running a turn. Background shells are tracked separately and aren't part of that check. The session tabs' busy indicator doesn't count them either. So this works as currently designed rather than being a bug, but it's a reasonable improvement and I've marked it as a feature request for the maintainers to consider.

    This can't be done as a plugin today, because plugins can't change the session list's status indicators. I've noted for the maintainers that it could be done either directly in the TUI, by checking for running shells owned by the session, or with a new plugin hook for per-session activity.

  3. naihongzhou1029 commented on Nov 7, 2026

    @naihongzhou1029

    Adding a TUI tab-strip data point to help fix this centrally (originally filed as #62505, confirmed duplicate).

    Reproduction for tabs:

    1. Open two session tabs.
    2. In one session, run a long shell in the background (shell tool run_in_background, e.g. task_run.sh run ... -- python3 ... &).
    3. Once the turn ends, the transcript row keeps its spinner + Background badge, but the tab shows no spinner.

    Same cause as the list: packages/tui/src/context/session-tabs.tsx status() checks data.session.status(id) === "running" and non-synthetic pending, but never data.shell.listBySession(id). ShellDisplay in packages/tui/src/routes/session/index.tsx does check data.shell.get(id), hence the mismatch. Fixing status() to also count running shells owned by each family member should fix the session list, tab strip, createProgramStatus, and likely the related gaps in #62365 and #48482. Web-side proposal #56661 (for #56660) may be a useful reference for the same pattern.

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

Metadata

Metadata

Assignees

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