René's URL Explorer Experiment


Title: fix(sdk,webapp): stop chat losing a message sent right after an action by ericallam · Pull Request #4234 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(sdk,webapp): stop chat losing a message sent right after an action by ericallam · Pull Request #4234 · triggerdotdev/trigger.dev

X Title: fix(sdk,webapp): stop chat losing a message sent right after an action by ericallam · Pull Request #4234 · triggerdotdev/trigger.dev

Description: Summary Sending a chat message immediately after an action (for example an undo) could make the message's response vanish from the UI. The transport opened a response stream that closed on the earlier turn's completion instead of waiting for the send's own turn. The agent still produced and persisted the answer, so it reappeared on refresh. Same "disappearing message" class as #4176, different cause. Fix A send's response stream had no way to tell whether a turn-complete belonged to its turn. POST /realtime/v1/sessions/:id/in/append now returns the appended record's sequence number, and the transport skips any turn-complete whose session-in-event-id (the agent's committed .in cursor) is below that seq, closing only on its own turn. Older webapps omit the seq, in which case the transport falls back to the previous behavior, so the SDK and server can ship independently. Because the fix spans the SDK and the server, both a webapp deploy and an SDK release are needed for the full effect. Verified end to end with the ai-chat reference app: undo-then-immediate-send loses the follow-up's answer before the fix and streams it inline after, with a revert-the-guard run reproducing the loss on the same script. Unit tests cover the skip and the no-seq fallback.

Open Graph Description: Summary Sending a chat message immediately after an action (for example an undo) could make the message's response vanish from the UI. The transport opened a response stream that closed on the ...

X Description: Summary Sending a chat message immediately after an action (for example an undo) could make the message's response vanish from the UI. The transport opened a response stream that closed on ...

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

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:783f32b4-044a-640e-fc82-10633f3ae2bc
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB0F2:188056:1C34F:2A638:6AFB08E3
html-safe-nonceaed784db50017c5666067cc1ccea28b26e37aa45c0770379b0f02d7b93ae0b7c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEYyOjE4ODA1NjoxQzM0RjoyQTYzODo2QUZCMDhFMyIsInZpc2l0b3JfaWQiOiI2MTQ3MTc1NTM0Nzg3NDk2MTYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1ac0c16135dc641ee65871fc5e42041a3dee6ff56720eab3ac3744e41e640acb
hovercard-subject-tagpull_request:4034627060
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/4234/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 Sending a chat message immediately after an action (for example an undo) could make the message's response vanish from the UI. The transport opened a response stream that closed on the ...
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/4234/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4234%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%2F4234%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/4234/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4234/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4234/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-11952-chatagent-transport-a-send-right-after-an-action-closes-itshttps://github.com/triggerdotdev/trigger.dev/tree/feature/tri-11952-chatagent-transport-a-send-right-after-an-action-closes-its
Conversation 12 https://github.com/triggerdotdev/trigger.dev/pull/4234
Commits 1 https://github.com/triggerdotdev/trigger.dev/pull/4234/commits
Checks 63 https://github.com/triggerdotdev/trigger.dev/pull/4234/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4234/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4234/files
fix(sdk,webapp): stop chat losing a message sent right after an action https://github.com/triggerdotdev/trigger.dev/pull/4234/files#top
Show all changes 1 commit https://github.com/triggerdotdev/trigger.dev/pull/4234/files
96e5ad3 fix(sdk,webapp): stop chat losing a message sent right after an action ericallam Jul 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4234/commits/96e5ad3c172500a912c15dc1784b0bd6bb13df8f
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4234/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4234/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4234/files
chat-turn-correlation.md https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0be30e5477b2a989741a8eb6c99675193f61dfb6dc4d0b4cf52657eaa26e610d
realtime.v1.sessions.$session.$io.append.ts https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0f31cb7c5d193a771c2af6f814361f451a16e428a50c2711c569e8320cde1c05
resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.playground.realtime.v1.sessions.$session.$io.append.ts https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0eee32892449bc4f51dd5bf16f15c11e84173cd0ad75cc65a00d61d684dcf5d1
s2realtimeStreams.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-f62c67f5d371932bf6e6a036ddeaa65df31d997dd5855ae1d0125f3e73c7a445
client-protocol.mdx https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-819a1ba7afd2b06146ffe45804f1a7995d727954e4103eb48e0074e14c6ca057
chat.ts https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
chat-turn-correlation.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-7f28b60cfc61c520c729147f0192233411f7d2969da7e4f84d968b9bb8dfa0a6
.changeset/chat-turn-correlation.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0be30e5477b2a989741a8eb6c99675193f61dfb6dc4d0b4cf52657eaa26e610d
View file https://github.com/triggerdotdev/trigger.dev/blob/96e5ad3c172500a912c15dc1784b0bd6bb13df8f/.changeset/chat-turn-correlation.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4234/{{ revealButtonHref }}
apps/webapp/app/routes/realtime.v1.sessions.$session.$io.append.tshttps://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0f31cb7c5d193a771c2af6f814361f451a16e428a50c2711c569e8320cde1c05
View file https://github.com/triggerdotdev/trigger.dev/blob/96e5ad3c172500a912c15dc1784b0bd6bb13df8f/apps/webapp/app/routes/realtime.v1.sessions.%24session.%24io.append.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4234/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0f31cb7c5d193a771c2af6f814361f451a16e428a50c2711c569e8320cde1c05
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4234/files
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0f31cb7c5d193a771c2af6f814361f451a16e428a50c2711c569e8320cde1c05
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0f31cb7c5d193a771c2af6f814361f451a16e428a50c2711c569e8320cde1c05
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0f31cb7c5d193a771c2af6f814361f451a16e428a50c2711c569e8320cde1c05
...ojects.$projectParam.env.$envParam.playground.realtime.v1.sessions.$session.$io.append.tshttps://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0eee32892449bc4f51dd5bf16f15c11e84173cd0ad75cc65a00d61d684dcf5d1
View file https://github.com/triggerdotdev/trigger.dev/blob/96e5ad3c172500a912c15dc1784b0bd6bb13df8f/apps/webapp/app/routes/resources.orgs.%24organizationSlug.projects.%24projectParam.env.%24envParam.playground.realtime.v1.sessions.%24session.%24io.append.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4234/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0eee32892449bc4f51dd5bf16f15c11e84173cd0ad75cc65a00d61d684dcf5d1
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0eee32892449bc4f51dd5bf16f15c11e84173cd0ad75cc65a00d61d684dcf5d1
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-0eee32892449bc4f51dd5bf16f15c11e84173cd0ad75cc65a00d61d684dcf5d1
apps/webapp/app/services/realtime/s2realtimeStreams.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-f62c67f5d371932bf6e6a036ddeaa65df31d997dd5855ae1d0125f3e73c7a445
View file https://github.com/triggerdotdev/trigger.dev/blob/96e5ad3c172500a912c15dc1784b0bd6bb13df8f/apps/webapp/app/services/realtime/s2realtimeStreams.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4234/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-f62c67f5d371932bf6e6a036ddeaa65df31d997dd5855ae1d0125f3e73c7a445
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-f62c67f5d371932bf6e6a036ddeaa65df31d997dd5855ae1d0125f3e73c7a445
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-f62c67f5d371932bf6e6a036ddeaa65df31d997dd5855ae1d0125f3e73c7a445
docs/ai-chat/client-protocol.mdxhttps://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-819a1ba7afd2b06146ffe45804f1a7995d727954e4103eb48e0074e14c6ca057
View file https://github.com/triggerdotdev/trigger.dev/blob/96e5ad3c172500a912c15dc1784b0bd6bb13df8f/docs/ai-chat/client-protocol.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4234/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-819a1ba7afd2b06146ffe45804f1a7995d727954e4103eb48e0074e14c6ca057
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4234/files
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-819a1ba7afd2b06146ffe45804f1a7995d727954e4103eb48e0074e14c6ca057
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-819a1ba7afd2b06146ffe45804f1a7995d727954e4103eb48e0074e14c6ca057
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-819a1ba7afd2b06146ffe45804f1a7995d727954e4103eb48e0074e14c6ca057
packages/trigger-sdk/src/v3/chat.tshttps://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
View file https://github.com/triggerdotdev/trigger.dev/blob/96e5ad3c172500a912c15dc1784b0bd6bb13df8f/packages/trigger-sdk/src/v3/chat.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4234/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
https://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-fcabf40729dcab619f789d289291c0187dcc76366e51bf53dfe5bb6225587420
packages/trigger-sdk/test/chat-turn-correlation.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4234/files#diff-7f28b60cfc61c520c729147f0192233411f7d2969da7e4f84d968b9bb8dfa0a6
View file https://github.com/triggerdotdev/trigger.dev/blob/96e5ad3c172500a912c15dc1784b0bd6bb13df8f/packages/trigger-sdk/test/chat-turn-correlation.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4234/{{ revealButtonHref }}
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4234/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.