Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): honor Claude session approvals in Plan mode #24413

Closedjuliusmarmingewants to merge 7 commits intomain fromfix/issue-23918opened View on GitHub

Showing 2 changed files with 137 additions and 1 deletion (loading 1).

x
0 of 2 viewed, 2 left
137 additions and 1 deletionapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -4595,7 +4595,7 @@
turn: Effect.Success<ReturnType<typeof openPlanTurn>>,
toolName: string,
toolInput: Record<string, unknown>,
- options?: { toolUseID: string; agentID?: string },
+ options?: { toolUseID: string; agentID?: string; askFlags?: object },
const decision = yield* Effect.promise(() =>
turn.canUseTool(toolName, toolInput, {
@@ -4603,6 +4603,7 @@
toolUseID: options?.toolUseID ?? "tool-plan-write",
requestId: "request-plan-write",
...(options?.agentID === undefined ? {} : { agentID: options.agentID }),
+ ...options?.askFlags,
).pipe(Effect.forkScoped);
const first = yield* Effect.raceFirst(
@@ -4666,6 +4667,141 @@
+ // regression: #23918 the CLI keeps asking in Plan despite the session rule it was given
+ it.effect("keeps a session approval for later calls of the same tool in Plan", () =>
+ Effect.gen(function* () {
+ const turn = yield* openPlanTurn("full-access");
+ const toolName = "mcp__t3-code__t3_thread_read";
+ const approval = yield* requestWrite(
+ turn,