Skip to content

Commit e1e4803

Browse files
committed
fix(mcp): preserve skip-auth env flags during worker lazy-spawn (#3053)
1 parent d190dfa commit e1e4803

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

plugin/scripts/mcp-server.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/supervisor/env-sanitizer.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@ describe('sanitizeEnv', () => {
6060
new URL('../../plugin/scripts/server-beta-service.cjs', import.meta.url),
6161
'utf-8'
6262
);
63+
const mcpServerBundle = readFileSync(
64+
new URL('../../plugin/scripts/mcp-server.cjs', import.meta.url),
65+
'utf-8'
66+
);
6367

6468
expect(workerBundle).toContain('CLAUDE_CODE_SKIP_BEDROCK_AUTH');
6569
expect(workerBundle).toContain('CLAUDE_CODE_SKIP_VERTEX_AUTH');
6670
expect(serverBetaBundle).toContain('CLAUDE_CODE_SKIP_BEDROCK_AUTH');
6771
expect(serverBetaBundle).toContain('CLAUDE_CODE_SKIP_VERTEX_AUTH');
72+
expect(mcpServerBundle).toContain('CLAUDE_CODE_SKIP_BEDROCK_AUTH');
73+
expect(mcpServerBundle).toContain('CLAUDE_CODE_SKIP_VERTEX_AUTH');
6874
});
6975

7076
it('strips exact-match variables (CLAUDECODE, CLAUDE_CODE_SESSION, CLAUDE_CODE_ENTRYPOINT, MCP_SESSION_ID)', () => {

0 commit comments

Comments
 (0)