René's URL Explorer Experiment


Title: fix(sdk,core): chat.agent delivery, idempotency, and recovery fixes by ericallam · Pull Request #3891 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(sdk,core): chat.agent delivery, idempotency, and recovery fixes by ericallam · Pull Request #3891 · triggerdotdev/trigger.dev

X Title: fix(sdk,core): chat.agent delivery, idempotency, and recovery fixes by ericallam · Pull Request #3891 · triggerdotdev/trigger.dev

Description: Summary A batch of reliability fixes for chat.agent: A user message sent while the agent is streaming is no longer delivered twice (which could run a duplicate turn). Input appends carry an idempotency key (X-Part-Id) so a retried send can't duplicate a message. onTurnComplete now fires on errored turns with the thrown error attached, and the failed turn's user message is persisted so it isn't lost on the next run. Stopping a generation clears the streaming state, so a page reload doesn't replay the stopped turn. Custom agents and manual chat.writeTurnComplete callers trim the output stream, sending a custom action no longer leaves a second stream reader running, a long-lived watch subscription no longer grows its dedupe set without bound, promoting a queued message to steering no longer risks a double-send, and runs keep the full set of dashboard tags. The X-Part-Id header is accepted by current servers (they just don't dedupe on it yet), so this is safe to ship ahead of the matching server change.

Open Graph Description: Summary A batch of reliability fixes for chat.agent: A user message sent while the agent is streaming is no longer delivered twice (which could run a duplicate turn). Input appends carry an idempo...

X Description: Summary A batch of reliability fixes for chat.agent: A user message sent while the agent is streaming is no longer delivered twice (which could run a duplicate turn). Input appends carry an idempo...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:af38cecb-a9f9-bd0b-9666-cd682bdc490c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE248:F2EBF:E80B7:137408:6AFBDC2C
html-safe-nonce42b63fd0ead293cbfbeed2e1747d37e314852a9d17a90dbd4a8710e6665268c1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjQ4OkYyRUJGOkU4MEI3OjEzNzQwODo2QUZCREMyQyIsInZpc2l0b3JfaWQiOiIzNzk3MzYyNjQzMjYyMjMzNjQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc51d2d5b6b4a3d595c18e6faf7f3ff4ac083cc333eec23a86d3c88f9ff5801de
hovercard-subject-tagpull_request:3840382191
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/3891/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 A batch of reliability fixes for chat.agent: A user message sent while the agent is streaming is no longer delivered twice (which could run a duplicate turn). Input appends carry an idempo...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None18742cb872ec73544356e60359266b67aafece70c4ce008042e06227924cdd07
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
release820be804f18e1ef3940bd74a00d41d73d02e2b91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/3891/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F3891%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%2F3891%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/3891/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3891/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3891/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
fix/chat-agent-hardeninghttps://github.com/triggerdotdev/trigger.dev/tree/fix/chat-agent-hardening
Conversation 17 https://github.com/triggerdotdev/trigger.dev/pull/3891
Commits 3 https://github.com/triggerdotdev/trigger.dev/pull/3891/commits
Checks 66 https://github.com/triggerdotdev/trigger.dev/pull/3891/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/3891/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3891/files
fix(sdk,core): chat.agent delivery, idempotency, and recovery fixes https://github.com/triggerdotdev/trigger.dev/pull/3891/files#top
Show all changes 3 commits https://github.com/triggerdotdev/trigger.dev/pull/3891/files
8c3dff6 fix(sdk,core): harden chat.agent message delivery and idempotency ericallam Jun 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3891/commits/8c3dff6bb8bf13a5134cc16ed9f7887336e39c66
2905009 fix(sdk,core): keep errored chat turns recoverable and bound stream g… ericallam Jun 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3891/commits/2905009769545fba6876744a77319834322a875e
5122b06 fix(sdk,core): address review feedback on chat.agent hardening ericallam Jun 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3891/commits/5122b0695432285261c6531fdac78c0eec3f32c4
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/3891/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3891/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3891/files
chat-agent-hardening.md https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-12166daf31bd16ee061f5ad97e2cc7c14d4aa98e282aca450d99968042cdb1f4
index.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a3dd70188f22b9a8944982bd01922236614664bcbd18c2ae9f83f4beb5d4d5c7
runStream.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a39862a1fd92dcce12a5b075973bf8a25fe1b62bd4d35a24c9ac7291a06222b6
index.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-aea5188c63ee879c98812b25e64bfb0aae734e6880d37d21bfef34e20d423bab
manager.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
noopManager.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-731956ca93410d24bf9ad7bcd49eb23eab817ca6f841573bec98bf5a887c338d
types.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-5f1eb5e5ecad68e9241e387462d2e6582095145e9b596de601618428230b6bca
test-session-stream-manager.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-599d0e2e3bfc12718243dfe52f2b6cf01bef1c3c8152dc8d54bc46133a50574b
ai.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
chat-client.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a48ddb8a7b58db88fdaddb729968985bdad12108519751cb49a567560ab917da
chat-react.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-bd66505962858e47bbc1ab2ae3b1422b22cd1365d0ff53a87e201b3c8d661372
chat.test.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-8a256830aa33eacdad4d7a46d7ef31368424eccb570236cc5b08f7e0a7876738
chat.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
sessions.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-8af596a38434468ac4e041546dd46b781678e67d23ea42d4fe3e92266e59f871
mockChatAgent.test.ts https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-57bae465d6d60ad1ba7ad0a3d65dbd8febd0b8ad573c71def72beff99a0f6687
.changeset/chat-agent-hardening.mdhttps://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-12166daf31bd16ee061f5ad97e2cc7c14d4aa98e282aca450d99968042cdb1f4
View file https://github.com/triggerdotdev/trigger.dev/blob/5122b0695432285261c6531fdac78c0eec3f32c4/.changeset/chat-agent-hardening.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3891/{{ revealButtonHref }}
packages/core/src/v3/apiClient/index.tshttps://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a3dd70188f22b9a8944982bd01922236614664bcbd18c2ae9f83f4beb5d4d5c7
View file https://github.com/triggerdotdev/trigger.dev/blob/5122b0695432285261c6531fdac78c0eec3f32c4/packages/core/src/v3/apiClient/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3891/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a3dd70188f22b9a8944982bd01922236614664bcbd18c2ae9f83f4beb5d4d5c7
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a3dd70188f22b9a8944982bd01922236614664bcbd18c2ae9f83f4beb5d4d5c7
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a3dd70188f22b9a8944982bd01922236614664bcbd18c2ae9f83f4beb5d4d5c7
packages/core/src/v3/apiClient/runStream.tshttps://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a39862a1fd92dcce12a5b075973bf8a25fe1b62bd4d35a24c9ac7291a06222b6
View file https://github.com/triggerdotdev/trigger.dev/blob/5122b0695432285261c6531fdac78c0eec3f32c4/packages/core/src/v3/apiClient/runStream.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3891/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a39862a1fd92dcce12a5b075973bf8a25fe1b62bd4d35a24c9ac7291a06222b6
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a39862a1fd92dcce12a5b075973bf8a25fe1b62bd4d35a24c9ac7291a06222b6
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a39862a1fd92dcce12a5b075973bf8a25fe1b62bd4d35a24c9ac7291a06222b6
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-a39862a1fd92dcce12a5b075973bf8a25fe1b62bd4d35a24c9ac7291a06222b6
packages/core/src/v3/sessionStreams/index.tshttps://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-aea5188c63ee879c98812b25e64bfb0aae734e6880d37d21bfef34e20d423bab
View file https://github.com/triggerdotdev/trigger.dev/blob/5122b0695432285261c6531fdac78c0eec3f32c4/packages/core/src/v3/sessionStreams/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3891/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-aea5188c63ee879c98812b25e64bfb0aae734e6880d37d21bfef34e20d423bab
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-aea5188c63ee879c98812b25e64bfb0aae734e6880d37d21bfef34e20d423bab
packages/core/src/v3/sessionStreams/manager.tshttps://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
View file https://github.com/triggerdotdev/trigger.dev/blob/5122b0695432285261c6531fdac78c0eec3f32c4/packages/core/src/v3/sessionStreams/manager.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3891/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-7a847f78fd18ad01abe0e1b500eb4632f54564e71403249e804c0914c7882f70
packages/core/src/v3/sessionStreams/noopManager.tshttps://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-731956ca93410d24bf9ad7bcd49eb23eab817ca6f841573bec98bf5a887c338d
View file https://github.com/triggerdotdev/trigger.dev/blob/5122b0695432285261c6531fdac78c0eec3f32c4/packages/core/src/v3/sessionStreams/noopManager.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3891/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-731956ca93410d24bf9ad7bcd49eb23eab817ca6f841573bec98bf5a887c338d
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-731956ca93410d24bf9ad7bcd49eb23eab817ca6f841573bec98bf5a887c338d
packages/core/src/v3/sessionStreams/types.tshttps://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-5f1eb5e5ecad68e9241e387462d2e6582095145e9b596de601618428230b6bca
View file https://github.com/triggerdotdev/trigger.dev/blob/5122b0695432285261c6531fdac78c0eec3f32c4/packages/core/src/v3/sessionStreams/types.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3891/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-5f1eb5e5ecad68e9241e387462d2e6582095145e9b596de601618428230b6bca
https://github.com/triggerdotdev/trigger.dev/pull/3891/files#diff-5f1eb5e5ecad68e9241e387462d2e6582095145e9b596de601618428230b6bca
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3891/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3891/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.