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 — Migrated non-git sessions stay under project_id 'global', so the V2 TUI shows 0 sessions while the desktop app lists them · Issue #56760 · anomalyco/opencode

Migrated non-git sessions stay under project_id 'global', so the V2 TUI shows 0 sessions while the desktop app lists them #56760

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
Migrated non-git sessions stay under project_id 'global', so the V2 TUI shows 0 sessions while the desktop app lists them#56760
Copy link
Labels
pending closetriaging

Description

@jimicze
jimicze
opened on Oct 18, 2026
Issue body actions

Description

After upgrading to V2, the history migration ran and copied ~5,241 sessions, but sessions from non-git directories keep the V1 project_id = 'global'. V2 creates a new project id for the directory and the TUI scopes the session list to it, so the TUI shows 0 sessions while the desktop app still lists the same sessions.

Evidence for /Users/lasakondrej/Projects/opencode-test (not a git repo, DB ~/.local/share/opencode/opencode.db). The desktop app shows this project as Opencode-test, but that is only a display alias for the same lowercase project — it is a single project, not two.

  • Rows were copied: session (V1) = session_v2 (V2) = 5,241 rows.
  • Sessions for this project: 30, all with project_id = 'global'.
  • A project row c98ce85216d0... for /Users/lasakondrej/Projects/opencode-test was created at 2026-10-18 12:38:22 (first V2 run) and has 0 sessions.
  • SELECT count(*) FROM session_v2 WHERE project_id LIKE 'c98ce852%' → 0.
  • Total sessions under project_id = 'global': 1,071 (all non-git directories), so this affects more than one project.

So the rows migrated, but the project association did not: V1 sessions stay on 'global' while V2 resolves a new per-directory project id and lists by it.

TUI vs desktop app (same machine, same database):

TUI (V2) Desktop app (1.19.3)
TUI: No sessions available Desktop app: sessions listed

Opening the TUI in this project shows 0 sessions; the desktop app lists them.

Steps to reproduce

  1. Use V1 in a non-git project directory (sessions are stored with project_id = 'global').
  2. Install/open V2. Migration runs and copies the sessions into session_v2.
  3. Open the same project in the V2 TUI and list sessions → "No sessions available".
  4. Open the desktop app (1.19.3) → the same sessions are listed.

Expected behavior

Migrated sessions are visible in the V2 TUI, or the TUI falls back to sessions matching the directory when the resolved project has none.

Actual behavior

TUI shows 0 sessions; the desktop app shows them, so history looks lost in the TUI.

Suggested fix

During migration, reassign V1 sessions whose project_id = 'global' to the per-directory project created in V2 (or make the TUI fall back to directory matches when the resolved project has no sessions).

Plugins

@jimicze-opencode/opencode-tps, superpowers

OpenCode version

CLI v2.0.32 (Homebrew) · Desktop app 1.19.3

Operating System

macOS 15.2 (24C101)

Terminal

Terminal.app / opencode TUI

Activity

  1. opencode-agent commented on Oct 18, 2026

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

    Thanks for the detailed report and the DB evidence. I think this is a duplicate of #49827. In both, the V1→V2 migration leaves sessions from non-git directories under project_id = 'global', while V2 creates a new project for the directory and lists sessions by that project, so the TUI shows none of them.

    Possible duplicates and related issues, most likely first:

    • migrate-v1: non-git sessions in "global" project hidden after V1→V2 upgrade #49827: the same problem (non-git sessions stay in the global project and are hidden in the TUI after upgrading), with confirmations up to v2.0.28
    • 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, so the sessions never appear in the per-directory picker
    • session: v1 "global" sessions stay unattributed after migration and are hidden from v2's session list #51176: V1 global sessions stay unattributed after migration and are hidden from V2's session list
    • 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: the same symptom reported on other versions and platforms
    • Open fix PRs: fix(core): attribute V1 global sessions during import #56322, fix(core): attribute migrated V1 sessions to the project of their directory #51935 and fix(core): restore legacy sessions in markerless projects #54048

    If you have new details, adding them to #49827 would help, for example that this still happens on 2.0.32.

    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 18, 2026
  3. jimicze commented on Oct 18, 2026

    @jimicze
    jimicze
    on Oct 18, 2026
    Author
    More actions

    @opencode-agent agreed — this is the same root cause as #49827, so I won't claim it's different. New details worth adding there:

    • Still reproduces on v2.0.32 (CLI) with desktop app 1.19.3, macOS 15.2, on 2026-10-18.
    • Both tables have the same row count (session = session_v2 = 5,241), so the rows were copied but the project link was not.
    • The per-directory project row (c98ce852…) is created on the first V2 run with 0 sessions (SELECT count(*) FROM session_v2 WHERE project_id LIKE 'c98ce852%' → 0), while 1,071 sessions remain under project_id = 'global'.
    • Cross-client symptom on the same DB: the v1 desktop app still lists those sessions, the V2 TUI shows 0.

    Happy for you to close this as a duplicate — I can move the details above into #49827 if that's helpful. A directory fallback when the resolved project has no sessions would fix the symptom without touching the migration.

  4. opencode-agent commented on Oct 18, 2026

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

    Thanks for confirming, and for the extra details. Yes, please add them to #49827. Your data points are useful there: it still happens on v2.0.32, session and session_v2 have the same row count, the new per-directory project has 0 sessions while 1,071 stay under global, and the v1 desktop app vs V2 TUI difference on the same database. Your suggestion to fall back to directory matching fits well there too. Some of the open PRs take that kind of runtime approach (#54048), and others fix the migration itself (#56322, #51935).

    This issue will still be closed as a duplicate of #49827 at the time noted earlier.

  5. jimicze commented on Oct 18, 2026

    @jimicze
    jimicze
    on Oct 18, 2026
    Author
    More actions

    @opencode-agent done — added the data points to #49827 (v2.0.32 confirmation, equal row counts, the new per-directory project at 0 sessions vs 1,071 under global, and the v1 desktop app vs V2 TUI difference), plus the screenshots. Fine to close this one as a duplicate.

  6. jimicze
    closed this as a duplicateof migrate-v1: non-git sessions in "global" project hidden after V1→V2 upgrade #49827 on Oct 18, 2026
  7. opencode-agent commented on Oct 18, 2026

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

    Thanks for moving the details and screenshots to #49827. Follow that issue for updates. This one will be closed as its duplicate at the scheduled time.

  8. opencode-agent commented on Oct 19, 2026

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

    Closing this as a duplicate of #49827, as agreed. Thanks for moving your v2.0.32 details and screenshots there. Please follow #49827 and the open fix PRs (#56322, #51935, #54048) for progress on migrated non-git sessions staying under global.

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.