Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): preserve subagent task context snapshots #21644

Openjuliusmarmingewants to merge 2 commits intoclaude-context/client-support fromclaude-context/claude-adapteropened View on GitHub

Showing 2 changed files with 134 additions and 12 deletions (loading 1).

x
0 of 2 viewed, 2 left
134 additions and 12 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -9679,6 +9679,94 @@
+ it.effect("replaces subagent context snapshots and clears them on an in-turn resume", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const harness = yield* makeWakeHarness;
+ yield* harness.runtime.startTurn(
+ makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now: yield* DateTime.now,
+ attemptId: RunAttemptId.make("attempt-context-snapshots"),
+ text: "Run an audit, then resume it.",
+ attachments: [],
+ }),
+ );
+ let sequence = 4100;
+ const taskFrame = (message: Record<string, unknown>) =>
+ claudeSdkFrame({
+ type: "system",
+ task_id: "context-agent",
+ tool_use_id: "toolu-context-agent",
+ session_id: WAKE_NATIVE_SESSION,
+ uuid: `00000000-0000-4000-8000-${String(++sequence).padStart(12, "0")}`,
+ ...message,
+ });
+ const started = {
+ subtype: "task_started",