Skip to content
Source
Sign inSign up
pingdotgg/t3code

Skip user hooks during Claude capability probes #4466

Mergedyashranaway(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/4466/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 13 additions and 0 deletions.

x
0 of 2 viewed, 2 left
9 additions and 0 deletionsapps/server/src/provider/Layers/ClaudeCapabilitiesProbe.test.tsModified
View file
@@ -46,6 +46,7 @@
assert.equal(options.strictMcpConfig, true);
assert.equal(options.cwd, "/workspace/project");
assert.deepEqual(options.settingSources, [...CLAUDE_CAPABILITIES_PROBE_SETTING_SOURCES]);
+ assert.deepEqual(options.settings, { disableAllHooks: true });
assert.deepEqual(options.allowedTools, []);
assert.equal(options.persistSession, false);
assert.equal(options.pathToClaudeCodeExecutable, "/usr/bin/claude");
@@ -149,6 +150,14 @@
assert.equal(invocation.mcpConfig, undefined);
​
assert.equal(invocation.args.includes("--setting-sources=user,project,local"), true);
+​
+ const settingsFlagIndex = invocation.args.indexOf("--settings");
+ assert.notEqual(settingsFlagIndex, -1);
+ // @effect-diagnostics-next-line preferSchemaOverJson:off
+ const flagSettings = JSON.parse(invocation.args[settingsFlagIndex + 1] ?? "{}") as {
+ readonly disableAllHooks?: boolean;
+ };
+ assert.equal(flagSettings.disableAllHooks, true);
}).pipe(Effect.scoped),
});
4 additions and 0 deletionsapps/server/src/provider/Layers/ClaudeProvider.tsModified
View file
@@ -594,6 +594,10 @@
pathToClaudeCodeExecutable: input.executablePath,