Skip to content

[BUG]: Two remote servers with same directory path show identical session list in sidebar #17451

Closed

Description

@ysm-dev

Description

When connecting to two different remote servers (e.g. server A and server B) that both have the same project path (e.g. ~/abc), the desktop app sidebar shows the same session list for both. Switching between servers does not refresh the sessions — they appear identical even though each server has its own independent sessions.

Root cause: the app uses the raw directory string as the sole key for workspace/session state throughout the frontend. There is no server identity component in the key, so server-A:~/abc and server-B:~/abc resolve to the same client-side state bucket.

Affected code (all in packages/app/src):

  • context/global-sync.tsx — sdkCache, booting, sessionLoads, sessionMeta maps are all keyed by bare directory
  • context/global-sync/child-store.ts — children, vcsCache, metaCache, iconCache, lifecycle/pins all keyed by bare directory
  • utils/persist.ts — Persist.workspace() and workspaceStorage() derive storage names from path only (no server component)
  • context/server.tsx — projectsKey() collapses all localhost-backed servers to "local", so proxy-based remotes share the same sidebar project namespace

The server-side code is not at fault — it correctly scopes sessions by project ID and workspace context per request.

Steps to reproduce

  1. Set up two separate remote opencode servers (server A, server B) each with a project at the same path, e.g. ~/abc
  2. Open the desktop app and add both servers
  3. Create some sessions on server A's ~/abc
  4. Create different sessions on server B's ~/abc
  5. Switch between servers in the desktop app
  6. Observe the sidebar shows the same session list for both

Screenshot and/or share link

N/A

Operating System

macOS (desktop app, reproducible on any OS)

Terminal

N/A (desktop app)

Activity

  1. added a commit that references this issue on Mar 14, 2026
    a04bde0
  2. krodak commented on Mar 17, 2026

    @krodak

    This hit me as well, breaks UI app on macOS almost completely for both local and server usecase

  3. removed
    webRelates to opencode on web / desktop
    on May 3, 2026
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