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 sessions under "global" project hidden after upgrading to 2.0 · Issue #56030 · anomalyco/opencode

sessions: V1 sessions under "global" project hidden after upgrading to 2.0 #56030

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
sessions: V1 sessions under "global" project hidden after upgrading to 2.0#56030
Copy link
Labels
pending closetriaging

Description

@diegofco99
diegofco99
opened on Oct 16, 2026
Issue body actions

Summary

After upgrading from OpenCode 1.x to 2.0.30, sessions created in V1 from the home directory no longer appear in the session list. The data is intact in the database, but it is filtered out because the home directory became its own project in V2.

Environment

  • opencode version: 2.0.30
  • OS: Linux 7.2.5-100.fc43.x86_64 (Fedora 43, x64)
  • Terminal: TERM=xterm-256color, COLORTERM=truecolor
  • Shell: /bin/bash
  • Install/channel: latest
  • Active plugins: None found in config

Reproduction

  1. Use OpenCode 1.x from ~ (not a git repo) and create several sessions. They are stored under project global.
  2. Upgrade to OpenCode 2.0.30.
  3. Run opencode (or opencode session list) from ~.

Expected Behavior

Previous sessions remain visible, as the migration guide states that supported V1 functionality should stay compatible.

Actual Behavior

Only sessions created after the upgrade are listed (2 in this case). opencode session list -n 500 from ~ returns just those.

Inspecting a copy of opencode.db:

  • session (V1 table): 100 rows; session_v2: 102 rows; no V1 session is missing in V2.
  • 54 sessions with directory='/home/admdiegofco' (Aug 7 to Oct 16) have project_id='global' (project worktree /).
  • Sessions created with V2 in the same directory have project_id='a23da999...' (project worktree /home/admdiegofco).
  • Sessions from real git projects (e.g. iac-crlnxend) keep their own project and are unaffected.

The list is scoped by project, so the 54 older sessions are hidden.

Additional Context

  • Frequency: consistent.
  • Workaround: manually UPDATE session/session_v2 SET project_id=<new project> WHERE project_id='global' AND directory='/home/admdiegofco' with the service stopped and a DB backup.
  • Suggested fix: on migration, reassign legacy global sessions to the project that now owns their directory, or include global sessions when listing for a directory that was previously global.

Activity

  1. opencode-agent commented on Oct 16, 2026

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

    Thanks for the detailed report and the DB analysis. I think this is a duplicate of #49827. After the V1→V2 migration, sessions that V1 created in non-git directories (like ~) stay on the legacy global project. V2 creates a separate project for that directory, and since the session list only shows the current project's sessions, those older sessions are hidden.

    Possible duplicates and closely related issues, ordered by likelihood:

    • migrate-v1: non-git sessions in "global" project hidden after V1→V2 upgrade #49827: the same problem: non-git V1 sessions left on global are hidden after upgrading (the main issue to follow; it also has a session move workaround and notes from other users)
    • session: v1 "global" sessions stay unattributed after migration and are hidden from v2's session list #51176: same root cause; fix(core): attribute migrated V1 sessions to the project of their directory #51935 is the open PR for it, and it reassigns migrated global sessions to the project that owns their directory, which is what you suggested
    • V1→V2 importer keeps project_id='global' for non-git directories, so migrated sessions never appear in the per-directory session picker #50551 / v2: V1 sessions in non-git directories invisible after migration (legacy catch-all project) #50800 / 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 root cause
    • v2: sessions with path=NULL (around v1's add_session_path schema change) are missing from project session lists #51144: a related case where sessions with path=NULL are missing from project session lists, which can also affect your manual UPDATE workaround

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. Feel free to add your numbers to #49827.

  2. opencode-agent
    added
    pending close
    triaging
    on Oct 16, 2026
  3. opencode-agent commented on Oct 17, 2026

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

    We haven't heard back, so I'm closing this as a duplicate of #49827. After the V1→V2 migration, sessions that V1 created in non-git directories (here ~) stay on the legacy global project, and V2 creates a new project for that directory, so the session list hides them. Your data is still in the database. Please follow #49827 for updates. #51935 is the open PR that would reassign those sessions to their directory's project. If your case turns out to be different, reply here and we can reopen.

  4. opencode-agent
    closed this as duplicateon Oct 17, 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.