[BUG] CLI-style terminal does not use bundled CLI binary, causing "command not found" error

Resolved 💬 3 comments Opened Apr 10, 2026 by Linjunjie99 Closed Apr 14, 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?

## Bug Description

When switching the Claude Code VS Code extension to "CLI-style" mode,
it opens a terminal and runs claude as a shell command. However, the
bundled CLI binary is not added to the terminal's PATH, so users who
have not separately installed the global CLI will see:

command not found: claude

## Current Behavior

GUI mode works fine (uses the bundled binary directly), but CLI mode
relies on claude being available in the shell PATH, which is
inconsistent and breaks for users who only installed the extension.

## Environment

  • VS Code with Claude Code extension installed
  • No global @anthropic-ai/claude-code npm package installed

What Should Happen?

## Expected Behavior

The extension should either:

  • Use the bundled binary's absolute path when launching the terminal, OR
  • Clearly prompt the user to install the global CLI if it cannot be found in PATH

Error Messages/Logs

command not found: claude

Steps to Reproduce

## Steps to Reproduce

  1. Install the Claude Code VS Code extension (do NOT install the global CLI via npm)
  2. In extension settings, switch UI style to "Terminal / CLI mode"
  3. The extension opens a terminal and attempts to run claude
  4. command not found error appears

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.97 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

This appears to be a straightforward vscode extension design issue that should be relatively easy to fix.

The extension already bundles its own CLI binary and uses it correctly in GUI mode.
The fix should be consistent: when launching a CLI-style terminal, the extension
should inject the bundled binary's directory into the terminal's PATH (via
Terminal.env in the VS Code API), so the claude command resolves correctly
without requiring users to separately install the global CLI or manually configure
their PATH.

The alternative — requiring users to install @anthropic-ai/claude-code globally
before the CLI-style mode works — is undocumented and inconsistent with the behavior
of GUI mode. Users who install only the extension have a reasonable expectation that
all its features work out of the box.

Preferred fix: have the extension register its bundled binary's path into the
spawned terminal's environment, eliminating the need for a redundant global
installation.

Note: I was unsure whether plugin-specific bugs should be reported in a separate
repository, so I'm filing this here. Please redirect if there is a more appropriate tracker.

View original on GitHub ↗

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