docs: update CHANGELOG for env var whitelist fix

This commit is contained in:
Hibryda 2026-03-08 22:49:02 +01:00
parent 74ce1ee083
commit 6585208233
3 changed files with 12 additions and 5 deletions

View file

@ -83,10 +83,13 @@ async function handleQuery(msg: QueryMessage) {
const controller = new AbortController();
// Strip CLAUDE* env vars to prevent nesting detection by the spawned CLI
// Strip CLAUDE* and ANTHROPIC_* env vars to prevent nesting detection by the spawned CLI.
// Whitelist CLAUDE_CODE_EXPERIMENTAL_* so feature flags (e.g. agent teams) pass through.
const cleanEnv: Record<string, string | undefined> = {};
for (const [key, value] of Object.entries(process.env)) {
if (!key.startsWith('CLAUDE') && !key.startsWith('ANTHROPIC_')) {
if (key.startsWith('CLAUDE_CODE_EXPERIMENTAL_')) {
cleanEnv[key] = value;
} else if (!key.startsWith('CLAUDE') && !key.startsWith('ANTHROPIC_')) {
cleanEnv[key] = value;
}
}