Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): background Claude subagents still ask for approval after their parent turn ends #35428

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

Showing 2 changed files with 81 additions and 1 deletion.

x
0 of 2 viewed, 2 left
67 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -15797,6 +15797,73 @@
return { childThreadId, toolThreadIds, assistantTexts };
+ // regression: #20339 a background subagent outliving its parent turn must still get approvals
+ it.effect("asks for a background subagent's approval after the parent turn settles", () =>
+ Effect.gen(function* () {
+ const harness = yield* makeWakeHarness;
+ yield* harness.runtime.startTurn(
+ makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now: DateTime.makeUnsafe(0),
+ attemptId: RunAttemptId.make("settled-subagent-permission"),
+ text: "Run the auditor in the background.",
+ attachments: [],
+ runtimePolicy: ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
+ runtimeMode: "approval-required",
+ interactionMode: "default",
+ cwd: "/workspace",
+ }),
+ }),
+ );
+ yield* harness.offerAndWait(
+ makeSubagentTaskStartedFrame({
+ taskId: "auditor",
+ toolUseId: "toolu-auditor",
+ uuid: "00000000-0000-4000-8000-000000020339",
+ }),
+ );