Skip to content

[BUG] VS Code extension crashes with exit code 1 on every Bash tool invocation (Windows) #36274

@dakotaeye

Description

@dakotaeye

Preflight Checklist

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

What's Wrong?

The VS Code extension crashes with exit code 1 every time Claude Code attempts to use the Bash tool. The crash occurs immediately after shell snapshot creation. The identical bundled binary (claude.exe from the extension directory) works perfectly when launched directly from a terminal — the crash only happens when the extension host manages the process.

What Should Happen?

Bash tool commands should execute successfully through the VS Code extension, as they do when running the same binary from the terminal.

Error Messages/Logs

bashToolHasPermission: tree-sitter unavailable, using legacy shell-quote path
Creating shell snapshot for bash (C:\Program Files\Git\bin\bash.exe)
Shell config file not found: C:\Users\claib\.bashrc, creating snapshot with Claude Code defaults only
Creating snapshot at: C:\Users\claib\.claude\shell-snapshots\snapshot-bash-[timestamp].sh
Execution timeout: 10000ms
Error from Claude (on channel [id]): Error: Claude Code process exited with code 1

Additional issues observed in logs:

Extension spawns two Claude processes simultaneously on launch (one with resume, one without), causing Failed to save config with lock: Error: Lock file is already being held
resolveShellPath: C:\Program Files\PowerShell\7\pwsh.exe failed: Invalid argument '-lic' on every startup
MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found

Steps to Reproduce

Install Claude Code VS Code extension on Windows with Git for Windows
Open any project folder in VS Code
Open Claude Code panel and start a new session
Send any message that triggers a Bash tool invocation (e.g. "git status")
Extension crashes with exit code 1 after shell snapshot creation

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.79 (also reproduced on 2.1.63, 2.1.68, 2.1.78)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:bashbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:vscodeIssue specifically occurs in VS Codeplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions