The best way to control Claude Code, Codex and more from any computer or phone
fix(claude): command approvals show the command, not Claude's description of it (#20145)
maria committed
Oct 29, 2026 at 01:27 UTC
5eebf77b373b719ca4456985340707afa267310e
2 files changed
+17
-6
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts
+14
-6
@@ -893,8 +893,11 @@ describe("ClaudeAdapterV2 Auto-accept edits", () => {
893
assert.isFunction(canUseTool);
894
895
const requestEvent = yield* runtime.events.pipe(
896
- Stream.filter((event) => event.type === "runtime_request.updated"),
897
- Stream.runHead,
896
+ Stream.takeUntil(
897
+ (event) =>
898
+ event.type === "turn_item.updated" && event.turnItem.type === "approval_request",
899
+ ),
900
+ Stream.runCollect,
901
Effect.forkScoped,
902
);
903
const command = { command: "node -e 'console.log(42)'" };
@@ -903,6 +906,7 @@ describe("ClaudeAdapterV2 Auto-accept edits", () => {
906
signal: new AbortController().signal,
907
toolUseID: "tool-bash-accept-edits",
908
requestId: "request-bash-accept-edits",
909
+ description: "Check the Node runtime",
910
}),
911
).pipe(Effect.forkScoped);
912
const first = yield* Effect.raceFirst(
@@ -915,12 +919,16 @@ describe("ClaudeAdapterV2 Auto-accept edits", () => {
919
);
920
assert.equal(first.type, "request", "the command ran without asking");
921
if (first.type !== "request") return;
918
- const event = first.event;
919
- if (Option.isNone(event) || event.value.type !== "runtime_request.updated") return;
920
- assert.equal(event.value.runtimeRequest.kind, "command");
922
+ const event = first.event.find((event) => event.type === "runtime_request.updated");
923
+ assert.equal(event?.runtimeRequest.kind, "command");
924
+ const approval = first.event.findLast((event) => event.type === "turn_item.updated");
925
+ assert.equal(
926
+ approval?.turnItem.type === "approval_request" ? approval.turnItem.prompt : undefined,
927
+ command.command,
928
+ );
929
930
yield* runtime.respondToRuntimeRequest({
923
- requestId: event.value.runtimeRequest.id,
931
+ requestId: event!.runtimeRequest.id,
932
decision: "accept",
933
});
934
assert.equal((yield* Fiber.join(decision))?.behavior, "allow");
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
+3
@@ -9551,7 +9551,10 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* (
9551
}
9552
9553
const requestKind = providerRequestKindFromClaudeTool(toolName);
9554
+ // The user approves the command itself; Claude's title and description only summarize it.
9555
+ const command = inputRecordValue(nativeToolInput, "command");
9556
const prompt =
9557
+ (typeof command === "string" && command.trim() !== "" ? command : undefined) ??
9558
callbackOptions.title ??
9559
callbackOptions.description ??
9560
callbackOptions.decisionReason ??