pingdotgg / pingdotgg/t3code

[Bug]: Connecting to a remote OpenCode server through URL running on Linux from a Windows machine does not work

Open
#3,094 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
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
  1. Install OpenCode on a linux server and have it listen on port 4096
  2. Install t3 code on a Windows machine and configure it to connect to the OpenCode URL
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.