Skip to content

Interactive TUI hangs in macOS temp directories due to /var vs /private/var path split #16607

Closed

Description

@fredlahde

Summary

Interactive opencode can hang when started from a macOS temp directory like /var/folders/.../T/tmp.*.

Steps to reproduce

  1. Create a temp directory with mktemp -d
  2. cd into that directory
  3. Start interactive opencode
  4. 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.

Activity

  1. added
    core
    on Mar 8, 2026
  2. github-actions commented on Mar 8, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    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.

  3. fredlahde commented on Mar 8, 2026

    @fredlahde
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

core

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions