Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): treat signal-killed Claude subprocess as interrupted #5142

Closedmarcoamt(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/5142/headopened View on GitHub

Showing 2 changed files with 68 additions and 1 deletion.

x
0 of 2 viewed, 2 left
59 additions and 0 deletionsapps/server/src/provider/Layers/ClaudeAdapter.test.tsModified
View file
@@ -4064,6 +4064,65 @@
+ it.effect(
+ "treats an externally signal-killed subprocess as interrupted, not a runtime error",
+ () => {
+ const harness = makeHarness();
+ return Effect.gen(function* () {
+ const adapter = yield* ClaudeAdapter;
+ const runtimeEvents: Array<ProviderRuntimeEvent> = [];
+​
+ const runtimeEventsFiber = yield* Stream.runForEach(adapter.streamEvents, (event) =>
+ Effect.sync(() => {
+ runtimeEvents.push(event);
+ }),
+ ).pipe(Effect.forkChild);
+​
+ yield* adapter.startSession({
+ threadId: THREAD_ID,
+ provider: ProviderDriverKind.make("claudeAgent"),
+ runtimeMode: "full-access",
+ });
+​
+ yield* adapter.sendTurn({
+ threadId: THREAD_ID,
+ input: "hello",
+ attachments: [],
+ });
+​