René's URL Explorer Experiment


Title: feat(chat): expose endAndContinue to custom agents by gtremper · Pull Request #4647 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: feat(chat): expose endAndContinue to custom agents by gtremper · Pull Request #4647 · triggerdotdev/trigger.dev

X Title: feat(chat): expose endAndContinue to custom agents by gtremper · Pull Request #4647 · triggerdotdev/trigger.dev

Description: Summary Raw chat.customAgent() loops can now call chat.endAndContinue() to move the Session to a fresh run. The managed loop already used the same server operation through chat.requestUpgrade(), but raw loops could not call it directly. Call the method between turns after detaching input listeners from the old run. Await it and return immediately. Unconsumed .in records stay on the Session for the continuation run. I put this on the chat namespace next to the other raw chat primitives. Happy to move it if maintainers prefer a different API placement. Testing pnpm exec vitest run in packages/trigger-sdk (374 tests) Focused webapp Session E2E tests (3 tests) pnpm run build in packages/trigger-sdk Webapp typecheck pnpm run format pnpm run lint Checklist I followed the contributing guide The PR title follows the convention I tested the change Changelog Allow custom chat agents to rotate to a new task version without dropping unconsumed Session input.

Open Graph Description: Summary Raw chat.customAgent() loops can now call chat.endAndContinue() to move the Session to a fresh run. The managed loop already used the same server operation through chat.requestUpgrade(), bu...

X Description: Summary Raw chat.customAgent() loops can now call chat.endAndContinue() to move the Session to a fresh run. The managed loop already used the same server operation through chat.requestUpgrade(), bu...

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

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:8228d8f5-3c8d-d3b9-6df0-121f28037b7d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB5B4:358701:6973773:8CCD1E8:6AFB059C
html-safe-nonce5c3c0e612e90dc1f13081a2f4e53fd3d8be23e3209b87c8c41ee4d031864c4fd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUI0OjM1ODcwMTo2OTczNzczOjhDQ0QxRTg6NkFGQjA1OUMiLCJ2aXNpdG9yX2lkIjoiODY5MjczNTUyMDc4Nzg1ODg0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac48a9a18f18f67a96ed2525f2ce45fd506aabb7d766b1fda36688ea761f311d2c
hovercard-subject-tagpull_request:4293205411
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/4647/files
twitter:imagehttps://avatars.githubusercontent.com/u/1009134?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1009134?s=400&v=4
og:image:altSummary Raw chat.customAgent() loops can now call chat.endAndContinue() to move the Session to a fresh run. The managed loop already used the same server operation through chat.requestUpgrade(), bu...
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/4647/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4647%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%2F4647%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/4647/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4647/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4647/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
triggerdotdev:mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
gtremper:graham/chat-custom-agent-continuehttps://github.com/gtremper/trigger.dev/tree/graham/chat-custom-agent-continue
Conversation 20 https://github.com/triggerdotdev/trigger.dev/pull/4647
Commits 9 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits
Checks 67 https://github.com/triggerdotdev/trigger.dev/pull/4647/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4647/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4647/files
feat(chat): expose endAndContinue to custom agents https://github.com/triggerdotdev/trigger.dev/pull/4647/files#top
Show all changes 9 commits https://github.com/triggerdotdev/trigger.dev/pull/4647/files
fcefcf5 feat(chat): expose endAndContinue to custom agents gtremper Aug 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/fcefcf52d0681318d53b88115b2bbcf4c6733388
da59647 docs(chat): clarify endAndContinue lifecycle gtremper Aug 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/da596472d39e92151b21fbe4fd89c0a0430e0c5f
03b84d1 docs(chat): tighten endAndContinue guidance gtremper Aug 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/03b84d1f9565d9d1b1168a79506a24bb46e95851
e1a416e test(chat): cover endAndContinue with real sessions gtremper Aug 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/e1a416eb9e209a187f58b7fe7d2765fdbe146987
adf37ab test(chat): use allowed run query gtremper Aug 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/adf37ab0ce6be9834e5eab89f6a4f2747fb8eeee
b729865 fix(chat): guard handoff during managed sessions gtremper Aug 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/b729865e5f8b01b586f475a714de0613455d58d3
5839cc3 fix(chat): hold iterator guard through pending reads gtremper Aug 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/5839cc3a7badf116978f6e3be2593a148dfd352c
31810b7 fix(chat): suppress turns after iterator return gtremper Aug 17, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/31810b738cb0122ee0031744a2aca3887ba3ed55
8322031 Merge remote-tracking branch 'origin/main' into pr4647 ericallam Aug 27, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4647/commits/83220316da7063cf0a0b860d368959272cc8bbfb
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4647/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4647/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4647/files
chat-custom-agent-end-and-continue.md https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-caabffdb6ddb9b43926a90dc351dd8933ca38dec04a2ea0592e2a4375f315583
testChatAgent.ts https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-c7a78a9d01c9015c0fd69ccf5618e22f07c906a164c83ac921afc1cf39674336
session-agent.e2e.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-bb98c3448a3da78c3d7e6151cfc8b1fb1b846b92c75ca7425b12a472645f112d
custom-agents.mdx https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-aa22c9fedc21c400cd9c3eba314803d27850039367de1469b442a2bba7c96650
version-upgrades.mdx https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-dfe872cfcf1e5e9d84bb66d6873b5c96ba2ac991ba418aeea27e0d5eb2437ac4
reference.mdx https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-58e648685c48d39e8d19f714ccdb9a6eca84024f3490b656f62a0ff535a22f3d
ai.ts https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-1a41664a01679e09d7182b5d113a193cea9eaad0f2092f68b4beca081617a53a
chat-end-and-continue.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-eb1f81c4ff38d1b8e860232a4f735e2389a460436b4549b17eb49d84c446aaa0
.changeset/chat-custom-agent-end-and-continue.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-caabffdb6ddb9b43926a90dc351dd8933ca38dec04a2ea0592e2a4375f315583
View file https://github.com/gtremper/trigger.dev/blob/83220316da7063cf0a0b860d368959272cc8bbfb/.changeset/chat-custom-agent-end-and-continue.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4647/{{ revealButtonHref }}
apps/webapp/test/helpers/testChatAgent.tshttps://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-c7a78a9d01c9015c0fd69ccf5618e22f07c906a164c83ac921afc1cf39674336
View file https://github.com/gtremper/trigger.dev/blob/83220316da7063cf0a0b860d368959272cc8bbfb/apps/webapp/test/helpers/testChatAgent.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4647/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-c7a78a9d01c9015c0fd69ccf5618e22f07c906a164c83ac921afc1cf39674336
https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-c7a78a9d01c9015c0fd69ccf5618e22f07c906a164c83ac921afc1cf39674336
apps/webapp/test/session-agent.e2e.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-bb98c3448a3da78c3d7e6151cfc8b1fb1b846b92c75ca7425b12a472645f112d
View file https://github.com/gtremper/trigger.dev/blob/83220316da7063cf0a0b860d368959272cc8bbfb/apps/webapp/test/session-agent.e2e.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4647/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-bb98c3448a3da78c3d7e6151cfc8b1fb1b846b92c75ca7425b12a472645f112d
https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-bb98c3448a3da78c3d7e6151cfc8b1fb1b846b92c75ca7425b12a472645f112d
https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-bb98c3448a3da78c3d7e6151cfc8b1fb1b846b92c75ca7425b12a472645f112d
https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-bb98c3448a3da78c3d7e6151cfc8b1fb1b846b92c75ca7425b12a472645f112d
https://github.com/triggerdotdev/trigger.dev/pull/4647/files#diff-bb98c3448a3da78c3d7e6151cfc8b1fb1b846b92c75ca7425b12a472645f112d
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4647/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.