René's URL Explorer Experiment


Title: fix(core,cli): stop chat.agent uncaught exception on mid-stream abort by ericallam · Pull Request #3792 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(core,cli): stop chat.agent uncaught exception on mid-stream abort by ericallam · Pull Request #3792 · triggerdotdev/trigger.dev

X Title: fix(core,cli): stop chat.agent uncaught exception on mid-stream abort by ericallam · Pull Request #3792 · triggerdotdev/trigger.dev

Description: Summary A chat.agent turn that gets aborted mid-stream (stop generation, idle suspend, cancellation) could surface a TASK_RUN_UNCAUGHT_EXCEPTION — TypeError: Invalid state: Unable to enqueue — in the dashboard. The run kept working, but the exceptions were loud and confusing. Root cause The realtime stream writer batches chunks through @s2-dev/streamstore's BatchTransform, which holds them for a short linger window before flushing. When the turn's abort signal fires while a record is still buffered, the stream's writable is aborted and the transform's readable controller is closed — but the pending linger setTimeout still fires and calls controller.enqueue() on the dead controller, throwing from a timer callback where nothing can catch it. Fixed upstream in @s2-dev/streamstore@0.22.10, which wraps the linger flush in a try/catch that discards the closed-controller error. This bumps the dependency across core, the CLI, and the webapp, and adds a regression test against the real BatchTransform. Verified end-to-end: a mid-stream stop that previously failed the run with TASK_RUN_UNCAUGHT_EXCEPTION now leaves the run healthy.

Open Graph Description: Summary A chat.agent turn that gets aborted mid-stream (stop generation, idle suspend, cancellation) could surface a TASK_RUN_UNCAUGHT_EXCEPTION — TypeError: Invalid state: Unable to enqueue — in t...

X Description: Summary A chat.agent turn that gets aborted mid-stream (stop generation, idle suspend, cancellation) could surface a TASK_RUN_UNCAUGHT_EXCEPTION — TypeError: Invalid state: Unable to enqueue — in t...

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

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:86597ad1-cfdf-5faf-ed88-b09868d57204
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDBC2:D1FA2:339B8:48C94:6AFAF010
html-safe-nonce2c6469071d772607337a64a5c8450e032f2bda42643e10c28f3bdd49ded7be9d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkMyOkQxRkEyOjMzOUI4OjQ4Qzk0OjZBRkFGMDEwIiwidmlzaXRvcl9pZCI6IjY1MjczOTg5MDQ5MTkxNTg4MDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac053676cfecf92b19c966a438af0962d6b844bcc4e3646152e669a1af65ba9c60
hovercard-subject-tagpull_request:3782062283
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/3792/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 chat.agent turn that gets aborted mid-stream (stop generation, idle suspend, cancellation) could surface a TASK_RUN_UNCAUGHT_EXCEPTION — TypeError: Invalid state: Unable to enqueue — in t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
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
release12fff95459b24b0f882a66698ee6a36a5934d247
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/3792/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F3792%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%2F3792%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/3792/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3792/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3792/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-abort-uncaught-exceptionhttps://github.com/triggerdotdev/trigger.dev/tree/fix/chat-agent-abort-uncaught-exception
Conversation 9 https://github.com/triggerdotdev/trigger.dev/pull/3792
Commits 2 https://github.com/triggerdotdev/trigger.dev/pull/3792/commits
Checks 51 https://github.com/triggerdotdev/trigger.dev/pull/3792/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/3792/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3792/files
fix(core,cli): stop chat.agent uncaught exception on mid-stream abort https://github.com/triggerdotdev/trigger.dev/pull/3792/files#top
Show all changes 2 commits https://github.com/triggerdotdev/trigger.dev/pull/3792/files
1bd0b79 fix(core,cli): stop chat.agent uncaught exception on mid-stream abort ericallam Jun 1, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3792/commits/1bd0b794c2fd3dfe7c84950005cde32125a6b05b
be71fea test(core): drop fragile s2 BatchTransform regression test ericallam Jun 1, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3792/commits/be71feae03bbc73c9d91103ec2b4035510bac295
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/3792/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3792/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3792/files
s2-batch-transform-linger-fix.md https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-f1819ad839286fca6ded18a0c07f4795f3d87b738f9a85462f7386827bd6cc9e
package.json https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-7f07c1a8c7d8bf8a62c48e4913ae22619918c9d72fc3b12aa75aa5c03217612b
package.json https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-146a4e04ce046d5184406f9f5f9833062c07c29abaae05a918ab5e5eb84b2071
package.json https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7
pnpm-lock.yaml https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bb
.changeset/s2-batch-transform-linger-fix.mdhttps://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-f1819ad839286fca6ded18a0c07f4795f3d87b738f9a85462f7386827bd6cc9e
View file https://github.com/triggerdotdev/trigger.dev/blob/be71feae03bbc73c9d91103ec2b4035510bac295/.changeset/s2-batch-transform-linger-fix.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3792/{{ revealButtonHref }}
apps/webapp/package.jsonhttps://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-7f07c1a8c7d8bf8a62c48e4913ae22619918c9d72fc3b12aa75aa5c03217612b
View file https://github.com/triggerdotdev/trigger.dev/blob/be71feae03bbc73c9d91103ec2b4035510bac295/apps/webapp/package.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3792/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-7f07c1a8c7d8bf8a62c48e4913ae22619918c9d72fc3b12aa75aa5c03217612b
https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-7f07c1a8c7d8bf8a62c48e4913ae22619918c9d72fc3b12aa75aa5c03217612b
packages/cli-v3/package.jsonhttps://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-146a4e04ce046d5184406f9f5f9833062c07c29abaae05a918ab5e5eb84b2071
View file https://github.com/triggerdotdev/trigger.dev/blob/be71feae03bbc73c9d91103ec2b4035510bac295/packages/cli-v3/package.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3792/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-146a4e04ce046d5184406f9f5f9833062c07c29abaae05a918ab5e5eb84b2071
https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-146a4e04ce046d5184406f9f5f9833062c07c29abaae05a918ab5e5eb84b2071
packages/core/package.jsonhttps://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7
View file https://github.com/triggerdotdev/trigger.dev/blob/be71feae03bbc73c9d91103ec2b4035510bac295/packages/core/package.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3792/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7
https://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7
pnpm-lock.yamlhttps://github.com/triggerdotdev/trigger.dev/pull/3792/files#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bb
View file https://github.com/triggerdotdev/trigger.dev/blob/be71feae03bbc73c9d91103ec2b4035510bac295/pnpm-lock.yaml
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3792/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3792/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.