From d1fd8d48b9efba55bb1419fd2a2b7d8274d4c741 Mon Sep 17 00:00:00 2001 From: Cristian Miranda Date: Sat, 7 Mar 2026 19:59:52 -0300 Subject: [PATCH] fix: resolve TUI blank response when launched from symlinked directory The worker used process.cwd() to start the event stream, which resolves symlinks to the physical path. The main thread uses process.env.PWD, which preserves the symlink path. This mismatch created two separate Instance/Bus scopes, so SSE events never reached the TUI store. Use process.env.PWD in the worker to match the main thread behavior. Fixes #16528 --- packages/opencode/src/cli/cmd/tui/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/cli/cmd/tui/worker.ts b/packages/opencode/src/cli/cmd/tui/worker.ts index 4452d6d764aa..82404d621faf 100644 --- a/packages/opencode/src/cli/cmd/tui/worker.ts +++ b/packages/opencode/src/cli/cmd/tui/worker.ts @@ -95,7 +95,7 @@ const startEventStream = (directory: string) => { }) } -startEventStream(process.cwd()) +startEventStream(process.env.PWD ?? process.cwd()) export const rpc = { async fetch(input: { url: string; method: string; headers: Record; body?: string }) {