TypeScript
fix(server): skip IDE detection in Claude probes (#8634)
Aditya Garudf86c5e8c8700
diff --git a/apps/server/src/provider/Layers/ClaudeCapabilitiesProbe.test.ts b/apps/server/src/provider/Layers/ClaudeCapabilitiesProbe.test.tsindex 7e5fa2611f0..2f842bf581f 100644--- a/apps/server/src/provider/Layers/ClaudeCapabilitiesProbe.test.ts+++ b/apps/server/src/provider/Layers/ClaudeCapabilitiesProbe.test.ts@@ -22,6 +22,7 @@ it("isolates Claude capability probes without dropping workspace setting sourcesenvironment: {HOME: "/home/user",ENABLE_CLAUDEAI_MCP_SERVERS: "true",+ FORCE_CODE_TERMINAL: "1",},cwd: "/workspace/project",});@@ -37,6 +38,9 @@ it("isolates Claude capability probes without dropping workspace setting sourcesassert.equal(options.abortController, abortController);assert.equal(options.env?.HOME, "/home/user");assert.equal(options.env?.ENABLE_CLAUDEAI_MCP_SERVERS, "false");+ assert.equal(options.env?.FORCE_CODE_TERMINAL, undefined);+ assert.equal(options.env?.CLAUDE_CODE_AUTO_CONNECT_IDE, "0");+ assert.equal(options.env?.CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL, "1");});it.layer(NodeServices.layer)("Claude capability probe SDK boundary", (it) => {diff --git a/apps/server/src/provider/Layers/ClaudeProvider.ts b/apps/server/src/provider/Layers/ClaudeProvider.tsindex f815ac75be3..f37cf0534fe 100644--- a/apps/server/src/provider/Layers/ClaudeProvider.ts+++ b/apps/server/src/provider/Layers/ClaudeProvider.ts@@ -614,6 +614,12 @@ export function buildClaudeCapabilitiesProbeQueryOptions(input: {// Connected claude.ai MCP servers are discovered outside filesystem// config; disable them independently for this health check.ENABLE_CLAUDEAI_MCP_SERVERS: "false",+ // This is a noninteractive health check, so IDE discovery cannot add any+ // useful capability data. Skipping it also avoids Claude spawning a+ // Windows `tasklist | findstr` process tree on every periodic refresh.+ FORCE_CODE_TERMINAL: undefined,+ CLAUDE_CODE_AUTO_CONNECT_IDE: "0",+ CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL: "1",},...(input.cwd ? { cwd: input.cwd } : {}),stderr: () => {},