Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a Claude Monitor line no longer wakes a delegated child's parent #36339

Mergedjuliusmarmingemerged 5 commits intomain fromrefs/pull/36339/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 195 additions and 0 deletions (loading 3).

x
0 of 4 viewed, 4 left
195 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -11496,6 +11496,201 @@
+ // Claude 2.1.323 wakes a session per Monitor event with only init, assistant and a
+ // task-notification result; just the Monitor's end sends a task_notification frame.
+ it.effect.each([
+ { monitorWake: "ends with its own result", laterWake: "ends with its own result" },
+ { monitorWake: "ends with its own result", laterWake: "is absorbed by a user turn" },
+ { monitorWake: "is absorbed by a user turn", laterWake: "is absorbed by a user turn" },
+ ] as const)(
+ "tags a Claude Monitor event wake as a monitor update (it $monitorWake, later wake $laterWake)",
+ ({ monitorWake, laterWake }) =>
+ Effect.gen(function* () {
+ const absorbed = laterWake === "is absorbed by a user turn";
+ const monitorWakeAbsorbed = monitorWake === "is absorbed by a user turn";
+ const harness = yield* makeWakeHarness;
+ const now = yield* DateTime.now;
+ const taskId = "bi5kfx7xp";
+ const toolUseId = "toolu_monitor_events";
+​
+ yield* harness.runtime.startTurn(
+ makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now,
+ attemptId: RunAttemptId.make("attempt-claude-monitor-event"),
+ text: "Watch the mutation run and report each survivor.",
+ attachments: [],
+ }),