[Bug] Cannot launch local text editor with spaces in application name

Resolved 💬 3 comments Opened May 8, 2026 by Sayvai Closed May 12, 2026

Bug Description
No longer able to open custom configured local text editor with space in application name (e.g. Sublime Text) on MacOS.

My current Claude Code settings.json is setup with the following environment variable(s):

"env": {
  "EDITOR": "/Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl --wait",
},

And when i use keyboard shortcut ctrl + g, Claude Code fails to open the prompt text or plan in the configured text editor with the following error message:

Couldn't open Sublime\ — ENOENT: no such file or directory, posix_spawn '/Applications/Sublime\' 

<img width="1774" height="616" alt="Image" src="https://github.com/user-attachments/assets/c8c9f504-eb25-48f2-b335-1d74baa64e4e" />

👉 As we can see from the error text, it appears to cut-off the full absolute configured path string now when it encounters an escaped space within the application name of the JSON settings.json EDITOR environment variable path string value, and hence is the likely root cause.

---

However, I am able to run the raw bash command in a new vanilla terminal tab like so:

/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl --wait

It is IMPORTANT to note that this was working for a long while until recent releases. So this is a RECENT regression.

---

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.133
  • Feedback ID: 86b515dc-66c0-460c-b542-42c75d7feb88

Errors

Couldn't open Sublime\ — ENOENT: no such file or directory, posix_spawn '/Applications/Sublime\' 

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗