René's URL Explorer Experiment


Title: fix(core,sdk): stop chat.agent losing messages during recovery by ericallam · Pull Request #4907 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(core,sdk): stop chat.agent losing messages during recovery by ericallam · Pull Request #4907 · triggerdotdev/trigger.dev

X Title: fix(core,sdk): stop chat.agent losing messages during recovery by ericallam · Pull Request #4907 · triggerdotdev/trigger.dev

Description: Summary When a chat.agent run boots to continue a session (a version handover, or a retry after a crash), it replays the unacknowledged user messages off session.in and dispatches them itself. A previous change stopped the live tail from re-answering those same messages by folding them into the resume cursor in one step. That cursor is what the next boot reads to know where to resume, and folding in every recovered message at once let it advance past a message the run had not answered yet. So if the run answered the first recovered message, wrote its turn boundary, then crashed before dispatching the rest, the next boot resumed past those messages and they were never answered. Fix A recovered message is now claimed on the session-stream router instead of folded into the cursor. A claim does two independent things: it drops the message however late the live tail re-delivers it, so a recovered message is never answered twice; it holds the resume cursor behind that message until the boot has dispatched it, so a turn boundary never publishes a cursor past a message still waiting for a turn. The boot settles each claim as it dispatches the message, or right away for a message it folds into the seed chain or deliberately skips, so the cursor only advances over messages that have actually been handled. A claimed record whose route re-read never arrives over the tail degrades to being answered twice on the next boot, never to being dropped. Covered by router-level unit tests for the claim/settle floor and a chat.agent boot test asserting the cursor published after the first recovered turn stays behind the still-unanswered ones.

Open Graph Description: Summary When a chat.agent run boots to continue a session (a version handover, or a retry after a crash), it replays the unacknowledged user messages off session.in and dispatches them itself. A pr...

X Description: Summary When a chat.agent run boots to continue a session (a version handover, or a retry after a crash), it replays the unacknowledged user messages off session.in and dispatches them itself. A pr...

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

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:31801829-77eb-6a38-664c-0a890c83fb4b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id81AE:35FB3F:3396826:4964B4B:6AFAFB42
html-safe-nonceb056b4cb6bd52d63441a036b9d6581cce8686f408d642fc11d3925a56d55a641
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUFFOjM1RkIzRjozMzk2ODI2OjQ5NjRCNEI6NkFGQUZCNDIiLCJ2aXNpdG9yX2lkIjoiNTk3OTc2NjE2MTA1ODY4MDk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac860c3a6d82c5970a9ec57c6f825668a22e700866c6dd0d33bf13f4cb03794008
hovercard-subject-tagpull_request:4473577451
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/4907/files
twitter:imagehttps://avatars.githubusercontent.com/u/534?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/534?s=400&v=4
og:image:altSummary When a chat.agent run boots to continue a session (a version handover, or a retry after a crash), it replays the unacknowledged user messages off session.in and dispatches them itself. A pr...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None54f7a6886649661c85eee945cca0773566bfb4065370e0429b7c8f7204184650
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
releasecf8450eb633ec589502c42ff6f4072e40db65da3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4907/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4907%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%2F4907%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/4907/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4907/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4907/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
feature/tri-13752-chatagent-version-handover-duplicates-messages-and-turnshttps://github.com/triggerdotdev/trigger.dev/tree/feature/tri-13752-chatagent-version-handover-duplicates-messages-and-turns
Conversation 19 https://github.com/triggerdotdev/trigger.dev/pull/4907
Commits 1 https://github.com/triggerdotdev/trigger.dev/pull/4907/commits
Checks 70 https://github.com/triggerdotdev/trigger.dev/pull/4907/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4907/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4907/files
fix(core,sdk): stop chat.agent losing messages during recovery https://github.com/triggerdotdev/trigger.dev/pull/4907/files#top
Show all changes 1 commit https://github.com/triggerdotdev/trigger.dev/pull/4907/files
0f84cb6 fix(core,sdk): stop chat.agent losing messages during recovery ericallam Sep 8, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4907/commits/0f84cb6f439d97ddcf6e2e50efa24dbbc17379eb
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4907/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4907/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4907/files
chat-agent-recovery-message-loss.md https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-594d56879bb004d36181c0a8c921d1c1f57de2a136d435eae2ecc7dbc351cc7f
router.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1069c46425e65b53fa0d1a154e312345b67dd9ef1e8d9e8b9ea88e507cf72336
router.ts https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
ai.ts https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
chat-agent-recovery-floor.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-13c67c5b4b2680fd4ffce7e68c5cf2c2156177f49d8e87d6c6d6396c9b88a926
.changeset/chat-agent-recovery-message-loss.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-594d56879bb004d36181c0a8c921d1c1f57de2a136d435eae2ecc7dbc351cc7f
View file https://github.com/triggerdotdev/trigger.dev/blob/0f84cb6f439d97ddcf6e2e50efa24dbbc17379eb/.changeset/chat-agent-recovery-message-loss.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4907/{{ revealButtonHref }}
packages/core/src/v3/sessionStreams/router.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1069c46425e65b53fa0d1a154e312345b67dd9ef1e8d9e8b9ea88e507cf72336
View file https://github.com/triggerdotdev/trigger.dev/blob/0f84cb6f439d97ddcf6e2e50efa24dbbc17379eb/packages/core/src/v3/sessionStreams/router.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4907/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1069c46425e65b53fa0d1a154e312345b67dd9ef1e8d9e8b9ea88e507cf72336
packages/core/src/v3/sessionStreams/router.tshttps://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
View file https://github.com/triggerdotdev/trigger.dev/blob/0f84cb6f439d97ddcf6e2e50efa24dbbc17379eb/packages/core/src/v3/sessionStreams/router.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4907/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4907/files
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-7e0b91091bf4dbcde4a0484d7698f87635dd589e12100917487d9fc84cc242ee
packages/trigger-sdk/src/v3/ai.tshttps://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
View file https://github.com/triggerdotdev/trigger.dev/blob/0f84cb6f439d97ddcf6e2e50efa24dbbc17379eb/packages/trigger-sdk/src/v3/ai.ts
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4907/files
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4907/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
https://github.com/triggerdotdev/trigger.dev/pull/4907/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4907/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4907/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.