Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): command approvals show the command, not Claude's description of it #20145

Mergedmaria-rcksmerged 1 commit intomain fromrefs/pull/20145/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 17 additions and 6 deletions.

x
0 of 2 viewed, 2 left
14 additions and 6 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -893,8 +893,11 @@
assert.isFunction(canUseTool);
​
const requestEvent = yield* runtime.events.pipe(
- Stream.filter((event) => event.type === "runtime_request.updated"),
- Stream.runHead,
+ Stream.takeUntil(
+ (event) =>
+ event.type === "turn_item.updated" && event.turnItem.type === "approval_request",
+ ),
+ Stream.runCollect,
Effect.forkScoped,
const command = { command: "node -e 'console.log(42)'" };
@@ -903,6 +906,7 @@
signal: new AbortController().signal,
toolUseID: "tool-bash-accept-edits",
requestId: "request-bash-accept-edits",
+ description: "Check the Node runtime",
}),
).pipe(Effect.forkScoped);
const first = yield* Effect.raceFirst(
@@ -915,12 +919,16 @@
assert.equal(first.type, "request", "the command ran without asking");
if (first.type !== "request") return;
- const event = first.event;
- if (Option.isNone(event) || event.value.type !== "runtime_request.updated") return;