/editor opens a random temp file instead of current workspace file on macOS
Description
Running /editor opens an unrelated Markdown file from macOS temporary directories (e.g. /var/folders/.../T/*.md) instead of a file from the current workspace.
Each execution may open a different temp file.
I also tried setting $EDITOR to both vim and code --wait, but the behavior is the same.
OpenCode version
1.0.185
Steps to reproduce
- Launch opencode in a project workspace on macOS
- Run the
/editorcommand. - Observe that a random file from
/var/folders/.../T/is opened instead of a workspace file. - Repeat
/editor→ a different temp file may open.
Screenshot and/or share link
Operating System
macOS 15.6.1
Terminal
Ghostty
There are other editor-related issues in the repository that may have context relevant to this problem:
- #4834: Crash After Exiting Editor (editor crashes after exiting)
- #3359: opentui: open editor not working well (editor input issues)
While these aren't direct duplicates, they may share similar root causes. Feel free to cross-reference if needed.
/oc update tui so that /editor makes a file in cwd like /export does.
Also make sure that the file is cleaned up
Btw this is intentional behavior
i have the same issue, any help?
