You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interactive TUI hangs in macOS temp directories due to /var vs /private/var path split #16607
Interactive opencode can hang when started from a macOS temp directory like /var/folders/.../T/tmp.*.
Steps to reproduce
Create a temp directory with mktemp -d
cd into that directory
Start interactive opencode
Submit a prompt
Actual behavior
The TUI accepts the prompt, but it never shows the thinking state and never returns an answer.
Expected behavior
The TUI should stream the normal thinking state and return a reply.
Root cause
On macOS, temp directories can be spelled as /var/... while Bun canonicalizes the actual cwd to /private/var/.... In interactive mode, one path was used for requests and the other for event streaming, so the UI and worker ended up talking to different directory identities.
Your issue is the macOS-specific variant of this same /var vs /private/var path split, which is also a symlink on macOS. The fix discussed in those issues (ensuring consistent path resolution between thread.ts and the worker) would likely resolve your case as well.
Thanks — this is a duplicate of the existing PWD vs process.cwd() path mismatch issues, especially #16528 and #16603. The macOS /var vs /private/var temp-dir case is the same underlying bug, so I'll close this duplicate and follow the existing tracking issues instead.
Activity
github-actions commentedon Mar 8, 2026
This issue might be a duplicate of existing issues. Please check:
PWDvsprocess.cwd()path mismatch introduced in v1.2.21)thread.tsusesprocess.env.PWDwhile the worker usesprocess.cwd(), creating two separate directory identities/homeis a symlink — identical root cause and analysisYour issue is the macOS-specific variant of this same
/varvs/private/varpath split, which is also a symlink on macOS. The fix discussed in those issues (ensuring consistent path resolution betweenthread.tsand the worker) would likely resolve your case as well.fredlahde commentedon Mar 8, 2026
Thanks — this is a duplicate of the existing PWD vs process.cwd() path mismatch issues, especially #16528 and #16603. The macOS /var vs /private/var temp-dir case is the same underlying bug, so I'll close this duplicate and follow the existing tracking issues instead.