Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): 🐛 show the effort a subagent actually runs at #13333

Closeddiegojohnsonl(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/13333/headopened View on GitHub

Showing 2 changed files with 110 additions and 2 deletions.

x
0 of 2 viewed, 2 left
90 additions and 0 deletionsapps/server/src/provider/Layers/ClaudeAdapter.test.tsModified
View file
@@ -9,6 +9,7 @@
Options as ClaudeQueryOptions,
PermissionMode,
PermissionResult,
+ PreToolUseHookInput,
SDKMessage,
SDKUserMessage,
} from "@anthropic-ai/claude-agent-sdk";
@@ -30,6 +31,7 @@
import * as Effect from "effect/Effect";
import * as Fiber from "effect/Fiber";
import * as Layer from "effect/Layer";
+import * as Option from "effect/Option";
import * as Random from "effect/Random";
import * as Ref from "effect/Ref";
import * as Schema from "effect/Schema";
@@ -3996,6 +3998,94 @@
+ it.effect("a hook fired inside a subagent refines its seeded effort", () => {
+ const harness = makeHarness();
+ return Effect.gen(function* () {
+ const adapter = yield* ClaudeAdapter;
+ const nextTaskEvent = adapter.streamEvents.pipe(
+ Stream.filter((event) => event.type.startsWith("task.")),
+ Stream.runHead,
+ Effect.map(Option.getOrUndefined),