[Bug] `code --wait` flag not blocking in shell command execution
Resolved 💬 2 comments Opened Mar 16, 2026 by ume-h0975 Closed Apr 14, 2026
Bug Description
Bug: code --wait doesn't wait when invoked via Claude Code
### Environment
- macOS (Darwin 25.3.0)
- Shell: zsh
- $EDITOR: "code --wait"
### Steps to reproduce
- Set
export EDITOR="code --wait" - In Claude Code, run: `!TMPFILE=$(mktemp) && echo "hello" > "$TMPFILE" && code --wait
"$TMPFILE" && cat "$TMPFILE"`
- VSCode opens the file, but
catexecutes immediately without waiting for the tab to
close
### Expected
code --wait should block until the file tab is closed (same as running directly in
terminal)
### Actual
The command does not wait — subsequent commands execute immediately.
This also affects Ctrl+G (chat:externalEditor), which returns empty content.
### Workaround
Using nano as $EDITOR works correctly.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.76
- Feedback ID: aec7220f-76e8-4a8b-80b0-a8c36042674a
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/umehara/.local/share/claude/versions/2.1.76 (expected in multi-process scenarios)\n at FvT (/$bunfs/root/src/entrypoints/cli.js:2417:2026)\n at Lxq (/$bunfs/root/src/entrypoints/cli.js:2417:1170)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-16T16:32:30.223Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗