Skip to content

[Fix] Setup Sessions no longer open without their first turn - #1826

Draft
roomote-roomote[bot] wants to merge 2 commits into
developfrom
fix/durable-setup-session-first-turns-152pa8m3f57f2
Draft

[Fix] Setup Sessions no longer open without their first turn#1826
roomote-roomote[bot] wants to merge 2 commits into
developfrom
fix/durable-setup-session-first-turns-152pa8m3f57f2

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Persist each web Fast Session's initial-turn payload inside the same advisory-locked transaction that creates or recovers the conversation.
  • Reschedule deterministic retries while that durable initial turn remains pending, then reload it under the existing per-conversation turn lock before execution.
  • Mark the initial turn complete only after successful execution so interrupted callbacks remain recoverable without rerunning completed turns.
  • Preserve handled Fast failures as retryable kickoff failures after their user-visible error closeout is persisted.
  • Add persistence, crash-window, completed-turn, and failed-retry regression coverage.

Why this change was made

Setup could commit a starter Session and complete onboarding before its first Fast turn ran in the Next.js post-response callback. If the process exited in that window, the deterministic retry found the existing Session and deliberately skipped the only launch opportunity.

Impact

Setup starter Sessions retain a recoverable first turn across process interruption. Retrying the same launch batch schedules pending work, while the durable completion marker and turn lock prevent completed first turns from running again.

@roomote-community

roomote-community Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • apps/web/src/trpc/commands/fast-sessions/index.ts:210 Do not complete the durable initial-turn marker when answerFastAgentQuestion has handled a failed attempt by returning an error closeout.

Reviewed ee026a5

Comment thread apps/web/src/trpc/commands/fast-sessions/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant