René's URL Explorer Experiment


Title: bug: a raw 64-character idempotencyKey skips run scope · Issue #5130 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: bug: a raw 64-character idempotencyKey skips run scope · Issue #5130 · triggerdotdev/trigger.dev

X Title: bug: a raw 64-character idempotencyKey skips run scope · Issue #5130 · triggerdotdev/trigger.dev

Description: Provide environment information System: macOS 27.2, arm64 Node: 26.13.0 npm: 11.20.0 @trigger.dev/core: 4.8.5 (same code on main at 2fbd5c7) Describe the bug The docs say a raw string passed as idempotencyKey defaults to run scope. A str...

Open Graph Description: Provide environment information System: macOS 27.2, arm64 Node: 26.13.0 npm: 11.20.0 @trigger.dev/core: 4.8.5 (same code on main at 2fbd5c7) Describe the bug The docs say a raw string passed as ide...

X Description: Provide environment information System: macOS 27.2, arm64 Node: 26.13.0 npm: 11.20.0 @trigger.dev/core: 4.8.5 (same code on main at 2fbd5c7) Describe the bug The docs say a raw string passed as ide...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: a raw 64-character idempotencyKey skips run scope","articleBody":"### Provide environment information\n\n```\nSystem: macOS 27.2, arm64\nNode: 26.13.0\nnpm: 11.20.0\n@trigger.dev/core: 4.8.5 (same code on main at 2fbd5c7)\n```\n\n### Describe the bug\n\nThe docs say a raw string passed as `idempotencyKey` defaults to `run` scope. A string of exactly 64 characters doesn't get it.\n\n`makeIdempotencyKey` calls `isIdempotencyKey`, which returns true for any 64-character string ([idempotencyKeys.ts#L53-L62](https://github.com/triggerdotdev/trigger.dev/blob/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d/packages/core/src/v3/idempotencyKeys.ts#L53-L62), [#L91-L105](https://github.com/triggerdotdev/trigger.dev/blob/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d/packages/core/src/v3/idempotencyKeys.ts#L91-L105)). So the key goes to the API unchanged, without the parent run ID. The catalog doesn't know the string either, so `trigger_internal` sends no `idempotencyKeyOptions` ([shared.ts#L2442-L2445](https://github.com/triggerdotdev/trigger.dev/blob/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d/packages/trigger-sdk/src/v3/shared.ts#L2442-L2445)). The key ends up global.\n\nA SHA-256 hex digest is 64 characters, and hashing your own dedup identity is a common way to build a key (#4626 says the same). So `idempotencyKey: sha256(orderId)` inside a task dedupes across parent runs. If a replay of the parent, or the next run of a scheduled parent, triggers the child with the same digest within the 30-day default TTL, it gets the existing child run back instead of a new one. With a key of any other length it would get a new run.\n\nExpected: a raw string gets run scope whatever its length, as the docs say. #4626 removed this assumption from `reset()`. The trigger path still has it.\n\n### Reproduction repo\n\nNo repo needed, the script is below. Source: https://github.com/triggerdotdev/trigger.dev/blob/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d/packages/core/src/v3/idempotencyKeys.ts#L53-L62\n\n### To reproduce\n\nThe script uses the published `@trigger.dev/core` and makes no API calls. It sets a task context for two different parent runs and prints the key the SDK would send in each.\n\n```js\nimport { createHash } from \"node:crypto\";\nimport { makeIdempotencyKey, taskContext } from \"@trigger.dev/core/v3\";\n\nconst insideParentRun = (runId) =>\n  taskContext.setGlobalTaskContext({\n    ctx: { run: { id: runId }, attempt: { number: 1 } },\n    worker: {},\n  });\n\nconst shortKey = \"order-1234\";\nconst digestKey = createHash(\"sha256\").update(\"order-1234\").digest(\"hex\");\n\nconst keysFor = async (runId) => {\n  insideParentRun(runId);\n  return {\n    short: await makeIdempotencyKey(shortKey),\n    digest: await makeIdempotencyKey(digestKey),\n  };\n};\n\nconst runA = await keysFor(\"run_parent_a\");\nconst runB = await keysFor(\"run_parent_b\");\n\nconsole.log(`digest key length: ${digestKey.length}`);\nconsole.log(`10-char key, run-scoped (differs per parent run): ${runA.short !== runB.short}`);\nconsole.log(`64-char key, run-scoped (differs per parent run): ${runA.digest !== runB.digest}`);\nconsole.log(`64-char key sent as-is: ${runA.digest === digestKey}`);\n```\n\n```\nnpm i @trigger.dev/core@4.8.5 && node repro.mjs\n```\n\nOutput:\n\n```\ndigest key length: 64\n10-char key, run-scoped (differs per parent run): true\n64-char key, run-scoped (differs per parent run): false\n64-char key sent as-is: true\n```\n\n### Suggested fix\n\nDo what #4626 did for `reset()`: treat a 64-character string as already hashed only when the catalog knows it (`getIdempotencyKeyOptions(key) !== undefined`). Otherwise hash it with run scope, like any other raw string.\n\nOne case gets worse with that change: a key made with `idempotencyKeys.create()` in another process, or in an earlier run, since the catalog is cleared at each run boundary. For example, a key created in a backend and passed to a task in the payload. The catalog doesn't know it, so it would be hashed a second time. If that case matters, the SDK needs a marker it can check at trigger time, such as a prefix on keys from `create()`. Until then, one line in the idempotency docs saying that 64-character raw strings are sent as-is would help.\n\n### Additional information\n\nI found this by reading the source after seeing #4626, and checked it with the script above. I haven't tested it against a deployed project.\n","author":{"url":"https://github.com/heykadirhan","@type":"Person","name":"heykadirhan"},"datePublished":"2026-11-16T06:43:40Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/5130"}

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:8db97b6c-8026-4487-9e98-390335ec2fab
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8C38:3ACD90:501779:775DD3:6AFAEAE9
html-safe-nonce520e33659cdda306b1eeb56ba0451961708930ebf11eb7d17f9cd16a5d5e215b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzM4OjNBQ0Q5MDo1MDE3Nzk6Nzc1REQzOjZBRkFFQUU5IiwidmlzaXRvcl9pZCI6IjY5MTcxMDk1NDg1NzAwNDUxNjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7bf890a586c9cbab81835b818189658fd3cc4d12dd029ce79ec616a7d0e6b89f
hovercard-subject-tagissue:6415799364
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/5130/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ae07f7a726bb70216441c01af6382a634fa1dbcc243f17d82d946194f1343260/triggerdotdev/trigger.dev/issues/5130
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ae07f7a726bb70216441c01af6382a634fa1dbcc243f17d82d946194f1343260/triggerdotdev/trigger.dev/issues/5130
og:image:altProvide environment information System: macOS 27.2, arm64 Node: 26.13.0 npm: 11.20.0 @trigger.dev/core: 4.8.5 (same code on main at 2fbd5c7) Describe the bug The docs say a raw string passed as ide...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameheykadirhan
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/5130#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F5130
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%2F5130
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/5130
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/5130
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/5130
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/5130
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/5130
bug: a raw 64-character idempotencyKey skips run scopehttps://github.com/triggerdotdev/trigger.dev/issues/5130#top
https://github.com/heykadirhan
heykadirhanhttps://github.com/heykadirhan
on Nov 16, 2026https://github.com/triggerdotdev/trigger.dev/issues/5130#issue-6415799364
idempotencyKeys.ts#L53-L62https://github.com/triggerdotdev/trigger.dev/blob/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d/packages/core/src/v3/idempotencyKeys.ts#L53-L62
#L91-L105https://github.com/triggerdotdev/trigger.dev/blob/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d/packages/core/src/v3/idempotencyKeys.ts#L91-L105
shared.ts#L2442-L2445https://github.com/triggerdotdev/trigger.dev/blob/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d/packages/trigger-sdk/src/v3/shared.ts#L2442-L2445
#4626https://github.com/triggerdotdev/trigger.dev/pull/4626
#4626https://github.com/triggerdotdev/trigger.dev/pull/4626
trigger.dev/packages/core/src/v3/idempotencyKeys.tshttps://github.com/triggerdotdev/trigger.dev/blob/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d/packages/core/src/v3/idempotencyKeys.ts#L53-L62
2fbd5c7https://github.com/triggerdotdev/trigger.dev/commit/2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d
#4626https://github.com/triggerdotdev/trigger.dev/pull/4626
#4626https://github.com/triggerdotdev/trigger.dev/pull/4626
Sign up for freehttps://github.com/signup?return_to=https://github.com/triggerdotdev/trigger.dev/issues/5130
Sign in to commenthttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/5130
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.