[BUG] Desktop app terminal: "Failed to spawn shell", pty-host spawn path is empty

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 27, 2026

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?

Every new tab in the Terminal pane fails immediately with "Failed to spawn
shell". The pane is unusable; no shell ever starts.

main.log shows the spawn attempted with an empty path — there is nothing
after the colon.

This is the same signature as #54020, which was auto-closed as stale
without a fix or a workaround. Still reproduces on Claude Code 2.1.220 with
desktop app 1.24012.9.0 installed via winget (MSIX). Related: #41546, #51886.

Environment:

  • Windows 11 Pro, 10.0.26200
  • Claude Code 2.1.220, at C:\Users\[username]\.local\bin\claude.exe
  • Desktop app 1.24012.9.0, installed via winget; %LOCALAPPDATA%\AnthropicClaude

contains only Update.exe, so the app payload is the MSIX package

Already ruled out:

  • cmd.exe present, COMSPEC = C:\WINDOWS\system32\cmd.exe
  • powershell.exe present at C:\Windows\System32\WindowsPowerShell\v1.0\
  • PowerShell 7.6.4 (pwsh) installed and working
  • C:\Windows\System32\WindowsPowerShell\v1.0 was missing from the system

PATH. Added it to the user PATH; "powershell.exe -NoProfile -Command"
now resolves by name from a normal terminal, but the app terminal still
fails identically.

  • Fully quit and relaunched the app, then rebooted. No change.
  • config.json contains no shell setting, so there is nothing to point at a

different shell.

Scope: Claude Code works normally in an external PowerShell window, and the
app's own agent sessions run shell commands without trouble. Only the
Terminal pane fails.

What Should Happen?

Opening a tab in the Terminal pane should start a working shell (PowerShell
or cmd) in the current project folder, the same as an external terminal
does. Instead the tab shows "Failed to spawn shell" and the pty exits with
code 1.

Error Messages/Logs

From %APPDATA%\Claude\logs\main.log:

[info]  LocalSessions.startShellPty: sessionId=local_..., cols=71, rows=71
[error] [pty-host] spawn failed: File not found: 
[info]  Shell PTY for session local_... exited with code 1

Steps to Reproduce

  1. On Windows 11, install the Claude desktop app via winget

(winget install Anthropic.Claude) — this installs the MSIX package.

  1. Launch the app and sign in.
  2. Open the Terminal pane.
  3. Open a terminal tab (or click + for a new one).
  4. The tab shows "Failed to spawn shell" immediately. No shell ever starts.

%APPDATA%\Claude\logs\main.log records the failed spawn with an empty path.

Reproduces 100% of the time — every tab, every launch, and after a reboot.
Opening the pane is enough; no project or command is needed to trigger it.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.220 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗