[BUG] VSCode extension sets DEBUG=1, causing shell environment polution
Status Fixed / completed
Maintainer reply ✓ Yes — blois
Activity 5 comments · opened Oct 21, 2025 · closed Oct 21, 2025
💡 Likely answer: A maintainer (blois, collaborator)
responded on this thread — see the highlighted reply below.
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?
We've been struggling to figure this out for a few days, but finally found it. The VSCode Claude Extension (extension.js) is explicitly setting DEBUG=1 in the shell environment:
% prettier ~/.vscode/extensions/anthropic.claude-code-2.0.24-darwin-arm64/extension.js > extension.js
% grep 'process.env.DEBUG = "1"' extension.js -B10 -A10
}
}
async launchClaude(e, r, s, a, i, n) {
if (
(this.logger.log(`Launching Claude on channel: ${e}`),
this.channels.has(e))
)
throw new Error(`Channel already exists: ${e}`);
try {
let o = new $n();
process.env.DEBUG = "1";
let l = this.spawnClaude(
o,
r,
async (c, u, p) =>
this.requestToolPermission(e, c, u, p.suggestions || []),
a || null,
s,
i,
this.getMaxThinkingTokensForModel(n),
);
Setting DEBUG=1 causes all kinds of noise to be emitted by common packages like kube-ps1.sh. Related issue https://github.com/anthropics/claude-code/issues/10027 is simillar.
Ultimately I don't think the claude code action should be setting ANY environment variables that are not explicitly targeted at Claude behavior.
What Should Happen?
Do not set/override environment variables
Error Messages/Logs
Steps to Reproduce
Load the extension, createa claude window, and open a shell.. then echo $DEBUG
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.13
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
5 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
@blois Excuse me?
Fix should be arriving in the next release.
Ok .. is there a changelog somewhere that we can subscribe to for this? Or could the code be opensourced?
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.