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 — sessions: V1-migrated sessions are orphaned in the global project and hidden after upgrading to V2 · Issue #54640 · anomalyco/opencode

sessions: V1-migrated sessions are orphaned in the global project and hidden after upgrading to V2 #54640

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
sessions: V1-migrated sessions are orphaned in the global project and hidden after upgrading to V2#54640
Copy link
Labels
pending closetriaging

Description

@WilliamSantos96
WilliamSantos96
opened on Oct 11, 2026
Issue body actions

Summary

After upgrading from V1 (opencode-ai 1.19.0) to V2 (@opencode/cli 2.0.26), all historical sessions are missing from the TUI session list. They are not deleted — 94 sessions remain in the V2 database — but the V1 migration left them attached to the synthetic global project (canonical: "/", subpath: "Windows/System32"), which no real directory resolves to in V2. Since the session list is scoped to the current location's project, the sessions are unreachable from the normal list (/sessions, <leader>l) and can only be found via Ctrl+O.

Environment

  • opencode version: 2.0.26
  • OS: Windows 10.0.26200.9457 (win32 x64)
  • Terminal: Unavailable: terminal environment variables are not set
  • Shell: C:\WINDOWS\system32\cmd.exe
  • Install/channel: npm global, channel latest (@opencode/cli); migrating from npm [email protected]
  • Active plugins: None found in config (~/.config/opencode/opencode.jsonc only declares providers and MCP servers)

Reproduction

  1. On V1 (opencode-ai 1.19.0), use the TUI from a non-git directory (C:\Windows\System32) and create sessions. V1 stores them under the global project with subpath: "Windows/System32".
  2. Upgrade to V2 (@opencode/cli 2.0.26) and let the automatic V1 migration run to completion (GET /api/experimental/migration/v1 → {"status":"completed"}).
  3. Start the TUI from the same directory (C:\WINDOWS\system32) and open the session list.
  4. Only the newly created session appears; the 94 previous sessions are missing.

Expected Behavior

After migration, sessions previously associated with C:\Windows\System32 should be reachable from the TUI session list when working in that directory (V1 behavior preserved).

Actual Behavior

The migrated sessions stay attached to the global project (canonical: "/", subpath: "Windows/System32"). V2 now creates one project per directory, so C:\WINDOWS\system32 resolves to a brand-new project id, and the project-scoped session list shows none of the migrated sessions.

Evidence from GET /api/session?limit=5000:

  • 95 sessions total
  • 94 with projectID: "global" and subpath: "Windows/System32"
  • 1 in the new per-directory project

GET /api/project returns only global (canonical: "/"), the current directory project, and C:\Users\<user> — no project exists that the migrated sessions can match.

Secondary related issue: project identity and the directory filter are case-sensitive on Windows. Creating two sessions with location.directory set to C:\Windows\System32 and C:\WINDOWS\system32 produces two different project IDs (e.g. 76fb832b… vs 6dc551d8…) for the same physical directory, and GET /api/session?directory=... matches case-sensitively (one value returns the migrated sessions, the other returns none).

Additional Context

  • V1 migration status: GET /api/experimental/migration/v1 → {"status":"completed"}; all database migrations logged as completed.
  • Data is intact. As a recovery step, all 94 sessions were moved to the current directory project with POST /api/session/{id}/move and {"directory":"C:\\WINDOWS\\system32"}; they then appear in the list normally. This confirms the issue is purely the project assignment left behind by the migration, not data loss.
  • Workaround without mutating data: Ctrl+O ("Open recent sessions and projects") lists sessions across projects.
  • Logs: ~/.local/share/opencode/log/opencode.log.

Activity

  1. opencode-agent commented on Oct 11, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 11, 2026 – with OpenCode Agent
    Contributor
    More actions

    Thanks for the detailed report and for writing up the recovery steps. I think this is a duplicate of #49827. In both, V1 sessions from non-git directories stay attached to the global project after the V1→V2 migration, so V2's per-directory session list hides them. Others have confirmed it still happens on 2.0.26.

    Possible duplicates and closely related issues, ordered by likelihood:

    • migrate-v1: non-git sessions in "global" project hidden after V1→V2 upgrade #49827: same problem: non-git sessions in global are hidden after the V1→V2 upgrade
    • V1→V2 importer keeps project_id='global' for non-git directories, so migrated sessions never appear in the per-directory session picker #50551: the V1→V2 importer keeps project_id='global' for non-git directories
    • session: v1 "global" sessions stay unattributed after migration and are hidden from v2's session list #51176 / v2: V1 sessions in non-git directories invisible after migration (legacy catch-all project) #50800 / migration: v1 sessions imported under project 'global' are invisible in project session lists #50999 / cli: migrated v1 sessions from non-git dirs missing from session list #52919 / sessions: V1 sessions from non-git directories hidden from the project session list #53450: other reports of the same migration attribution problem
    • fix(core): attribute migrated V1 sessions to the project of their directory #51935 and fix(core): restore legacy sessions in markerless projects #54048: open PRs that propose fixes (reassigning sessions during migration, and adopting them when a non-git directory is opened)
    • Session list misses sessions when directory case differs on Windows #49556: your secondary point. The session directory filter and project identity are case-sensitive on Windows

    Until this is fixed, Ctrl+O or POST /api/session/{id}/move (as you did) work around it.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. opencode-agent
    added
    pending close
    triaging
    on Oct 11, 2026
  3. opencode-agent commented on Oct 12, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 12, 2026 – with OpenCode Agent
    Contributor
    More actions

    We haven't heard back, so I'm closing this as a duplicate of #49827. That issue tracks V1 sessions from non-git directories that stay under the global project after the V1→V2 migration and so don't show up in the session list. Please follow #49827 and the open fix PRs #51935 and #54048 for progress. #49556 tracks the Windows case-sensitivity problem you mentioned. Until it's fixed, Ctrl+O or POST /api/session/{id}/move still work as workarounds. If your problem turns out to be different, reply here and we can reopen.

  4. opencode-agent
    closed this as duplicateon Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending closetriaging

    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.