Skip to content
Source
Sign inSign up
pingdotgg/t3code

Clear pending requests whose provider session is gone #4598

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

Showing 3 changed files with 198 additions and 2 deletions.

x
0 of 3 viewed, 3 left
138 additions and 0 deletionsapps/server/src/orchestration/Layers/ProviderCommandReactor.test.tsModified
View file
@@ -2174,6 +2174,144 @@
expect(resolvedActivity).toBeUndefined();
+ effectIt.effect(
+ "marks user-input responses stale when no provider session is bound to the thread",
+ () =>
+ Effect.gen(function* () {
+ const harness = yield* Effect.promise(() => createHarness());
+ const now = "2026-01-01T00:00:00.000Z";
+​
+ yield* harness.engine.dispatch({
+ type: "thread.activity.append",
+ commandId: CommandId.make("cmd-user-input-requested-no-session"),
+ threadId: ThreadId.make("thread-1"),
+ activity: {
+ id: EventId.make("activity-user-input-requested-no-session"),
+ tone: "info",
+ kind: "user-input.requested",
+ summary: "User input requested",
+ payload: {
+ requestId: "user-input-request-1",
+ questions: [
+ {
+ id: "fix_scope",
+ header: "Fix scope",
+ question: "How should I handle this?",
+ options: [{ label: "Delete now", description: "Remove the garbage" }],
+ },
+ ],