Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): reconcile active sessions after restart #7463

Closedayubun(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/7463/headopened View on GitHub

Showing 4 changed files with 118 additions and 2 deletions (loading 2).

x
0 of 4 viewed, 4 left
116 additions and 0 deletionsapps/server/src/orchestration/Layers/ProviderCommandReactor.test.tsModified
View file
@@ -2653,6 +2653,63 @@
+ it("marks approval responses stale when the provider session is stopped", async () => {
+ const harness = await createHarness();
+ const now = "2026-01-01T00:00:00.000Z";
+​
+ await harness.runEffect(
+ harness.engine.dispatch({
+ type: "thread.session.set",
+ commandId: CommandId.make("cmd-session-set-for-stale-approval"),
+ threadId: ThreadId.make("thread-1"),
+ session: {
+ threadId: ThreadId.make("thread-1"),
+ status: "stopped",
+ providerName: "codex",
+ runtimeMode: "approval-required",
+ activeTurnId: null,
+ lastError: null,
+ updatedAt: now,
+ },
+ createdAt: now,
+ }),
+ );
+ await harness.runEffect(
+ harness.engine.dispatch({
+ type: "thread.approval.respond",
+ commandId: CommandId.make("cmd-stale-approval-response"),
+ threadId: ThreadId.make("thread-1"),