Skip to content

TUI referencing local directory when using attach --dir to connect to a remote server. #5380

@jeremytondo

Description

@jeremytondo

Description

I'm testing out a setup where I have the opencode server running on my remote workstation while attaching to it running the TUI on my local Mac laptop (this is an incredible feature btw).

When running opencode attach <url> --dir ~/path/to/project/ it attempts to use a directory on the local machine instead of the remote machine. I'm not sure if this is the intended behavior or not, but I was assuming the server would be the source of truth and look for directories there.

OpenCode version

1.0.146 (both client and server)

Steps to reproduce

  1. Start the server on a remote machine opencode serve --hostname 0.0.0.0
  2. On the local machine attach using the --dir flag opencode attach <url> --dir ~/path/to/project/

Current behavior
Tries to connect to a directory on the local machine.

Expected behavior
TUI opens using the project located at the --dir path on the remote server.

Screenshot and/or share link

No response

Operating System

Remote Host: Arch Linux, Local: MacOS 26.1

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions