Skip to content

[FEATURE]: Cross-project session list / picker for TUI #31932

Closed

Description

@mskadu

Feature has not been suggested before.

  • I have verified this feature I am about to request has not been suggested before.

Describe the enhancement you want to request

Problem: The built-in /sessions command is scoped to the current project. When working across multiple repos, there is no way to discover or jump to sessions in other projects without navigating there first. Related: there is no API to change Instance.directory at runtime (see #6697, #1143), so even finding the right session does not let you switch context in-process without spawning a new process.

Requested capability:

Two independent but complementary features:

  1. Cross-project session list — a way to list sessions across all projects. Options:

    • A flag like /sessions --all
    • A separate command like /all-sessions
    • An all filter in the TUI sessions list route
  2. Runtime directory API — a way to change the working directory of the current OpenCode process, e.g. Instance.directory.set(path). This would let a plugin or command resume a session from a different project without spawning a new terminal.

Related issues: #1143, #6697, #30606, #27447, #21018

Context: I am in the process of building a plugin (mskadu/opencode-all-sessions) that aims to work around the first gap by listing all sessions via client.session.list() and spawning a new terminal. It should work, but it would be cleaner as a core feature.

Potential duplicate: #31493 is related (web project picker sessions) but covers a different scope — it is a bug report about the web UI not loading sessions for a selected project, which is a server context issue rather than a missing feature request for a cross-project session view.

Activity

  1. github-actions commented on Jun 11, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Feature requests should use the [FEATURE]: prefix in the title and follow the feature request template, including a verification checkbox confirming the feature doesn't already exist.

    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.

  2. changed the title [-]Cross-project session list / picker for TUI[/-] [+][FEATURE]: Cross-project session list / picker for TUI[/+] on Jun 11, 2026
  3. mskadu commented on Jun 11, 2026

    @mskadu
    Author

    Updated: title now has [FEATURE]: prefix, body includes verification checkbox and full description matching the template. Potential duplicate #31493 addressed in the body.

  4. github-actions commented on Jun 11, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now follows the contributing guidelines and looks great. The feature request is well-described with clear context and related issues. Appreciate the detailed write-up!

  5. github-actions commented on Jun 11, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now follows the contributing guidelines and looks good. We appreciate the clear description of the problem, the requested capability, and the relevant context. Your issue is now compliant.

  6. onurmicoogullari commented on Jun 22, 2026

    @onurmicoogullari

    I have a PR ready that solves the cross-project session picker part of this issue.

    It adds an explicit global mode to the existing session picker:

    • default /sessions behavior remains scoped to the current project/directory
    • users can toggle the picker into a global session list
    • global rows show project/path context so similarly named sessions can be distinguished
    • selecting a global session resumes that existing session
    • session-scoped requests continue using the selected session's stored directory
    • --continue and normal scoped sync behavior are unchanged

    This covers the cross-project picker workflow and the “resume an existing session from another project” path. It does not add a general runtime directory mutation API for plugins.

    Screenshots

    Default scoped mode:
    Default scoped session picker mode

    Sessions outside the current working directory are not shown:
    Scoped session picker with no cross-project sessions shown

    Global mode enabled:
    Session picker with global mode enabled

    Cross-project sessions are discoverable with project and path context:
    Global session picker showing sessions from multiple projects

  7. onurmicoogullari commented on Jun 22, 2026

    @onurmicoogullari

    I noticed this issue is already assigned.

    For context: I ran into this locally, built a small picker-focused fix, and only found this issue when I was about to open one. I linked the PR here instead of creating a duplicate.

    Not trying to step on anyone’s work. Happy to align with the assigned owner, adjust scope, split out tests, or close/defer if there is already a preferred direction.

  8. 11 remaining items

  9. acramsay commented on Jul 22, 2026

    @acramsay

    Is there any maintainer attention on this? Anything we can do to help with it?

  10. wsaaaqqq commented on Jul 22, 2026

    @wsaaaqqq

    I ran into the exact same problem -- sessions scattered across projects, no way to find the right one without cd-ing around.

    I ended up building oos, a standalone TUI tool that reads the OpenCode SQLite db directly and lets you search across ALL sessions from ALL projects at once:

    • Type a keyword -> real-time filter across all projects
    • ↑/↓ to pick, Enter to resume the conversation
    • Multi-keyword AND + ! exclusion
    • Zero config, single binary

    https://github.com/wsaaaqqq/oos

    It's been a lifesaver for my 400+ sessions. Not a full fix for the TUI picker, but a working solution today. Would love feedback if you try it.

  11. mskadu commented on Jul 22, 2026

    @mskadu
    Author

    This would really help everyone I am sure. @onurmicoogullari 's work seems to do to do the job

  12. onurmicoogullari commented on Jul 23, 2026

    @onurmicoogullari

    Sadly, it seems like it was closed by their bot…

  13. mskadu commented on Jul 23, 2026

    @mskadu
    Author

    At least this one isn't. The lack of this ability is a pain; hopefully it should go through. @kommander?

  14. stanleytejakusuma commented on Jul 24, 2026

    @stanleytejakusuma

    +1 with concrete evidence: ~20 child projects under one parent dir, sessions correctly rehomed into each, now undiscoverable from the parent without leaving the TUI. #33450 covers exactly this but sadly was auto-closed by the PR bot, without review. Requesting maintainer attention if possible.

  15. onurmicoogullari commented on Jul 24, 2026

    @onurmicoogullari

    I left a reopen request on #33450 with the recent community signal summarized.

    If this feature would help your workflow, please consider reacting/commenting on the PR itself too. The cleanup bot closed it based on positive reactions on the PR, not the issue.

  16. Drealise commented on Aug 5, 2026

    @Drealise

    just chiming in that I'm also missing this feature. cd-ing around is not the right way.
    This applies not only to the TUI, but the "web" and "Desktop" clients also.

  17. ZackarySantana commented on Aug 7, 2026

    @ZackarySantana

    I made an extension that adds a 2nd command to search and filter sessions across projects.

  18. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    In the OpenCode v2 TUI, the /sessions dialog can list sessions from every project. Press ctrl+a in the dialog to switch between all projects and the current directory; the choice is remembered. tabs.scope ("global" or "cwd") in tui.json sets the default.

    Added in 488445a.

    Closing as completed. If something doesn't work on v2, please open a new issue.

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