Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Claude Plan no longer asks again for a tool approved for the session #36340

Openjuliusmarmingewants to merge 2 commits intomain fromrefs/pull/36340/headopened View on GitHub

Showing 2 changed files with 86 additions and 2 deletions.

x
0 of 2 viewed, 2 left
53 additions and 1 deletionapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -4879,7 +4879,7 @@
turn: Effect.Success<ReturnType<typeof openPlanTurn>>,
toolName: string,
toolInput: Record<string, unknown>,
- options?: { toolUseID: string; agentID?: string },
+ options?: { toolUseID: string; agentID?: string; decisionReasonType?: "mode" | "hook" },
const decision = yield* Effect.promise(() =>
turn.canUseTool(toolName, toolInput, {
@@ -4887,6 +4887,9 @@
toolUseID: options?.toolUseID ?? "tool-plan-write",
requestId: "request-plan-write",
...(options?.agentID === undefined ? {} : { agentID: options.agentID }),
+ ...(options?.decisionReasonType === undefined
+ ? {}
+ : { decisionReasonType: options.decisionReasonType }),
).pipe(Effect.forkScoped);
const first = yield* Effect.raceFirst(
@@ -4950,6 +4953,55 @@
+ // regression: #23918 the CLI asks again in Plan despite the session rule it was given
+ it.effect("does not ask again for an MCP tool approved for the session in Plan", () =>
+ Effect.gen(function* () {
+ const turn = yield* openPlanTurn("full-access");
+ const toolName = "mcp__t3-code__t3_thread_read";