Skip to content

[FEATURE]: Pinned session tabs in the TUI sidebar #24451

Closed as not planned
Closed as not planned

Description

@MrRobotoGit

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Note on possible duplicates

The compliance bot flagged #24400 as a possible duplicate. They both touch the right sidebar but propose different things:

  • [FEATURE]: expansion of the side panel #24400 asks for Recent Projects and Installed Plugins collapsible sections (project switching + plugin management).
  • This issue asks for a live, persistent SESSIONS panel — pinned + ephemeral entries with per-row spinner/idle indicators driven by session.status SSE events. The goal is parallel-session orchestration, not project/plugin management.

The two are complementary; neither subsumes the other.

Problem

Working on multiple sessions in parallel today means juggling several terminal windows running separate opencode instances. The TUI is single-session: switching between sessions only happens via the DialogSessionList modal (<leader>l), which closes after each pick and gives no visibility on what other sessions are doing in the background.

I keep one session per task/issue and constantly want to (a) glance at whether another session is still working and (b) jump back to it without re-searching the list.

Proposed enhancement

Add a small "SESSIONS" panel at the top of the existing right sidebar. It would show:

  • Pinned sessions — a stable, persistent list curated by the user (<leader>p to pin/unpin).
  • Ephemeral entries — sessions visited in the current TUI run that aren't pinned, plus any session that's currently busy/retrying elsewhere. They stay listed until the TUI restarts or the user closes them, so a new prompt you just submitted doesn't disappear when you click another tab.

Each row shows a live status indicator (spinner when the model is generating, retry glyph for retry, dot for idle). Pinned rows pick up theme.primary, ephemeral rows pick up theme.secondary, so the distinction adapts to the active theme.

UX details

  • Pin/unpin: <leader>p (/pin). Toggles the active session.
  • Close tab: <leader>w. Drops a pinned session from the list (or removes an ephemeral one from this run's history); falls back to a neighbour tab.
  • Switch tabs: ctrl+up / ctrl+down. Direct keybinds (no leader) so they work on any keyboard layout — [/] would have required Option on non-US Mac layouts.
  • All four actions are also registered in the command palette (Ctrl+P), so they're discoverable without learning the keybinds first.
  • Pinned set is persisted per-project-directory at ~/.local/share/opencode/state/session-tabs.json. Visited (ephemeral) set is in-memory only and clears on TUI restart.
  • Sidebar can still be hidden with <leader>b (existing sidebar_toggle); no change to the layout when it's collapsed.

Why I think it belongs in OpenCode

  • The server already supports concurrent sessions (SessionRunState keeps an independent Runner per SessionID) and emits session.status events the TUI already consumes (sync.tsx).
  • The data path is therefore zero new infrastructure — this is purely a UI layer over state that already exists.
  • It removes a real friction point for anyone running multiple parallel agents from a single terminal.

I have a working implementation ready as draft PR #24452 (pending design review per CONTRIBUTING).

Inspiration

The interaction is loosely inspired by lanes.sh, which keeps a live tab bar of CLI tasks. Kept entirely inside opencode and scoped to opencode sessions only — no separate dashboard, no extra binary.

Screenshot

Image

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 26, 2026
  2. github-actions commented on Apr 26, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The feature request template requires a verification checkbox confirming you have checked that this feature hasn't been suggested before (e.g., "I have verified this feature I'm about to request hasn't been suggested before"). Please add this confirmation.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


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

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. github-actions commented on Apr 26, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! Unfortunately it's still missing one required element from the Feature Request template.

    What still needs to be fixed:

    • The feature request template requires a verification checkbox confirming you have checked that this feature hasn't been suggested before (e.g., - [x] I have verified this feature hasn't been suggested before). Please add this to your issue.

    Please edit the issue to include this checkbox to reach compliance.

  4. github-actions commented on Apr 26, 2026

    @github-actions
    Contributor

    Thanks for updating the issue — the content is much improved and clearly explains the problem and proposed solution.

    There is one remaining item needed for compliance with the Feature Request template:

    Verification checkbox — the template requires a checkbox confirming you've searched for existing issues/discussions to avoid duplicates. Please add it to the issue body.

    Once that's added, the needs:compliance label will be removed.

  5. github-actions commented on Apr 26, 2026

    @github-actions
    Contributor

    Thanks for updating the issue and adding the verification checkbox — everything looks good now. The needs:compliance label has been removed. Looking forward to the draft PR!

  6. assigned and unassigned on Apr 26, 2026
  7. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  8. github-actions commented on Jul 4, 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