claude-code - 💡(How to fix) Fix [BUG] [VSCode] [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56013Fetched 2026-05-05 06:00:28
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

Error Message

Error Messages/Logs

No error is surfaced. The wrapper is silently ignored.

Root Cause

Probable root cause:

Code Example

No error is surfaced. The wrapper is silently ignored.

---

// shell integration path
let D = ["claude", ...G];

// sendText fallback
let H = ["claude", ...G];

---

let _wp = (e6("claudeProcessWrapper") || "").trim().split(/\s+/).filter(Boolean);
// ...
let D = [..._wp, "claude", ...G];
// ...
let H = [..._wp, "claude", ...G];
RAW_BUFFERClick to expand / collapse

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?

When claudeCode.claudeProcessWrapper is set, it is silently ignored in terminal mode (claudeCode.useTerminal: true). The VS Code integrated terminal always launches claude directly, with no wrapper applied.

What Should Happen?

Both terminal mode and the native UI mode should honour claudeProcessWrapper. With a wrapper of timeout 60, terminal mode should execute timeout 60 claude ..., just as the UI mode does.

Error Messages/Logs

No error is surfaced. The wrapper is silently ignored.

Steps to Reproduce

  1. Set claudeCode.claudeProcessWrapper to any value, e.g. timeout 60
  2. Enable terminal mode: claudeCode.useTerminal: true
  3. Open Claude Code from the VS Code activity bar or command palette
  4. Observe the command run in the integrated terminal — the wrapper is absent; it runs plain claude ...
  5. Disable terminal mode and open Claude Code again — the UI mode correctly applies the wrapper

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.126

Platform

Anthropic API

Operating System

Other

Terminal/Shell

VS Code integrated terminal

Additional Information

Issue was observed in Ubuntu-24.04 WSL 2 on Windows 11.

Investigated by inspecting the bundled extension.js from anthropic.claude-code-2.1.126-linux-x64. The two relevant code paths are both in the jl4 function (the terminal launch helper registered under the claude-vscode.terminal.open command).

Probable root cause:

In extension.js, the terminal launch function hardcodes the command as ["claude", ...args] in both of its execution paths — the shell-integration path and the 3-second sendText fallback:

// shell integration path
let D = ["claude", ...G];

// sendText fallback
let H = ["claude", ...G];

The UI mode correctly calls resolveClaudeBinary(), which reads e6("claudeProcessWrapper") and prepends the wrapper before spawning the process. The terminal launch function never calls resolveClaudeBinary() and is entirely disconnected from the setting.

Fix: Read claudeProcessWrapper once at the top of the terminal launch function and spread its parts into both command arrays:

let _wp = (e6("claudeProcessWrapper") || "").trim().split(/\s+/).filter(Boolean);
// ...
let D = [..._wp, "claude", ...G];
// ...
let H = [..._wp, "claude", ...G];

This handles no wrapper ([]), single-word wrappers (npx), and multi-word wrappers (bun run) correctly, and is consistent with how resolveClaudeBinary applies the setting in the UI mode.

extent analysis

TL;DR

The issue can be fixed by modifying the terminal launch function in extension.js to read and apply the claudeProcessWrapper setting.

Guidance

  • The probable root cause is the hardcoded command in the terminal launch function, which ignores the claudeProcessWrapper setting.
  • To verify the fix, set claudeCode.claudeProcessWrapper to a value (e.g., timeout 60) and check if the wrapper is applied in both terminal and UI modes.
  • The fix involves reading the claudeProcessWrapper setting at the top of the terminal launch function and prepending it to the command arrays D and H.
  • The modified code should handle various wrapper formats, including no wrapper, single-word wrappers, and multi-word wrappers.

Example

let _wp = (e6("claudeProcessWrapper") || "").trim().split(/\s+/).filter(Boolean);
let D = [..._wp, "claude", ...G];
let H = [..._wp, "claude", ...G];

Notes

The provided fix assumes that the e6 function correctly reads the claudeProcessWrapper setting and that the resolveClaudeBinary function is not needed in the terminal launch function.

Recommendation

Apply the workaround by modifying the terminal launch function in extension.js to read and apply the claudeProcessWrapper setting, as this is a targeted fix that addresses the specific issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING