René's URL Explorer Experiment


Title: fix(sdk): re-dispatch a single in-flight user on recovery boot by claude[bot] · Pull Request #4768 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(sdk): re-dispatch a single in-flight user on recovery boot by claude[bot] · Pull Request #4768 · triggerdotdev/trigger.dev

X Title: fix(sdk): re-dispatch a single in-flight user on recovery boot by claude[bot] · Pull Request #4768 · triggerdotdev/trigger.dev

Description: Requested by Matt Aitken · Slack thread Before: a chat.agent run is killed mid-answer (OOM, crash, eviction) while the message it was answering is the only one still outstanding. The new run boots, puts that message and the half-written reply into its context, and then waits for a message that already arrived. Nobody ever answers the user; the run sits idle until it times out. After: the new run re-runs that message as a fresh turn and replies to it. The half-written reply is dropped. When two or more messages are outstanding, nothing changes — the interrupted one still goes into context and the newer ones are re-run, exactly as before. ✅ Checklist I have followed every step in the contributing guide The PR title follows the convention. I ran and tested the code works Testing New regression test in packages/trigger-sdk/test/recovery-boot.test.ts — seeds a partial assistant plus exactly one in-flight user, no onRecoveryBoot, and asserts one turn fires for that user with the orphan partial dropped from the chain. It fails on main (turnCount 0, no turn at all) and passes with this change. pnpm exec vitest run in packages/trigger-sdk — 373 passed, 1 skipped (31 files passed, 1 skipped) pnpm exec oxfmt --check on the changed files — clean pnpm exec oxlint packages/trigger-sdk/src packages/trigger-sdk/test — clean pnpm run build --filter @trigger.dev/sdk — clean What it does: with exactly one in-flight user on a recovery boot, re-dispatch that user as a fresh turn instead of splicing it into the seed chain, where it was never answered. How: the recovery-boot smart default made one decision in two halves — the seed chain and the recovered-turn list — both gated on partialAssistant !== undefined && inFlightUsers.length > 0. The splice consumes inFlightUsers[0] into the chain as "the question the partial was answering" and dispatches the rest. That only works when there is a rest: at n=1 recoveredTurns came out empty, the boot-injected queue stayed empty, the session.in cursor was advanced past the message anyway, and on a preload or continuation boot (no message on the wire payload) neither dispatch site fired. Both branches now require length > 1, so n=1 falls through to the documented default — chain = settledMessages, re-dispatch every in-flight user. The submit-message boot is unaffected: the existing dedup still drops a queued message identical to the one already on the wire payload. Also corrected alongside it: the two SDK docstrings and the docs/ai-chat/patterns/recovery-boot.mdx defaults section, which described the default as "re-dispatch every user" and never mentioned the splice. Follow-up (not in this PR): the webapp e2e OOM helper never streams a token before throwing, so it exercises the no-partial path only and would not have caught this. Worth a variant that emits a token first. Changelog Fixed a chat agent hanging after an interrupted turn: when a run was killed mid-answer and only the one message it was answering was still outstanding, the new run never replied to it. That message is now re-answered on the new run.

Open Graph Description: Requested by Matt Aitken · Slack thread Before: a chat.agent run is killed mid-answer (OOM, crash, eviction) while the message it was answering is the only one still outstanding. The new run boots,...

X Description: Requested by Matt Aitken · Slack thread Before: a chat.agent run is killed mid-answer (OOM, crash, eviction) while the message it was answering is the only one still outstanding. The new run boots,...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4768

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:34dbf02d-ba63-4979-edcd-d0cc14bfd240
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB898:1A4239:5100:6AA4:6AFB08B4
html-safe-nonce90308dafb4dd16cf50891c41d3466e8b2b675073e203b2f4720e5ecaeda177ed
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODk4OjFBNDIzOTo1MTAwOjZBQTQ6NkFGQjA4QjQiLCJ2aXNpdG9yX2lkIjoiMjkyMTIxNzQ3MjY4Mzc3MjA4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1e633188bcafd19b192c1ab5aebe96d09f56641571481da8a544f45707d2ae30
hovercard-subject-tagpull_request:4353811821
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4768/files
twitter:imagehttps://avatars.githubusercontent.com/in/1236702?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1236702?s=400&v=4
og:image:altRequested by Matt Aitken · Slack thread Before: a chat.agent run is killed mid-answer (OOM, crash, eviction) while the message it was answering is the only one still outstanding. The new run boots,...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None76fb13cb43f1834708971f45a9cfcab5df3177a7582086613d7cdc6e98c4bfde
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseafc998826cdd963c8f91a96ae5372809ab5e296b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4768/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4768%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4768%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4768/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4768/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4768/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
ericallamhttps://github.com/ericallam
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
claude/fix-oom-recovery-single-inflight-userhttps://github.com/triggerdotdev/trigger.dev/tree/claude/fix-oom-recovery-single-inflight-user
Conversation 3 https://github.com/triggerdotdev/trigger.dev/pull/4768
Commits 3 https://github.com/triggerdotdev/trigger.dev/pull/4768/commits
Checks 69 https://github.com/triggerdotdev/trigger.dev/pull/4768/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4768/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4768/files
fix(sdk): re-dispatch a single in-flight user on recovery boot https://github.com/triggerdotdev/trigger.dev/pull/4768/files#top
Show all changes 3 commits https://github.com/triggerdotdev/trigger.dev/pull/4768/files
e9fe30c fix(sdk): re-dispatch a single in-flight user on recovery boot claude Aug 25, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4768/commits/e9fe30cfc38f40fe0d374a72e63c64279aeda798
c3055c9 Merge branch 'main' into claude/fix-oom-recovery-single-inflight-user matt-aitken Aug 26, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4768/commits/c3055c93c658a17b60536ed72c70e55e83b2a6c3
b866cd6 Merge branch 'main' into claude/fix-oom-recovery-single-inflight-user ericallam Aug 27, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4768/commits/b866cd6cf9f7adc16d6c482243a296f96883a495
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4768/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4768/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4768/files
brave-otters-recover.md https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-6c588332198bfc7f381753b61fcaa5afeaf16f0fb054fe478dc1311cba4a2b47
recovery-boot.mdx https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-a9bce6b4e6a2b3396493324d33a820720f98aaa06da74ca3a36b60bee3ef845f
ai.ts https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
recovery-boot.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-9813f1c6e36356396566f0bd17ff2d05867015b5be63fa551a28df2e0cef1844
.changeset/brave-otters-recover.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-6c588332198bfc7f381753b61fcaa5afeaf16f0fb054fe478dc1311cba4a2b47
View file https://github.com/triggerdotdev/trigger.dev/blob/b866cd6cf9f7adc16d6c482243a296f96883a495/.changeset/brave-otters-recover.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4768/{{ revealButtonHref }}
docs/ai-chat/patterns/recovery-boot.mdxhttps://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-a9bce6b4e6a2b3396493324d33a820720f98aaa06da74ca3a36b60bee3ef845f
View file https://github.com/triggerdotdev/trigger.dev/blob/b866cd6cf9f7adc16d6c482243a296f96883a495/docs/ai-chat/patterns/recovery-boot.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4768/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-a9bce6b4e6a2b3396493324d33a820720f98aaa06da74ca3a36b60bee3ef845f
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-a9bce6b4e6a2b3396493324d33a820720f98aaa06da74ca3a36b60bee3ef845f
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-a9bce6b4e6a2b3396493324d33a820720f98aaa06da74ca3a36b60bee3ef845f
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-a9bce6b4e6a2b3396493324d33a820720f98aaa06da74ca3a36b60bee3ef845f
packages/trigger-sdk/src/v3/ai.tshttps://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
View file https://github.com/triggerdotdev/trigger.dev/blob/b866cd6cf9f7adc16d6c482243a296f96883a495/packages/trigger-sdk/src/v3/ai.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4768/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
packages/trigger-sdk/test/recovery-boot.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-9813f1c6e36356396566f0bd17ff2d05867015b5be63fa551a28df2e0cef1844
View file https://github.com/triggerdotdev/trigger.dev/blob/b866cd6cf9f7adc16d6c482243a296f96883a495/packages/trigger-sdk/test/recovery-boot.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4768/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-9813f1c6e36356396566f0bd17ff2d05867015b5be63fa551a28df2e0cef1844
https://github.com/triggerdotdev/trigger.dev/pull/4768/files#diff-9813f1c6e36356396566f0bd17ff2d05867015b5be63fa551a28df2e0cef1844
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4768/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.