-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Open
Labels
opentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Description
Description
When using opencode attach from a subdirectory of the server's workspace, file references using @ syntax cause the client's relative path to be duplicated in the final resolved path.
Steps to reproduce
-
Start the server from a parent directory:
cd ~/Development opencode serve --port 9999
-
From another terminal, navigate to a subdirectory and attach:
cd ~/Development/saturdays opencode attach http://localhost:9999
-
Reference a file using
@that exists in~/Development/saturdays/docs/:@docs/report.md -
Server throws ENOENT with a duplicated path:
ENOENT: no such file or directory, stat '/Users/an/Development/saturdays/saturdays/docs/report.md'
Expected behavior
The file should be resolved to:
/Users/an/Development/saturdays/docs/report.md
Actual behavior
The path becomes:
/Users/an/Development/saturdays/saturdays/docs/report.md
The subdirectory saturdays appears twice - once from the client's cwd context and once from the path resolution.
Environment
- OpenCode version: 1.0.126
- OS: macOS
- Server location:
~/Development(viaopencode serve --port 9999) - Client attach location:
~/Development/saturdays(viaopencode attach http://localhost:9999)
Metadata
Metadata
Assignees
Labels
opentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui