Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a Claude steer no longer waits behind a running foreground command #37756

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/37756/headopened View on GitHub

Showing 2 changed files with 131 additions and 12 deletions.

x
0 of 2 viewed, 2 left
97 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -5909,6 +5909,103 @@
+ // The CLI holds a "now" steer until a foreground command returns; the
+ // terminal's send-now moves the command to the background first.
+ it.effect("moves a running foreground command to the background before a steer", () =>
+ Effect.gen(function* () {
+ const offeredBeforeMove: Array<number> = [];
+ const moved: Array<string> = [];
+ const harness = yield* makeWakeHarnessWithOptions({
+ backgroundTasks: (toolUseId) =>
+ Effect.sync(() => {
+ offeredBeforeMove.push(harness.offeredMessages.length);
+ moved.push(toolUseId);
+ return true;
+ }),
+ });
+ const idAllocator = yield* IdAllocator.IdAllocatorV2;
+ const input = makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now: yield* DateTime.now,
+ attemptId: RunAttemptId.make("attempt-steer-background-command"),
+ text: "Render the video.",
+ attachments: [],
+ });
+ yield* harness.runtime.startTurn(input);
+ yield* harness.offerAndWait(
+ claudeSdkFrame({