Skip to content

[BUG]: Project selection is different between Desktop and Web #13518

Closed as not planned

Description

@jrmcpeek

Description

I am connected to a remote instance of opencode web, running on a virtual machine, accessible via http://localhost:4096.

I connect via a browser tab and away we go.

OpenCode Web Experience

If I click a "Recent Projects" entry, it loads the session and all is well.

If I click on the Projects button, I can search for folders/locations within the context of where opencode web is running, having visibility into repositories/code inside of this virtual machine.

When I select one, a new session is created and all is well.

OpenCode Desktop Experience

While trying the OpenCode Desktop application, I add the http://localhost:4096 server and set it as the default.

When opening the Desktop application, the list of "Recent Projects" is populated based on sessions within my virtual machine.

If I click a "Recent Projects" entry, it loads the session and all is well.

If I click on the Projects button, I am presented with a Gtk-based File Picker modal, but it is on my host machine, rather than in the context of the server I am connected to.

Expected OpenCode Desktop Experience

Generally, I would expect this to match the OpenCode Web experience, where project and project selection occur in context of the server I am connected to.

If the OpenCode Desktop application is launched and connected to the self-launched backend, then using the file picker for local files makes sense and would be in the context of the server it is connected to (for an enhanced, "native" experience.

Plugins

None

OpenCode version

1.1.65 ~ 1.2.10+

Steps to reproduce

  1. Create a virtual machine that can run opencode. This was tested with RHEL 10.1.
  2. Ensure firewall allows ingress on port 4096.
  3. Run opencode-cli --port 4096 --hostname 0.0.0.0 as the virtual machine user whose contents you wish to have access to.
  4. Connect to http://localhost:4096/ and verify that you can kick off sessions using the contents from within the virtual machine.
  5. Launch the Desktop application, connect to the server at http://localhost:4096/.
  6. Try to open a new project and verify that it opens a file picker modal, accessing the host filesystem for the current user rather than the filesystem in the virtual machine for the server-running user.

Screenshot and/or share link

No response

Operating System

Host: RHEL 9.6; Virtual Machine: RHEL 10.1

Terminal

gnome-shell, ptyxis

Activity

  1. github-actions commented on Feb 13, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of an existing issue. Please check:

    Both report the same root cause: the Desktop app's file picker opens on the host/local machine instead of the remote server context when connecting to a remote OpenCode instance (WSL, VM, or similar). This differs from the Web UI, which correctly searches/opens projects in the remote server's context.

    These may be related to or consolidated under the same fix.

  2. jrmcpeek commented on Feb 13, 2026

    @jrmcpeek
    Author

    Yes, these look related. Similar documented behavior.

    But the fix may not be as simple as merely checking whether the server is running on localhost or 127.0.0.1 - it may need a more nuanced approach, or configurability on a per-server basis (remove vs local).

  3. jrmcpeek commented on Feb 21, 2026

    @jrmcpeek
    Author

    Despite changes to localhost interactions in both 1.2.7 and 1.2.10, this issue still persists.

    Trying to start a new session only offers folder selection from the host running the desktop app and does not consider whether the desktop app is connected to an opencode web instance.

  4. camtheman256 commented on Mar 9, 2026

    @camtheman256

    A workaround for this is to edit your /etc/hosts file and add a line like

    127.0.0.1 remote-server
    

    Then you can connect to your remote server as remote-server:4096 even though it's just an alias for localhost. Opencode will think you're accessing a remote and give you the web-based filepicker as expected. Not a great workaround, but it does work.

  5. jrmcpeek commented on Mar 9, 2026

    @jrmcpeek
    Author

    Yup. I tested that and it worked for me.

    It also works if I give it the device's hostname instead of localhost, which was nicer than modifying the hosts file (for me).

  6. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    on May 3, 2026
  7. github-actions commented on Jul 3, 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