Skip to content

Sessions from other worktrees of the same project are no longer visible after upgrade #23594

Closed as not planned

Description

@laozhoulaile

Description

Sessions created in other git worktrees of the same repository are no longer visible when running opencode from a different worktree. This worked before upgrading to v1.14.19 (previous 1.2.25).

Steps to Reproduce

  1. Have a git repo with multiple worktrees (e.g. C:\Work\fireyes as main, C:\Work\fireyes-workflows as a worktree)
  2. Create sessions in the main worktree directory
  3. Open opencode from the worktree directory
  4. Sessions list only shows sessions created in the current worktree directory(empty at the beginning actually), not the ones from the main repo or other worktrees

Expected Behavior

Since all worktrees share the same project_id (computed from git rev-list --max-parents=0 HEAD), all sessions belonging to the same project should be visible regardless of which worktree directory they were created in. The sandboxes column in the project table already tracks all worktree directories, indicating the design intent is for them to be part of the same project.

Actual Behavior

Only sessions matching the current working directory are shown. This appears to be a regression — likely the session listing now filters by directory (sandbox path) in addition to project_id, whereas previously it only filtered by project_id.

Evidence

Database query shows all sessions are correctly stored under the same project_id:
project_id: bcda27203b3ed9289ac01b7a2b20baf7c2faed00
worktree: C:\Work\fireyes
sandboxes: ["C:\Work\fireyes-ptr-pos-trading-features","C:\Work\fireyes-workflows"]

Sessions by directory:
C:\Work\fireyes → 53 sessions
C:\Work\fireyes-analysis-fund-share → 8 sessions
C:\Work\fireyes-workflows → 2 sessions ← only these are visible
... (other worktree dirs)

When running opencode from C:\Work\fireyes-workflows, only the 2 sessions with directory=C:\Work\fireyes-workflows are shown, while the other 53+ sessions from the same project are hidden.

Environment

  • opencode v1.14.19 (upgrade from v1.2.25)
  • Windows (PowerShell)
  • Git worktrees

Plugins

No response

OpenCode version

v1.14.19

Steps to reproduce

No response

Screenshot and/or share link

Image Image

Operating System

Windows 11

Terminal

Powershell

Activity

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

    @github-actions
    Contributor

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

    If your issue is distinct, please add details explaining how it differs.

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