[BUG] VS Code extension hangs on launch when project path contains a space (macOS)

Open 💬 0 comments Opened Jul 15, 2026 by DamiJJJ

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Claude Code VS Code extension hangs indefinitely ("infinite loading spinner")
when the opened project folder has a space in its path. It happens only for
that specific project — other projects (paths without spaces) launch fine, and
the claude CLI works correctly from the terminal in the exact same folder.

The extension logs stop at Launching Claude on channel: ... and never reach the
Spawning Claude with SDK query function... step. The earlier
Loading config cache by launching Claude (no channel)... line also never reports
completion. No error is surfaced — the panel just spins forever.

Renaming the project folder to remove the space immediately fixes it.

What Should Happen?

The extension should spawn the claude process and operate normally regardless of
spaces in the project path, matching the CLI behavior (which handles the path with
spaces correctly).

Error Messages/Logs

2026-07-15 13:59:15.072 [info] Received message from webview: {"type":"request","requestId":"t255sbn3lk","request":{"type":"init"}}
2026-07-15 13:59:15.699 [info] resolveShellPath: /bin/zsh -> 31 entries
2026-07-15 13:59:15.740 [info] Received message from webview: {"type":"request","requestId":"f8yziwskwh8","request":{"type":"get_claude_state"}}
2026-07-15 13:59:16.007 [info] Fetched 0 remote sessions
2026-07-15 13:59:16.047 [info] Fetched 0 remote sessions
2026-07-15 13:59:16.242 [info] Loading config cache by launching Claude (no channel)...
2026-07-15 13:59:18.174 [info] Received message from webview: {"type":"request","requestId":"mxcymiywkce","request":{"type":"init"}}
2026-07-15 13:59:18.211 [info] Received message from webview: {"type":"request","requestId":"p2dsilam06","request":{"type":"get_claude_state"}}
2026-07-15 13:59:18.228 [info] Received message from webview: {"type":"launch_claude","channelId":"a1hgcb2au4j","cwd":"/Users/<username>/Desktop/Pliki/Projekty wlasne/Homepage","permissionMode":"acceptEdits","thinkingLevel":"default_on"}
2026-07-15 13:59:18.230 [info] Launching Claude on channel: a1hgcb2au4j
<-- hangs here; no "Spawning Claude with SDK query function..." ever appears -->

Steps to Reproduce

  1. On macOS, create/open a project whose absolute path contains a space, e.g.

/Users/<username>/Desktop/Pliki/Projekty wlasne/Homepage

  1. Open that folder in VS Code and open the Claude Code panel
  2. Extension spins forever; logs stop after Launching Claude on channel
  3. In a terminal, cd into the same folder and run claude --debug → works fine
  4. Rename the folder (or any parent) to remove the space → extension launches normally

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.197 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

  • CLI (claude --debug) in the same directory works, so the issue is in how the

extension spawns the process with a space-containing cwd, not in the CLI itself.

  • Workaround: remove spaces from the project path (or any parent directory).

View original on GitHub ↗