Repository navigation
Closed
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Start a conversation with Claude.
- Send an image while background work prevents Claude from accepting the next request.
- Send a follow-up after the request fails to start.
- Continue the conversation when Claude cannot resume its previous session and T3 recovers the conversation in a fresh session.
Expected behavior
The next accepted request carries the image that Claude never received, together with the missed text requests.
Actual behavior
The recovered session receives the missed text requests without the image attached to them.
Impact
Major degradation or frequent failure. People whose image request fails before Claude accepts it lose that image whenever the subsequent turn recovers into a fresh session.
Version or commit
main at a99faf5a62. The cause is at apps/server/src/orchestration-v2/ProviderTurnStartService.ts:1497.
Environment
Linux x64, the repository's own tests.
Logs or stack traces
AssertionError: expected [] to deeply equalAutomated repro
Fails in 2 of 2 runs on main: apply the patch with git apply, then run the command.
diff --git a/apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts b/apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts
index 7aa0a1a263..1a49275d9f 100644
--- a/apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts
+++ b/apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts
@@ -1971,9 +1971,16 @@ describe("orchestration v2 provider switching", () => {
new ClaudeBackgroundWorkBlocksQueryReplacementError(),
true,
],
- ] as const)("keeps the native session after turns refused for %s", ([, refusalCause, inject]) =>
+ [
+ "background work followed by a lost native session",
+ new ClaudeBackgroundWorkBlocksQueryReplacementError(),
+ false,
+ true,
+ ],
+ ] as const)("retains missed images after %s", ([, refusalCause, inject, loseSession]) =>
Effect.gen(function* () {
const cwd = yield* checkpointWorkspace("refused-start-keeps-native");
+ const failResumeOnce = yield* Ref.make(false);
const capturedTurns = yield* Ref.make<ReadonlyArray<CapturedTurn>>([]);
const injectedHistory = yield* Ref.make<ReadonlyArray<unknown>>([]);
const refuseStarts = yield* Ref.make(0);
@@ -1988,6 +1995,7 @@ describe("orchestration v2 provider switching", () => {
capturedTurns,
refuseStarts,
refusalCause,
+ failResumeOnce,
nativeThreadGeneration: generation,
...(inject === true ? { injectedHistory } : {}),
}),
@@ -2045,12 +2053,15 @@ describe("orchestration v2 provider switching", () => {
yield* Ref.set(refuseStarts, 2);
assert.equal(yield* run(2), "failed");
assert.equal(yield* run(3), "failed");
+ yield* Ref.set(failResumeOnce, loseSession === true);
assert.equal(yield* run(4), "completed");
const turns = yield* Ref.get(capturedTurns);
assert.equal(turns.length, 2);
- assert.equal(yield* Ref.get(generation), 1);
- assert.equal(turns[1]?.nativeThreadId, turns[0]?.nativeThreadId);
+ assert.equal(yield* Ref.get(generation), loseSession === true ? 2 : 1);
+ if (loseSession !== true) {
+ assert.equal(turns[1]?.nativeThreadId, turns[0]?.nativeThreadId);
+ }
const delivered = `${turns[1]?.text}${JSON.stringify(yield* Ref.get(injectedHistory))}`;
assert.include(delivered, "Request 2");
assert.include(delivered, "Request 3");cd apps/server && pnpm exec vp test run src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts -t 'retains missed images after'Workaround
No response
Metadata
Metadata
Assignees
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
Activity