Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Claude threads recover after you log in again #18558

Closedrobertnisipeanu(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/18558/headopened View on GitHub

Showing 6 changed files with 127 additions and 8 deletions (loading 3).

x
0 of 6 viewed, 6 left
104 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -4783,6 +4783,110 @@
+ it.effect.each([
+ {
+ failure: "authentication_failed",
+ apiErrorStatus: undefined,
+ opensFreshProcess: true,
+ backgroundShell: true,
+ },
+ {
+ failure: "server_error",
+ apiErrorStatus: undefined,
+ opensFreshProcess: false,
+ backgroundShell: false,
+ },
+ {
+ failure: "authentication_failed",
+ apiErrorStatus: 403,
+ opensFreshProcess: false,
+ backgroundShell: false,
+ },
+ ] as const)(
+ "after a turn fails with $failure (API status: $apiErrorStatus), the next turn opens a fresh process: $opensFreshProcess (background shell: $backgroundShell)",
+ ({ failure, apiErrorStatus, opensFreshProcess, backgroundShell }) =>
+ Effect.gen(function* () {
+ let closeCount = 0;
+ const harness = yield* makeWakeHarnessWithOptions({
+ freshQueueOnReopen: true,