Skip to content

Web: projects/sessions disappear when accessing same server via LAN or Tailscale IP instead of localhost #28340

Closed as not planned

Description

@huy-victor

Description

Description

When using the OpenCode web UI from different origins that point to the same OpenCode server, the project/session list is not shared.

For example:

  • http://localhost:4096 shows my project and conversations.
  • http://<lan-ip>:4096 or http://<tailscale-ip>:4096 connects to the same server, but the project list appears empty or different.
  • If I manually paste the encoded project route after the IP URL, the project opens and the sessions are available.

So the backend can serve the sessions correctly, but the web UI does not remember/discover the same project when the hostname changes.

Environment

  • OpenCode version: 1.15.5
  • Host OS: Windows
  • Web access modes tested:
    • http://localhost:4096
    • http://127.0.0.1:4096
    • http://<lan-ip>:4096
    • http://<tailscale-ip>:4096
  • Use case: one host machine running OpenCode, accessed from multiple devices over LAN/Tailscale.

Steps to reproduce

  1. Run OpenCode web on a host machine.
  2. Open http://localhost:4096 on the host.
  3. Open a project and create or view a session.
  4. From another device, open http://<lan-ip>:4096 or http://<tailscale-ip>:4096.
  5. Check the recent projects/session list.

Actual behavior

The remote URL connects to the OpenCode server, but the project/session list is empty or does not match what is shown on localhost.

If the encoded project route is manually pasted after the IP URL, the project/session page loads, which suggests the backend data is available.

Expected behavior

If different origins point to the same OpenCode server, the web UI should be able to show/open the same project list, or at least preserve a server/project alias so LAN/Tailscale access works predictably.

For cross-device web usage, changing from localhost to a LAN/Tailscale hostname should not make the user think their projects or sessions disappeared.

Suspected root cause

The web app appears to store project state per server key in browser localStorage.

From the current source:

  • packages/app/src/context/server.tsx
  • projectsKey() maps sidecar, localhost, and 127.0.0.1 to local.
  • isLocalHost() only treats localhost and 127.0.0.1 as local.
  • Other hostnames/IPs such as 192.168.x.x or Tailscale IPs become separate keys.

That means the same OpenCode backend gets separate project registries depending on whether the user opens it through:

  • localhost
  • LAN IP
  • Tailscale IP
  • another hostname

Local workaround tested

I added a small local proxy that seeds the same project entry into the web app's localStorage for multiple server keys:

  • local
  • location.origin
  • location.host
  • location.hostname

After doing that, opening the same OpenCode server through LAN/Tailscale shows the expected project/session list.

Suggested fix

Possible approaches:

  • Add a first-class server alias/project registry mechanism for the web UI.
  • Let users pin a project to a remote server URL and keep it visible across equivalent origins.
  • Store project discovery server-side instead of only per-browser/per-origin localStorage.
  • Improve projectsKey() normalization for same-server web access scenarios.
  • Provide a documented way to configure the public base URL or canonical server key for LAN/Tailscale usage.

Notes

This matters for users running OpenCode web on one machine and accessing it from multiple devices over LAN or Tailscale. OpenCode has strong potential for cross-device usage, but this behavior makes remote access feel like sessions disappeared even though the backend still has them.

Plugins

opencode-gemini-auth@latest @whisperopencode/push @tarquinen/opencode-smart-title

OpenCode version

1.15.5

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows

Terminal

No response

Activity

  1. vincentmac commented on May 21, 2026

    @vincentmac

    I'm seeing this issue too after updating to v1.15.6

  2. chris-sanders commented on May 21, 2026

    @chris-sanders

    Just upgraded to 1.15.6 bug seems to apply to worktrees too, the server is useless with this release' new UI and lack of sessions

  3. vincentmac commented on May 21, 2026

    @vincentmac

    I'm seeing this issue too after updating to v1.15.6

    Updating to v1.15.7 fixed this issue for me. I can now see my other sessions on mobile now

  4. github-actions commented on Jul 21, 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