René's URL Explorer Experiment


Title: bug: task.batchTriggerAndWait(array) silently drops per-item debounce options · Issue #3304 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: bug: task.batchTriggerAndWait(array) silently drops per-item debounce options · Issue #3304 · triggerdotdev/trigger.dev

X Title: bug: task.batchTriggerAndWait(array) silently drops per-item debounce options · Issue #3304 · triggerdotdev/trigger.dev

Description: Provide environment information System: OS: Linux 6.17 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat) CPU: (6) arm64 unknown Memory: 14.04 GB / 31.27 GB Shell: 5.2.21 - /bin/bash Binaries: Node: 24.13.1 - /home/main/n/bin/node npm: 11.8.0...

Open Graph Description: Provide environment information System: OS: Linux 6.17 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat) CPU: (6) arm64 unknown Memory: 14.04 GB / 31.27 GB Shell: 5.2.21 - /bin/bash Binaries: Node: 24....

X Description: Provide environment information System: OS: Linux 6.17 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat) CPU: (6) arm64 unknown Memory: 14.04 GB / 31.27 GB Shell: 5.2.21 - /bin/bash Binaries: Node: 24....

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: task.batchTriggerAndWait(array) silently drops per-item debounce options","articleBody":"### Provide environment information\n\n System:                                                                                                                                                           \n    OS: Linux 6.17 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)                                                                                                    \n    CPU: (6) arm64 unknown                                      \n    Memory: 14.04 GB / 31.27 GB                                                                                                                                     \n    Shell: 5.2.21 - /bin/bash                                                                                                                                       \n  Binaries:                                                                                                                                                         \n    Node: 24.13.1 - /home/main/n/bin/node                                                                                                                           \n    npm: 11.8.0 - /home/main/n/bin/npm                               \n    pnpm: 10.28.2 - /home/main/.local/share/pnpm/pnpm  \n\n  SDK version: @trigger.dev/sdk@4.4.3   \n\n### Describe the bug\n\nWhen calling `task.batchTriggerAndWait(items)` with an array of items that include `debounce` in their `options`, the debounce is silently ignored. Every item creates a separate run instead of coalescing by debounce key. The TypeScript types accept `debounce` in per-item options, so there's no compile-time warning.\n\nThe same items passed via an async iterable (`task.batchTriggerAndWait(asyncGenerator())`) correctly apply debounce.\n\n**Root cause:** In `packages/trigger-sdk/src/v3/shared.ts`, the `batchTriggerAndWait_internal` function's **array branch** (around line 2484) constructs per-item options by explicitly listing fields, and `debounce` is missing from the list:\n\n```ts\nlockToVersion, queue, concurrencyKey, test, payloadType, delay, ttl,\ntags, maxAttempts, metadata, maxDuration, idempotencyKey,\nidempotencyKeyTTL, idempotencyKeyOptions, machine, priority, region\n```\n\nThe **streaming transforms** (e.g., `transformSingleTaskBatchItemsStreamForWait`) correctly include `debounce: item.options?.debounce`.\n\n### Reproduction repo\n\nhttps://github.com/triggerdotdev/trigger.dev/blob/2ba77d8/packages/trigger-sdk/src/v3/shared.ts#L2484-L2510\n\n### To reproduce\n\n\n```ts\nimport { task } from \"@trigger.dev/sdk\";\n\nconst myTask = task({\n  id: \"my-task\",\n  run: async (payload: { id: string }) => {\n    await new Promise((r) => setTimeout(r, 5000));\n    return { done: true };\n  },\n});\n\n// Parent task\nconst parent = task({\n  id: \"parent\",\n  run: async () => {\n    // These should coalesce into 1 run per key, but each creates a separate run\n    const results = await myTask.batchTriggerAndWait([\n      { payload: { id: \"a\" }, options: { debounce: { key: \"same-key\", delay: \"30s\", mode: \"trailing\" } } },\n      { payload: { id: \"b\" }, options: { debounce: { key: \"same-key\", delay: \"30s\", mode: \"trailing\" } } },\n      { payload: { id: \"c\" }, options: { debounce: { key: \"same-key\", delay: \"30s\", mode: \"trailing\" } } },\n    ]);\n\n    // Expected: 1 run (all 3 debounced to same key)\n    // Actual: 3 separate runs\n    console.log(\"Runs:\", results.runs.length);\n  },\n});\n```\n\n**Workaround:** Use an async iterable instead of an array:\n\n```ts\nasync function* items() {\n  yield { payload: { id: \"a\" }, options: { debounce: { key: \"same-key\", delay: \"30s\", mode: \"trailing\" } } };\n  yield { payload: { id: \"b\" }, options: { debounce: { key: \"same-key\", delay: \"30s\", mode: \"trailing\" } } };\n  yield { payload: { id: \"c\" }, options: { debounce: { key: \"same-key\", delay: \"30s\", mode: \"trailing\" } } };\n}\n\nconst results = await myTask.batchTriggerAndWait(items());\n// Correctly produces 1 run\n```\n\n### Additional information\n\nThe fix should be a one-line addition in `batchTriggerAndWait_internal`'s array branch — add `debounce: item.options?.debounce` to the per-item options object, matching what the streaming transforms already do.\n\n**Affected paths:**\n- `task.batchTriggerAndWait(array)` — broken\n- `tasks.batchTriggerAndWait(id, array)` — broken (same internal function)\n\n**Working paths:**\n- `task.batchTriggerAndWait(asyncIterable)` — works\n- `batch.triggerAndWait(items)` (heterogeneous) — works\n- `task.batchTrigger(array)` (fire-and-forget) — works\n","author":{"url":"https://github.com/danielr18","@type":"Person","name":"danielr18"},"datePublished":"2026-03-31T17:07:46Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/3304"}

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:2c3177a7-6c32-ca77-e146-332067dcb4f4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCF50:79AE7:49CA6B5:63772BC:6AFAF4BD
html-safe-noncee09e5f64846966c30c72082dae106b12ec5c8eb8c38792e977e627e177ba377d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjUwOjc5QUU3OjQ5Q0E2QjU6NjM3NzJCQzo2QUZBRjRCRCIsInZpc2l0b3JfaWQiOiIxMTE2OTE3ODczNTk2MTAxODIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacda0de4d74b73eee8842a036322858e61e7bb7c13859ffb49cb4f82fa59df8041
hovercard-subject-tagissue:4180874651
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/3304/issue_layout
twitter:imagehttps://opengraph.githubassets.com/96c461abc8a5d7827a8f16f67f4ac20a1d4a9e3654cd9599e11c0d01504bc0af/triggerdotdev/trigger.dev/issues/3304
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/96c461abc8a5d7827a8f16f67f4ac20a1d4a9e3654cd9599e11c0d01504bc0af/triggerdotdev/trigger.dev/issues/3304
og:image:altProvide environment information System: OS: Linux 6.17 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat) CPU: (6) arm64 unknown Memory: 14.04 GB / 31.27 GB Shell: 5.2.21 - /bin/bash Binaries: Node: 24....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanielr18
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
releasea85e96a83bed7871993e6b1ffda24105928eee17
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/issues/3304#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F3304
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%2F3304
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/3304
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/3304
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/3304
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/3304
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/3304
#4520https://github.com/triggerdotdev/trigger.dev/pull/4520
bug: task.batchTriggerAndWait(array) silently drops per-item debounce optionshttps://github.com/triggerdotdev/trigger.dev/issues/3304#top
#4520https://github.com/triggerdotdev/trigger.dev/pull/4520
https://github.com/danielr18
danielr18https://github.com/danielr18
on Mar 31, 2026https://github.com/triggerdotdev/trigger.dev/issues/3304#issue-4180874651
https://github.com/triggerdotdev/trigger.dev/blob/2ba77d8/packages/trigger-sdk/src/v3/shared.ts#L2484-L2510https://github.com/triggerdotdev/trigger.dev/blob/2ba77d8/packages/trigger-sdk/src/v3/shared.ts#L2484-L2510
https://github.com/winshaurya
winshauryahttps://github.com/winshaurya
on Apr 1, 2026https://github.com/triggerdotdev/trigger.dev/issues/3304#issuecomment-4172868024
@claudehttps://github.com/claude
https://github.com/itsaryanchauhan
itsaryanchauhanhttps://github.com/itsaryanchauhan
on May 10, 2026https://github.com/triggerdotdev/trigger.dev/issues/3304#issuecomment-4414870222
@GautamByteshttps://github.com/GautamBytes
#3307https://github.com/triggerdotdev/trigger.dev/issues/3307
matt-aitkenhttps://github.com/matt-aitken
completedhttps://github.com/triggerdotdev/trigger.dev/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#4520https://github.com/triggerdotdev/trigger.dev/pull/4520
on Aug 6, 2026https://github.com/triggerdotdev/trigger.dev/issues/3304#event-29078106786
Sign up for freehttps://github.com/signup?return_to=https://github.com/triggerdotdev/trigger.dev/issues/3304
Sign in to commenthttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/3304
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.