head: 2bd93080180ff20c768d8fc6aa13a8e09e05ce3d cwd: /home/ubuntu/wt/issue-24300/apps/server $ git diff -- src/orchestration-v2/ProviderTurnStartService.ts diff --git a/apps/server/src/orchestration-v2/ProviderTurnStartService.ts b/apps/server/src/orchestration-v2/ProviderTurnStartService.ts index 97d4b21598..15d4e29c6f 100644 --- a/apps/server/src/orchestration-v2/ProviderTurnStartService.ts +++ b/apps/server/src/orchestration-v2/ProviderTurnStartService.ts @@ -782,9 +782,6 @@ export const layer: Layer.Layer< if (resumed._tag === "Success") { return resumed.success; } - if (outcomeUnknown(resumed.failure)) { - return yield* loadFromProvider(Effect.fail(resumed.failure)); - } yield* Effect.logWarning("Provider resume failed; attempting a fresh native session", { driver: session.driver, $ vp test run src/orchestration-v2/ProviderTurnStartService.test.ts -t "resume outcome is unknown" note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead. RUN v5.0.5 /home/ubuntu/wt/issue-24300/apps/server stdout | src/orchestration-v2/ProviderTurnStartService.test.ts > fails rather than starts a fresh thread when a resume outcome is unknown [22:52:05.417] ERROR (#1): Error [AssertionError]: expected "vi.fn()" to not be called at all, but actually been called 1 times Received: 1st vi.fn() call: Array [ Object { "existingProviderThread": Object { "appThreadId": "thread-native-account-command", "createdAt": "2026-09-04T12:00:00.000Z", "driver": "codex", "firstRunOrdinal": 2, "forkedFrom": null, "handoffIds": Array [], "id": "new-provider-thread", "lastRunOrdinal": 2, "nativeConversationHeadRef": null, "nativeThreadRef": null, "ownerNodeId": null, "providerInstanceId": "codex-personal", "providerSessionId": "new-provider-session", "status": "not_loaded", "updatedAt": "2026-09-04T12:00:00.000Z", }, "modelSelection": Object { "instanceId": "codex-personal", "model": "gpt-5.4", }, "providerSessionId": "new-provider-session", "runtimePolicy": Object { "cwd": "/tmp/native-account-command", }, "threadId": "thread-native-account-command", "title": undefined, }, ] Number of calls: 1 at Proxy. (file:///home/ubuntu/wt/issue-24300/node_modules/.pnpm/vitest@5.0.5_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@vitest+browser-playwright@5._844b5ecc141c2e2bcf9965912e411c65/node_modules/vitest/dist/chunks/index.aTZaPVhf.js:2230:51) at Proxy. (file:///home/ubuntu/wt/issue-24300/node_modules/.pnpm/vitest@5.0.5_@tsc-rs+typescript@0.8.0_@types+node@24.12.4_@vitest+browser-playwright@5._844b5ecc141c2e2bcf9965912e411c65/node_modules/vitest/dist/chunks/index.aTZaPVhf.js:1958:14) at Proxy.methodWrapper (file:///home/ubuntu/wt/issue-24300/node_modules/.pnpm/chai@6.3.0/node_modules/chai/index.js:1737:25) at /home/ubuntu/wt/issue-24300/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts:1157:46 { [cause]: undefined } ❯ src/orchestration-v2/ProviderTurnStartService.test.ts (34 tests | 1 failed | 33 skipped) 31ms × fails rather than starts a fresh thread when a resume outcome is unknown 29ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯ FAIL src/orchestration-v2/ProviderTurnStartService.test.ts > fails rather than starts a fresh thread when a resume outcome is unknown AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times Received: 1st vi.fn() call: Array [ Object { "existingProviderThread": Object { "appThreadId": "thread-native-account-command", "createdAt": "2026-09-04T12:00:00.000Z", "driver": "codex", "firstRunOrdinal": 2, "forkedFrom": null, "handoffIds": Array [], "id": "new-provider-thread", "lastRunOrdinal": 2, "nativeConversationHeadRef": null, "nativeThreadRef": null, "ownerNodeId": null, "providerInstanceId": "codex-personal", "providerSessionId": "new-provider-session", "status": "not_loaded", "updatedAt": "2026-09-04T12:00:00.000Z", }, "modelSelection": Object { "instanceId": "codex-personal", "model": "gpt-5.4", }, "providerSessionId": "new-provider-session", "runtimePolicy": Object { "cwd": "/tmp/native-account-command", }, "threadId": "thread-native-account-command", "title": undefined, }, ] Number of calls: 1 ❯ src/orchestration-v2/ProviderTurnStartService.test.ts:1157:46 1155| const result = yield* Effect.result(harness.startWithRetry); 1156| 1157| expect(harness.fallbackEnsureThread).not.toHaveBeenCalled(); | ^ 1158| expect(Result.isSuccess(result)).toBe(true); 1159| expect(harness.startRootRun).not.toHaveBeenCalled(); ❯ ~effect/Effect/successCont ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1422:28 ❯ FiberImpl.succeedWith ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:711:30 ❯ MatchImpl.~effect/Effect/failureCont ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:3623:16 ❯ ~effect/Effect/evaluate ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/core.ts:627:20 ❯ FiberImpl.runLoop ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:654:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ Test Files 1 failed (1) Tests 1 failed | 33 skipped (34) Start at 22:52:00 Duration 4.62s (import 63%, transform 34%, setup 2%, tests 1%) exit: 1 restored: 0 changed lines in impl diff