Skip to content

[FEATURE]: Live session status panel in sidebar + background session completion notifications #28175

Closed as not planned

Description

@ptandler

Problem

OpenCode supports running multiple sessions simultaneously, but there is no way to
monitor them at a glance. The only option is the /sessions command (ctrl+x l),
which opens a modal list — it does not show live status and requires leaving the
current session to check.

When a background session finishes or errors, there is no notification. The user
only finds out by manually switching to that session.

Proposed Solution

1. Persistent session status panel in the TUI sidebar

Show a compact, always-visible list of sessions in the sidebar — filtered to those
that are currently relevant:

  • Active sessions (busy or retry status per the existing SessionStatus model)
  • Recently finished sessions (transitioned from busy/retry back to idle
    within the current TUI session)

Sessions that were never active in this TUI session should not clutter the panel.

For each entry, show:

  • Session name / title
  • Current status: busy / retry (with attempt count) / finished
  • Model and agent in use, if space permits
  • Last activity timestamp

Unvisited finished sessions must be visually highlighted — e.g. a distinct
color, badge, or marker — until the user switches to that session at least once.
This is the primary signal that work is ready for review. The highlight clears
as soon as the session is opened.

The panel should update live via the existing session.status SSE bus events —
no polling needed, the infrastructure is already there.

2. Completion / error notifications

When a background session transitions to idle (finished) or enters a retry
state (error with backoff), show an in-TUI notification — e.g. a toast or status
bar flash — so the user gets an immediate signal without having to watch the
sidebar.

The existing /tui/show-toast API already supports this; it would just need to
be wired to session.status events for non-foreground sessions.

Optional: a config flag to enable/disable notifications globally or per-session.

Why This Matters

Power users running parallel sessions (e.g. one session per feature, or a
background research session + a foreground build session) currently have no
visibility into what other sessions are doing. The most critical gap is not
knowing when a background session has finished — and whether it succeeded or
hit an error — without manually switching to it.

The server-side data (GET /session/status, session.status SSE events) already
exists. This is primarily a TUI rendering feature request.

Related

Activity

  1. github-actions commented on May 18, 2026

    @github-actions
    Contributor

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

    If these are addressing the same need, consider consolidating or referencing each other.

  2. kommander commented on May 18, 2026

    @kommander
    Collaborator

    We are working on better session navigation and overview already, should land shortly.

  3. ptandler commented on May 18, 2026

    @ptandler
    Author

    #27995 is really related: it's about the agents, while this is about sessions

  4. ptandler commented on May 18, 2026

    @ptandler
    Author

    We are working on better session navigation and overview already, should land shortly.

    that's great to hear! One thing that is really important to me that I get clear notifications when a background session has stopped to get user input

  5. nexxeln commented on May 18, 2026

    @nexxeln
    Contributor

    im working on this. what are some things you'd like to see apart from notifications? would love to hear from other people as well

  6. ptandler commented on May 19, 2026

    @ptandler
    Author

    im working on this. what are some things you'd like to see apart from notifications? would love to hear from other people as well

    great!! 🫶

    The most important part for me is that the session panel in the sidebar shows the recently active sessions and their status (working, finished, waiting for answers, ...), so I can monitor what's going on in the background.

  7. TheLoroXD commented on May 27, 2026

    @TheLoroXD

    I opened a couple of smaller draft PRs that should help support this kind of live session/status UI without bundling a large UI change up front:

    For the sidebar/status-panel UI itself, I am leaving that design here rather than opening a competing UI PR, since the contribution guide asks product/UI features to go through design review first and maintainers noted work is already in progress.

  8. R44VC0RP commented on Jul 9, 2026

    @R44VC0RP
    Collaborator

    A related V2 API consideration for the sidebar implementation: showing active subagents beneath their parent session currently cannot be done precisely from session.list({ roots: true }) or session.status() alone.

    The available client-side derivation is:

    • session.status() identifies active/retrying session IDs.
    • Child Session records identify parentID and agent/title.
    • Parent task-tool metadata identifies whether execution was explicitly backgrounded (sessionId, background, jobId).

    Calling session.children() and session.messages() for every visible root would introduce an N+1 request pattern. The app can approximate active child sessions from its existing status/info caches with usually zero extra requests, but it cannot reliably classify foreground vs background execution without parent task metadata.

    It may be useful for V2 to expose an aggregated active-subagent projection, for example:

    const result = await client.session.subagents({
      directory,
      active: true,
    })
    
    type ActiveSubagent = {
      session: Session
      parentID: string
      rootID: string
      status: SessionStatus
      execution: "foreground" | "background"
      jobID: string
    }

    The server can produce this efficiently by joining its authoritative runtime sources once:

    • SessionStatus.list() for busy/retrying sessions
    • BackgroundJob.list() for task execution mode
    • a batched session/ancestry lookup for metadata

    A matching lifecycle event would also be valuable. Promotion from foreground to background may not change the child session's busy status, so session.status alone cannot communicate that classification change.

    This would keep background-job semantics on the server and avoid hiding N+1 children()/messages() calls inside an SDK convenience helper. Until such a contract exists, the sidebar can display active child sessions from cached status/session info and treat explicit background classification as unavailable or opportunistic.

  9. aidan-gallagher commented on Jul 16, 2026

    @aidan-gallagher

    I solved this for myself using zellij and an opencode plugin.

    https://github.com/aidan-gallagher/opencode-zellij-indicator

  10. github-actions commented on Sep 15, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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