GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — session list is showing all sessions not only the ones scopes to the curent dir · Issue #8836 · anomalyco/opencode

session list is showing all sessions not only the ones scopes to the curent dir #8836

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
session list is showing all sessions not only the ones scopes to the curent dir#8836
Copy link
Assignees
rekram1-node

Description

@luisrudge
luisrudge
opened on Jan 16, 2026
Issue body actions

Description

see title

Plugins

opencode-anthropic-auth, @franlol/opencode-md-table-formatter

OpenCode version

1.1.23

Steps to reproduce

open opencode anywhere and type /sessions
it should load only sessions from that directory, but lists all my sessions

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Reacted by Salomon Popp, benedikt-bartscher, kdh8219, itsahedge, Bartosz Petryński, Vyom Yadav, drsmile1001, Albert Ragány-Németh, Dag Andersen, Chung-Chiang Cheng and 3 more

Activity

  1. luisrudge
    added
    bugSomething isn't working
    on Jan 16, 2026
  2. github-actions
    assigned
    rekram1-node
    on Jan 16, 2026
  3. github-actions commented on Jan 16, 2026

    @github-actions
    github-actionsBot
    on Jan 16, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • The sessions list seems to show all history, not the sessions history of the working directory #6098: The sessions list seems to show all history, not the sessions history of the working directory
    • Sessions are now mixed with home directory session list, disregarding which directory you're in #3551: Sessions are now mixed with home directory session list, disregarding which directory you're in
    • Sessions not displayed in /session for specific project path despite being written to storage #7186: Sessions not displayed in /session for specific project path despite being written to storage

    Feel free to ignore if none of these address your specific case.

  4. shoaibansari5398
    added a commit that references this issue on Jan 16, 2026

    fix(tui): scope session list to current directory (anomalyco#8836)

    93c1b86
  5. allisoneer commented on Jan 21, 2026

    @allisoneer
    allisoneer
    on Jan 21, 2026
    More actions

    This is from Claude:

    I've done some research on this issue and wanted to share findings on the existing PRs and a potentially more complete approach.

    Existing PR Analysis

    PR #8886 (client-side filtering in dialog only):

    • Only filters the session list dialog UI display
    • Does NOT filter the bootstrap session list fetch (initial load still fetches all sessions)
    • Does NOT filter real-time session.updated events (cross-directory sessions can still appear via SSE)
    • Does NOT filter session search results
    • Result: Sessions from other directories can still leak through via bootstrap, search, or real-time events

    PR #6724 (server-side default filtering):

    • Changes Session.list() default behavior for ALL clients (web UI, API consumers, CLI)
    • Requires new --all flag and ?all=true query param for opt-out
    • More invasive change that affects the API contract
    • Web UI and other consumers may want cross-directory visibility by default

    Proposed Alternative: TUI-only, use existing API

    The API already supports GET /session?directory=<path> (exact match filter) - it's just never wired up in the TUI. A more complete TUI-only fix would:

    1. Pass directory param to bootstrap session.list call in sync.tsx
    2. Pass directory param to session search in dialog-session-list.tsx
    3. Filter session.updated real-time events by directory (early break if mismatch)
    4. Pass directory: cwd to tui() call for SDK context

    Why this approach?

    • Uses existing API infrastructure (no server changes, no new flags)
    • Filters ALL entry points: bootstrap, search, AND real-time events
    • No behavior change for web UI or other API consumers
    • Purely additive - doesn't change any defaults or require opt-out mechanisms

    Known limitation: Uses exact directory match (existing API behavior). Sessions created from a subdirectory won't appear when TUI is launched from repo root. This is acceptable for the worktree use case and could be improved later with prefix matching if needed.

    I have a working implementation of this approach and happy to submit a PR if maintainers prefer this direction over the existing PRs.

  6. rekram1-node commented on Jan 21, 2026

    @rekram1-node
    rekram1-node
    on Jan 21, 2026
    Member
    More actions

    Is this a git project? because in git projects it is scoped, everything else is global

  7. allisoneer commented on Feb 5, 2026

    @allisoneer
    allisoneer
    on Feb 5, 2026
    More actions

    Is this a git project? because in git projects it is scoped, everything else is global

    It is a git project! I want scoped to each worktree in that git project instead of just scoped to the git project as a whole.

  8. alexprudhomme commented on Feb 5, 2026

    @alexprudhomme
    alexprudhomme
    on Feb 5, 2026
    More actions

    I have the same issue when working with worktrees. When using the --continue flag, it resumes the last session in whatever worktree. Ideally it would resume the session in that particular worktree.

    Reacted by Manish Kumar ⛄ and Jacob Daitzman
  9. alexprudhomme commented on Feb 5, 2026

    @alexprudhomme
    alexprudhomme
    on Feb 5, 2026
    More actions

    Is this a git project? because in git projects it is scoped, everything else is global

    Hi @rekram1-node, I am having the same issue because of git worktrees. I am available to work on this if you can provide some instructions regarding where the fix should be. Should the fix be on the server and affect all clients or should this be a fix only for the TUI ? Let me know and I can provide a PR.

  10. ejj commented on Mar 17, 2026

    @ejj
    ejj
    on Mar 17, 2026
    More actions

    Would there be any interest in PRs to make the scoping configurable? In my use case at least, I want a separate session list per worktree rather than a global one for the entire git repo. I tend to use a worktree to contain a particular thread of work so scoping them that way is much more clear for my workflow. I'm sure others might want it directory scoped or have other ideas.

    Happy to file an issue and a PR if that sounds desirable more broadly.

    Reacted by Jacob Daitzman
    Reacted by Jacob Daitzman
  11. luisrudge commented on Mar 17, 2026

    @luisrudge
    luisrudge
    on Mar 17, 2026 via email
    Author
    More actions
    Yeah. I’m using lots of work trees now and having a single session list is not ideal.
    …
    On Tue, Mar 17, 2026 at 1:29 PM Ethan J. Jackson ***@***.***> wrote: *ejj* left a comment (anomalyco/opencode#8836) <#8836 (comment)> Would there be any interest in PRs to make the scoping configurable? In my use case at least, I want a separate session list *per worktree* rather than a global one for the entire git repo. I tend to use a worktree to contain a particular thread of work so scoping them that way is much more clear for my workflow. I'm sure others might want it directory scoped or have other ideas. Happy to file an issue and a PR if that sounds desirable more broadly. — Reply to this email directly, view it on GitHub <#8836 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHFYE5BNLG2WGQJSDJBPZL4RGRRBAVCNFSM6AAAAACR4MI7QCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DANZXGQ4TENBZHA> . You are receiving this because you authored the thread.Message ID: ***@***.***>
    Reacted by Jacob Daitzman and drsmile1001
  12. marcodiniz commented on Mar 19, 2026

    @marcodiniz
    marcodiniz
    on Mar 19, 2026
    More actions

    Also an issue for me. If at least it could show the working dir for the session in the session list, what would help

  13. madisonbullard
    added a commit that references this issue on Mar 26, 2026

    fix: resolve unique project IDs for git submodules

    This issue will close once commit 20d96a4 is merged into the 'dev' branch.
    20d96a4
  14. thdxr
    removed
    bugSomething isn't working
    on May 3, 2026
  15. rodrigojimenezdencker commented on May 22, 2026

    @rodrigojimenezdencker
    rodrigojimenezdencker
    on May 22, 2026
    More actions

    Adding a current reproduction from OpenCode 1.15.9 because this still affects the new OPENCODE_EXPERIMENTAL=1 + /warp worktree workflow.

    Steps:

    1. Launch OpenCode in a git repo with multiple worktrees/workspaces.
    2. Use /warp to switch between worktrees.
    3. Open /sessions from each worktree.

    Actual: sessions from all worktrees for the same git project are mixed together.

    Expected: the TUI defaults to sessions for the current workspace/worktree, with a visible "show all" escape hatch or filter indicator so users do not think sessions disappeared.

    Why this matters: a worktree is usually one isolated thread of work. Mixing sessions across worktrees defeats the main reason to use /warp in the terminal, especially now that the web UI already makes workspace-specific sessions feel separate.

    The existing API/schema looks like it has enough metadata to support this without changing project identity: sessions expose directory and workspaceID, and session list endpoints accept workspace/path-style filters. So the useful fix seems to be TUI scoping/UX rather than changing projectID.

    Reacted by Allison Durham and Kiril Zyapkov
  16. github-actions commented on Jul 22, 2026

    @github-actions
    github-actionsBot
    on Jul 22, 2026 – with GitHub Actions
    Contributor
    More actions

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

  17. github-actions
    closed this as not plannedon Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.