English | Turkish
Mobile-friendly wrapper for OpenCode serve.
It starts OpenCode, prints a LAN URL + QR code for your phone, and applies a narrow Windows session-history path fix without touching prompts, file contents, patches, or tool payloads.
Built for people who run OpenCode on a Windows PC and control it from a phone on the same network.
OpenCode already supports a client/server architecture. You can start a headless server and connect from a browser or another client.
On Windows, some Web UI session-history requests can miss existing sessions because the browser sends paths like:
C:/laragon/www/project
while saved OpenCode sessions may use:
C:\laragon\www\project
oc-fix runs as a tiny local proxy and normalizes only the affected directory query parameter for session-list requests.
oc-fix servestartsopencode serveand a proxy in one command.- Prints a phone URL and terminal QR code.
- Keeps OpenCode backend on
4096, proxy on4097by default. - Supports WebSocket/SSE traffic through
http-proxy. - Fixes Windows session history path mismatch in a narrow, safe way.
- Adds a small
C:/laragon/www/quick-fill button to the Open Project modal. - Does not modify the OpenCode database.
- Does not patch OpenCode binaries.
- Does not modify model prompts, code output, file contents, or request bodies.
git clone https://github.com/fitzgpt/opencode-serve-mobile-fix.git
cd opencode-serve-mobile-fix
install.batgit clone https://github.com/fitzgpt/opencode-serve-mobile-fix.git
cd opencode-serve-mobile-fix
chmod +x install.sh
./install.shoc-fix serveThen scan the QR code or open the printed phone URL:
http://YOUR_PC_IP:4097
oc-fix --proxy-port 5001 serve --port 5000This runs:
- OpenCode backend:
127.0.0.1:5000 - Mobile proxy:
0.0.0.0:5001
OpenCode warns when OPENCODE_SERVER_PASSWORD is not set. For shared networks, set a password before starting:
$env:OPENCODE_SERVER_PASSWORD="your-strong-password"
oc-fix serveBasic auth username defaults to opencode unless you set OPENCODE_SERVER_USERNAME.
Only this narrow case:
GET /session?directory=C:/...
GET /api/session?directory=C:/...
Only the directory query parameter is rewritten from / to \.
Everything else passes through untouched.
This is a community utility. It is not built by, endorsed by, or affiliated with the OpenCode team.