René's URL Explorer Experiment


Title: 4.6.0+ with zod ≥ 4.4: every run completion waits a fixed 6 s (cancels 31 s) because FLUSH/CANCEL IPC acks are rejected · Issue #4979 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: 4.6.0+ with zod ≥ 4.4: every run completion waits a fixed 6 s (cancels 31 s) because FLUSH/CANCEL IPC acks are rejected · Issue #4979 · triggerdotdev/trigger.dev

X Title: 4.6.0+ with zod ≥ 4.4: every run completion waits a fixed 6 s (cancels 31 s) because FLUSH/CANCEL IPC acks are rejected · Issue #4979 · triggerdotdev/trigger.dev

Description: What happens Since 4.6.0, in projects that resolve zod to 4.4 or newer, every run on a managed worker takes ~6.1 s longer between the task finishing and the completion reaching the engine. Compute (usage_duration) is unchanged; execution...

Open Graph Description: What happens Since 4.6.0, in projects that resolve zod to 4.4 or newer, every run on a managed worker takes ~6.1 s longer between the task finishing and the completion reaching the engine. Compute ...

X Description: What happens Since 4.6.0, in projects that resolve zod to 4.4 or newer, every run on a managed worker takes ~6.1 s longer between the task finishing and the completion reaching the engine. Compute ...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/4979

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"4.6.0+ with zod ≥ 4.4: every run completion waits a fixed 6 s (cancels 31 s) because FLUSH/CANCEL IPC acks are rejected","articleBody":"**What happens**\n\nSince 4.6.0, in projects that resolve `zod` to 4.4 or newer, every run on a managed worker takes ~6.1 s longer between the task finishing and the completion reaching the engine. Compute (`usage_duration`) is unchanged; `execution_duration - usage_duration` goes from ~0.1–0.25 s on 4.5.15 to 6.10–6.29 s on 4.6.0 and 4.6.2, for every task, warm or cold. Cancellation is hit harder: the CANCEL ack budget is 30 s + 1 s. Still present on `main` (c2b7a72) and in 4.6.4: `zodIpc.ts` is unchanged since #4039.\n\nWe see it on every task we run: the gap appears exactly at the SDK upgrade and never drops below ~6.09 s, where it was ~0.1 s before.\n\n**Why**\n\n`TaskRunProcess.cleanup()` sends `FLUSH` to the task run process with `sendWithAck(..., timeoutInMs + 1_000)` (5 s + 1 s) before `completeRunAttempt`. `FLUSH` and `CANCEL` declare `callback: z.void()`, so the child acks with `{ type: \"ACK\", id, message: undefined }`. `process.send` JSON-serialises the packet and drops the `message` key. In `zodIpc.ts` the `Packet` schema declares `message: z.any()`; under zod 3 a `z.any()` key was optional at parse time, under zod 4.4+ it is required (see the version table below). Since #4039, `zodIpc.ts` imports `zod/v4`, and `@trigger.dev/core` usually resolves `zod` from the user's project (`^3.25.56 || ^4.0.0`). So any project that resolves zod 4.4 or newer (this repo pins 4.5.4) fails `Packet.safeParse` on every ack, `#handlePacket` returns silently, and `sendWithAck` waits out its full timeout. Nothing is logged because the rejection is swallowed by `tryCatch`.\n\n**Repro (zod alone)**\n\n```\nzod 4.6.5: z.discriminatedUnion(\"type\", [...ACK { message: z.any(), id }]).safeParse({ type: \"ACK\", id: 0 })\n  -> message: Invalid input: expected nonoptional, received undefined\n```\n\nThe same schema across versions (root `zod` and `zod/v4` behave the same):\n\n```\nzod 3.25.76  accepted\nzod 4.3.6    accepted\nzod 4.4.0    REJECTED\nzod 4.5.4    REJECTED\n```\n\nThat is probably why this has gone unreported: projects on zod 3.x or 4.0–4.3 are unaffected, and billed compute (`usage_duration`) does not change.\n\n**Repro (two ZodIpcConnections over a forked child, 3 s ack timeouts)**\n\n```\ncore 4.6.2:  FLUSH: REJECTED after 3002ms (sendWithAck() timeout)   CANCEL: REJECTED after 3001ms\ncore 4.5.15: FLUSH: ack in 2ms                                       CANCEL: ack in 0ms\n```\n\n**End-to-end confirmation (trigger dev, same server, same one-task project, six runs each)**\n\n| worker | task compute | gap between task end and completion |\n|---|---|---|\n| stock `trigger.dev@4.6.2` | 14 ms | 6.27 – 6.34 s |\n| same install, only `message: z.any().optional()` on the ACK packet in core's dist | 14 ms | 0.40 – 0.46 s |\n\nThe dev controller runs the same `TaskRunProcess.cleanup()` → `FLUSH` → `completeRunAttempt` sequence as the managed controller, and that line is the only change between the two workers.\n\n**Fix**\n\nMake the ACK packet's `message` optional again (`z.any().optional()`), which restores the zod 3 type and runtime behaviour. Only the ACK packet can legitimately carry `undefined` (the two void callbacks); no message catalog entry has an undefined payload, so the `messageSchema.payload: z.unknown()` envelope is unaffected. Happy to open a PR with this change and a JSON-round-trip test that fails on `main` and passes with the fix.\n","author":{"url":"https://github.com/marcus-dk","@type":"Person","name":"marcus-dk"},"datePublished":"2026-09-25T11:15:09Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/4979"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0b7bda7a-fb45-485e-047a-798f0128e8ea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCE84:137FBB:4D53FBA:67DCC04:6AFAF07F
html-safe-noncea2c3651a77810f39521ac6a0c6693fce2be97fad2f68d4dfad1bc569ee6d3c3b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTg0OjEzN0ZCQjo0RDUzRkJBOjY3RENDMDQ6NkFGQUYwN0YiLCJ2aXNpdG9yX2lkIjoiNDg3MTQxODI3MDQ1NzcyMDk1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2a4216242aa3c7643e9c74134ce49602585e0e00ffa7e0c6610ff5db55e2ab6d
hovercard-subject-tagissue:5582023528
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/4979/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d73b1b4f9e5d18b65a7b425e44b0afc60852b8e5997d153e1183f91a9809c132/triggerdotdev/trigger.dev/issues/4979
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d73b1b4f9e5d18b65a7b425e44b0afc60852b8e5997d153e1183f91a9809c132/triggerdotdev/trigger.dev/issues/4979
og:image:altWhat happens Since 4.6.0, in projects that resolve zod to 4.4 or newer, every run on a managed worker takes ~6.1 s longer between the task finishing and the completion reaching the engine. Compute ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarcus-dk
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
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
disable-turbofalse
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
react-app-nameissues

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/issues/4979#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F4979
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%2Fissues%2F4979
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/4979
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/4979
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/4979
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
https://github.com/triggerdotdev/trigger.dev
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/4979
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/4979
#4980https://github.com/triggerdotdev/trigger.dev/pull/4980
4.6.0+ with zod ≥ 4.4: every run completion waits a fixed 6 s (cancels 31 s) because FLUSH/CANCEL IPC acks are rejectedhttps://github.com/triggerdotdev/trigger.dev/issues/4979#top
#4980https://github.com/triggerdotdev/trigger.dev/pull/4980
https://github.com/marcus-dk
marcus-dkhttps://github.com/marcus-dk
on Sep 25, 2026https://github.com/triggerdotdev/trigger.dev/issues/4979#issue-5582023528
c2b7a72https://github.com/triggerdotdev/trigger.dev/commit/c2b7a72180bbb2dcbc31caa8539e0ca8f8e9e9b8
#4039https://github.com/triggerdotdev/trigger.dev/pull/4039
#4039https://github.com/triggerdotdev/trigger.dev/pull/4039
cardernehttps://github.com/carderne
on Sep 28, 2026https://github.com/triggerdotdev/trigger.dev/issues/4979#event-31979771110
fix(core): accept IPC acks for void callbacks under zod 4.4+https://github.com/NERLOE/trigger.dev/commit/a993aeb8af44c6885d934a875da4bb3c61c63f1b
https://docs.github.com/articles/closing-issues-via-commit-messages
a993aebhttps://github.com/NERLOE/trigger.dev/commit/a993aeb8af44c6885d934a875da4bb3c61c63f1b
matt-aitkenhttps://github.com/matt-aitken
completedhttps://github.com/triggerdotdev/trigger.dev/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#4980https://github.com/triggerdotdev/trigger.dev/pull/4980
on Sep 28, 2026https://github.com/triggerdotdev/trigger.dev/issues/4979#event-31981151694
Sign up for freehttps://github.com/signup?return_to=https://github.com/triggerdotdev/trigger.dev/issues/4979
Sign in to commenthttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/4979
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.