Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): threads stay working while Claude starts a wake turn #15055

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/15055/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 88 additions and 7 deletions.

x
0 of 2 viewed, 2 left
64 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -2004,6 +2004,13 @@
uuid: "00000000-0000-4000-8000-000000000107",
text: WAKE_ASSISTANT_TEXT,
+ // The CLI opens the wake turn with `init`, seconds before its first output.
+ const wakeTurnInit = claudeSdkFrame({
+ type: "system",
+ subtype: "init",
+ uuid: "00000000-0000-4000-8000-000000000110",
+ session_id: WAKE_NATIVE_SESSION,
+ });
const wakeResult = makeResultFrame({
uuid: "00000000-0000-4000-8000-000000000104",
result: WAKE_RESULT_TEXT,
@@ -4641,6 +4648,63 @@
+ it.effect("starts the wake run when Claude opens the wake turn, before its output", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const harness = yield* makeWakeHarness;
+ const now = yield* DateTime.now;
+​
+ yield* harness.runtime.startTurn(
+ makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now,