[Bug]: Connecting to a remote OpenCode server through URL running on Linux from a Windows machine does not work
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Install OpenCode on a linux server and have it listen on port 4096
- Install t3 code on a Windows machine and configure it to connect to the OpenCode URL
- It will fail to connect (and pull the models) and state that you should check the server logs.
The server logs shows this:
[23:07:18.869] ERROR (#11137): failed {
ref: "err_7e9f8938",
error: "Failed to init file picker: Invalid path /var/log/C:\\Users\\xxx",
cause: "Error: Failed to init file picker: Invalid path /var/log/C:\\Users\\xxx\n at KU (/$bunfs/root/chunk-mgzsm123.js:12:2852)",
}
It's obvious that the local windows path is being sent to the server and the server tries to use that for logging for some reason. I recommend NOT sending the local path when connecting to a remote server as the local path is completely irrelevant when controlling a remote server.
Expected behavior
That t3 code successfully connects to opencode and pulls the available models.
Actual behavior
t3 code fails to pull the models, because it incorrectly sends the current windows path to the remote server.
Impact
Blocks work completely
Version or commit
main
Environment
No response
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/desktop by reproducing the connection from a Windows machine to an OpenCode server on Linux listening on port 4096, then inspect the request setup associated with the server log error. Done means the remote server no longer receives the local Windows path and t3 code successfully connects and pulls the available models.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, typescript
- Domain
- desktop, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100