/editor opens a random temp file instead of current workspace file on macOS #3783

Open
opened 2026-02-16 17:41:27 -05:00 by yindo · 5 comments
Owner

Originally created by @m0n99 on GitHub (Dec 23, 2025).

Originally assigned to: @rekram1-node on GitHub.

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

  1. Launch opencode in a project workspace on macOS
  2. Run the /editor command.
  3. Observe that a random file from /var/folders/.../T/ is opened instead of a workspace file.
  4. Repeat /editor → a different temp file may open.

Screenshot and/or share link

Image Image

Operating System

macOS 15.6.1

Terminal

Ghostty

Originally created by @m0n99 on GitHub (Dec 23, 2025). Originally assigned to: @rekram1-node on GitHub. ### 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 1. Launch opencode in a project workspace on macOS 2. Run the `/editor` command. 3. Observe that a random file from `/var/folders/.../T/` is opened instead of a workspace file. 4. Repeat `/editor` → a different temp file may open. ### Screenshot and/or share link <img width="696" height="64" alt="Image" src="https://github.com/user-attachments/assets/9279bc67-8a5c-49dc-b759-3fb2092f07c3" /> <img width="258" height="73" alt="Image" src="https://github.com/user-attachments/assets/f441296e-cfee-4a57-a1ba-9b691eb4d0c1" /> ### Operating System macOS 15.6.1 ### Terminal Ghostty
Author
Owner

@github-actions[bot] commented on GitHub (Dec 23, 2025):

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.

@github-actions[bot] commented on GitHub (Dec 23, 2025): 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.
Author
Owner

@rekram1-node commented on GitHub (Dec 23, 2025):

/oc update tui so that /editor makes a file in cwd like /export does.

Also make sure that the file is cleaned up

@rekram1-node commented on GitHub (Dec 23, 2025): /oc update tui so that /editor makes a file in cwd like /export does. Also make sure that the file is cleaned up
Author
Owner

@opencode-agent[bot] commented on GitHub (Dec 23, 2025):

Created PR #6059

New%20session%20-%202025-12-23T20%3A13%3A35.026Z
opencode session  |  github run

@opencode-agent[bot] commented on GitHub (Dec 23, 2025): Created PR #6059 <a href="https://opencode.ai/s/GuAlqgLy"><img width="200" alt="New%20session%20-%202025-12-23T20%3A13%3A35.026Z" src="https://social-cards.sst.dev/opencode-share/TmV3IHNlc3Npb24gLSAyMDI1LTEyLTIzVDIwOjEzOjM1LjAyNlo=.png?model=opencode/claude-opus-4-5&version=1.0.193&id=GuAlqgLy" /></a> [opencode session](https://opencode.ai/s/GuAlqgLy)&nbsp;&nbsp;|&nbsp;&nbsp;[github run](/sst/opencode/actions/runs/20470591164)
Author
Owner

@rekram1-node commented on GitHub (Dec 23, 2025):

Btw this is intentional behavior

@rekram1-node commented on GitHub (Dec 23, 2025): Btw this is intentional behavior
Author
Owner

@WhateverMO commented on GitHub (Feb 7, 2026):

i have the same issue, any help?

@WhateverMO commented on GitHub (Feb 7, 2026): i have the same issue, any help?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3783