Skip to content

OpenCode /sessions picker hides older sessions; document/bridge workaround #1902

Closed

Description

@itzxSage

Draft: Track OpenCode /sessions Picker Bug + Improve Workarounds

Summary

OpenCode TUI’s built-in /sessions interactive picker only shows recent sessions for this user (observed cutoff around Feb 11, 2026). Older sessions still exist in the OpenCode DB and can be accessed by ID, but they’re not reachable via the picker list.

This appears to be in OpenCode core (the TUI picker’s backing endpoint), not in oh-my-opencode.

I’m filing here to:

  1. Track the upstream OpenCode issue and link it.
  2. Improve documented/workaround pathways in oh-my-opencode so users can easily list older sessions and jump to them.

Environment

  • OpenCode: opencode 1.2.5
  • OhMyOpenCode: 3.6.0
  • OS: macOS

What would help from oh-my-opencode

1) Document reliable ways to list sessions (including older)

The session_list tool already supports filters such as from_date/to_date and project_path. It would help to prominently document:

  • How to list sessions across all time
  • How to list sessions before a date (ex: before Feb 11)
  • How to continue a session by ID after listing

2) Optional: Provide a “jump to session” helper tool

If feasible at the plugin/tool level, add a helper that:

  • Lists sessions and returns a copy-pastable /continue <session_id> instruction
  • Or integrates with whatever navigation bridge is possible (if any)

Links

  • Upstream OpenCode issue: [LINK TO BE ADDED]

Activity

  1. code-yeongyu commented on Feb 17, 2026

    @code-yeongyu
    Owner

    Thanks for filing this! You're correct that this is an upstream OpenCode core issue with the /sessions picker.

    Current state in oh-my-opencode:

    We already have session management tools that can help work around this:

    • session_list - Lists sessions with filters:

      • from_date / to_date - ISO 8601 date range filtering
      • project_path - Filter by project directory
      • limit - Limit results
    • session_read - Read messages from a specific session by ID

    • session_search - Search across session content

    • session_info - Get metadata for a session

    The gap:
    While you can list and read older sessions, there's currently no session_select tool to actually continue a session from the agent. Users have to manually type /continue <session_id> in the TUI after finding the ID.

    Next steps:

    1. I'll look into adding a session_select tool that returns the proper /continue command
    2. We should document the date filtering capabilities better in the features guide

    Keeping this open as a valid feature request to bridge the upstream limitation.

  2. code-yeongyu commented on Mar 2, 2026

    @code-yeongyu
    Owner

    [sisyphus-bot]

    Analysis

    This is a valid feature request to bridge the upstream OpenCode TUI limitation where /sessions picker only shows recent sessions.

    Current Session Tools Assessment

    I analyzed the codebase and found 4 existing session management tools in src/tools/session-manager/tools.ts:

    Tool Purpose Status
    session_list List sessions with date/project filters ✅ Available
    session_read Read messages from a session by ID ✅ Available
    session_search Search across session content ✅ Available
    session_info Get session metadata ✅ Available

    Gap Confirmed

    The session_select tool mentioned by @code-yeongyu does not exist in the codebase. Verified via search - no matches for session_select.

    The Challenge

    A session_select tool faces an architectural constraint: OpenCode plugins/tools cannot directly invoke TUI commands like /continue. The plugin operates within the agent context, not the TUI shell.

    Potential approaches:

    1. Documentation approach (low effort): Add clear examples showing how to use session_list with date filters to find older sessions, then manually /continue <session_id>

    2. Helper output approach (medium effort): Create session_select that returns a formatted message with the /continue <session_id> command ready for the user to copy-paste

    3. Navigation bridge (high effort / may not be possible): Investigate if OpenCode exposes any API for session switching from within a plugin context

    Recommended Next Steps

    For maintainers:

    • Document the date filtering capabilities (from_date, to_date on session_list) with examples for finding older sessions
    • Evaluate feasibility of a session_select helper that outputs the proper /continue command
    • Link to upstream OpenCode issue when available

    For users (workaround):

    # List sessions before a specific date
    session_list(from_date: "2026-01-01", to_date: "2026-02-11")
    
    # Then manually continue: /continue <session_id>
    

    Classification

    • Type: Feature Request / Enhancement
    • Priority: Low-Medium (has workaround)
    • Effort: Small (documentation) to Medium (new tool)
    • Blocked on: None, but upstream fix would eliminate need
  3. code-yeongyu commented on May 16, 2026

    @code-yeongyu
    Owner

    [sisyphus-bot]

    Read-only triage on dev.

    Current state

    • Boulder state (src/features/boulder-state/) tracks active plans but does not expose a "done" or "archive" state for completed plans.
    • Plans remain in the active list indefinitely unless manually removed.
    • Adding a done/complete state would require:
      1. A new state enum value (done).
      2. A transition hook from active to done.
      3. UI filtering to hide done plans from the active list.

    Action

    • Labels: triage:feature-request (already set). No label change.
    • Keep open. Assigning code-yeongyu for scope decision: whether to add plan lifecycle states or to keep the current flat list.
  4. self-assigned this
    on May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions