René's URL Explorer Experiment


Title: feat(sdk): chat.headStart handover for customAgent and createSession by ericallam · Pull Request #3963 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: feat(sdk): chat.headStart handover for customAgent and createSession by ericallam · Pull Request #3963 · triggerdotdev/trigger.dev

X Title: feat(sdk): chat.headStart handover for customAgent and createSession by ericallam · Pull Request #3963 · triggerdotdev/trigger.dev

Description: Summary chat.headStart (the warm step-1 fast path) previously handed its response over only to chat.agent. This extends handover to the other two backends: chat.customAgent consumes it with conversation.consumeHandover({ payload }) on turn 0, and chat.createSession surfaces it as turn.handover (call turn.complete() with no source to finalize a pure-text handover). The low-level chat.waitForHandover() and accumulator.applyHandover() are exported for hand-rolled loops. It also adds triggerConfig to chat.headStart() and chat.openSession(), so the auto-triggered handover-prepare run inherits tags, queue, machine, and the other session run options the same way chat.createStartSessionAction() does. The chat:{chatId} tag is prepended automatically. Because the session is created once on the first head-start turn (idempotent on the chat id), this is the only place those options can be set for a head-start chat's lifetime. Fix: tool-call resume When the warm step-1 hands over a pending tool call (rather than pure text), the agent loop resumes that tool round. For it to merge cleanly the pipe threads the spliced partial as originalMessages, so the resumed tool-output chunk attaches to the handed-over tool-call instead of throwing No tool invocation found. MessageAccumulator.addResponse now also dedups by id (replace-in-place), so the persisted history doesn't carry a duplicate assistant message when the resumed response reuses the partial's id. Incorporates the triggerConfig work from #3933 by @saasjesus, with createStartSessionAction extended to also forward maxDuration, region, and lockToVersion so the two session entry points stay consistent. Verified end-to-end against a local environment: handover (pure-text and tool-call) on both new backends, a chat.agent regression pass, and triggerConfig tags and queue landing on the run.

Open Graph Description: Summary chat.headStart (the warm step-1 fast path) previously handed its response over only to chat.agent. This extends handover to the other two backends: chat.customAgent consumes it with convers...

X Description: Summary chat.headStart (the warm step-1 fast path) previously handed its response over only to chat.agent. This extends handover to the other two backends: chat.customAgent consumes it with convers...

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

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:e358d200-203f-7a83-906c-3f4cc9841e99
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBEE2:25618:78D06:A8DD1:6AFB824F
html-safe-nonce36b6f3cba9889d4ac9937ab327af0c62dd08e1dc88ad3ac8eb34bfb3684b0fe5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUUyOjI1NjE4Ojc4RDA2OkE4REQxOjZBRkI4MjRGIiwidmlzaXRvcl9pZCI6IjkxNTgyNzgzOTQ3Nzk3NjMyODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9aba14b65119ec15d43d4d172f921018399bb8e0f186969074329a3822ec85de
hovercard-subject-tagpull_request:3875171247
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/3963/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 chat.headStart (the warm step-1 fast path) previously handed its response over only to chat.agent. This extends handover to the other two backends: chat.customAgent consumes it with convers...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneef32892d4269fb87b55e81cc4ba8d86e0f16aa28446ffbf46cba8be5179ab188
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
releasebc3703b4dcbe820d1284ef63c88b001c850be25e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/3963/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F3963%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%2F3963%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/3963/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3963/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3963/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-11007-chatheadstart-handover-for-customagent-and-createsessionhttps://github.com/triggerdotdev/trigger.dev/tree/feature/tri-11007-chatheadstart-handover-for-customagent-and-createsession
Conversation 19 https://github.com/triggerdotdev/trigger.dev/pull/3963
Commits 2 https://github.com/triggerdotdev/trigger.dev/pull/3963/commits
Checks 68 https://github.com/triggerdotdev/trigger.dev/pull/3963/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/3963/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3963/files
feat(sdk): chat.headStart handover for customAgent and createSession https://github.com/triggerdotdev/trigger.dev/pull/3963/files#top
Show all changes 2 commits https://github.com/triggerdotdev/trigger.dev/pull/3963/files
c4bc008 feat(sdk): chat.headStart handover for customAgent and createSession ericallam Jun 16, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3963/commits/c4bc008c6caceaad137a37dd346e079123fdbd7f
32f0536 fix(sdk): guard no-source turn.complete() to final handover turns ericallam Jun 16, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3963/commits/32f05360ed8ce03e5baaa060ba18d32752912fa1
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/3963/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3963/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3963/files
chat-headstart-custom-backends.md https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-53cc7e4ca9edaccd9ae29f112bdaf43cf1296aec093837f7be54835ff1f631b6
chat-headstart-trigger-config.md https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-0546bf88f1a6c5e5238935e8de909198f10d1c4075f3be39b8d730224e4ca052
ai.ts https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
chat-server.test.ts https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-285bb70c688bf6dc3d3e34034620e85dfd77e2b36567fa8b1c2cc7db9ba583b9
chat-server.ts https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
createStartSessionAction.test.ts https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-63adcc808c29f4944babf34f89ded766bfbcbcf97f4a7dc832be58692807437c
chatHandoverBackends.test.ts https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-8189f005080dbfcc0c8459e37111ab40a01e9166f76d0a3ee1002375dd4f19dc
.changeset/chat-headstart-custom-backends.mdhttps://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-53cc7e4ca9edaccd9ae29f112bdaf43cf1296aec093837f7be54835ff1f631b6
View file https://github.com/triggerdotdev/trigger.dev/blob/32f05360ed8ce03e5baaa060ba18d32752912fa1/.changeset/chat-headstart-custom-backends.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3963/{{ revealButtonHref }}
.changeset/chat-headstart-trigger-config.mdhttps://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-0546bf88f1a6c5e5238935e8de909198f10d1c4075f3be39b8d730224e4ca052
View file https://github.com/triggerdotdev/trigger.dev/blob/32f05360ed8ce03e5baaa060ba18d32752912fa1/.changeset/chat-headstart-trigger-config.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3963/{{ revealButtonHref }}
packages/trigger-sdk/src/v3/ai.tshttps://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
View file https://github.com/triggerdotdev/trigger.dev/blob/32f05360ed8ce03e5baaa060ba18d32752912fa1/packages/trigger-sdk/src/v3/ai.ts
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3963/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3963/files
packages/trigger-sdk/src/v3/chat-server.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-285bb70c688bf6dc3d3e34034620e85dfd77e2b36567fa8b1c2cc7db9ba583b9
View file https://github.com/triggerdotdev/trigger.dev/blob/32f05360ed8ce03e5baaa060ba18d32752912fa1/packages/trigger-sdk/src/v3/chat-server.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3963/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-285bb70c688bf6dc3d3e34034620e85dfd77e2b36567fa8b1c2cc7db9ba583b9
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-285bb70c688bf6dc3d3e34034620e85dfd77e2b36567fa8b1c2cc7db9ba583b9
packages/trigger-sdk/src/v3/chat-server.tshttps://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
View file https://github.com/triggerdotdev/trigger.dev/blob/32f05360ed8ce03e5baaa060ba18d32752912fa1/packages/trigger-sdk/src/v3/chat-server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3963/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-2a5ecaa706016614dfb6966b983452dfc2db84a6e51afb639233cfd1207cf8fc
packages/trigger-sdk/src/v3/createStartSessionAction.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-63adcc808c29f4944babf34f89ded766bfbcbcf97f4a7dc832be58692807437c
View file https://github.com/triggerdotdev/trigger.dev/blob/32f05360ed8ce03e5baaa060ba18d32752912fa1/packages/trigger-sdk/src/v3/createStartSessionAction.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3963/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-63adcc808c29f4944babf34f89ded766bfbcbcf97f4a7dc832be58692807437c
https://github.com/triggerdotdev/trigger.dev/pull/3963/files#diff-63adcc808c29f4944babf34f89ded766bfbcbcf97f4a7dc832be58692807437c
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3963/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3963/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.