Skip to content

findUnresumableRuns

function findUnresumableRuns(sessionStore, options?): Promise<UnresumableRun[]>;

Find persisted runs that this version will refuse to resume, so they can be drained before an upgrade rather than discovered by a user mid-conversation.

Both refusals exist because the alternative is worse than an error: resuming a pre-request-bound approval would let call order decide what got approved, and resuming an in-flow run under the old effect-key scheme would re-execute effects it has already performed — a real payment, a real dispatch.

Run this against production BEFORE deploying. Each result needs a human decision: finish the conversation on the old version, or resolve it out of band.

const stuck = await findUnresumableRuns(sessionStore);
for (const run of stuck) console.log(run.sessionId, run.reason, run.recordedSteps);

Only inspects sessions the store returns from list(); pass sessionIds to check a known subset instead (large stores, or a paginated sweep you drive yourself).

Parameter Type

sessionStore

SessionStore

options

{ sessionIds?: string[]; }

options.sessionIds?

string[]

Promise<UnresumableRun[]>