Trigger.dev v4.8.6

Bun 1.4 bytecode compilation for faster run starts, `concurrencyKey` as an object for multi-limit runs, 3 bug fixes, and 16 server improvements.

2 highlights, 9 improvements, 3 bug fixes, and 16 server changes.

Highlights

JWT audience for token signing and verification

Tokens signed with the SDK or the user-actor helper now accept an explicit audience claim, which is validated on verification. This tightens the boundary between tokens issued for different contexts.

concurrencyKey now accepts an object

A single run can now be governed by multiple concurrency limits at once, each keyed by a different value. default is the run's own concurrency key; every other entry names a declared limit and gives it its own key:


await myTask.trigger(payload, {
concurrencyKey: { default: sessionId, [orgLimit.name]: orgId },
});

This lets you cap per-session and per-organization at the same time without separate task definitions. A plain string key still works as before.

Improvements

  • Deploys on the bun-1.4 runtime now compile the run worker and your task files into a Bun executable with bytecode, so runs start faster. import.meta.url and __dirname still resolve under /app, so files read next to your code must be in the image as before (e.g. with additionalFiles). Set build.bunBytecode: false in trigger.config.ts to opt out.
  • trigger dev and trigger deploy no longer crash with spawn ... ENOENT when Bun is installed via Homebrew, mise, or similar (not under ~/.bun). The CLI now falls back to bun on your PATH, shows a readable error if Bun still cannot start in trigger dev, and skips local skill discovery with a warning in trigger deploy.
  • Bundled task files now keep their project-relative paths (e.g. /app/src/trigger/tasks.mjs) when the CLI runs from outside the project, such as npx trigger.dev deploy. Previously they could land under a path that separated them from files copied by additionalFiles, breaking reads relative to import.meta.url.
  • Deploys on node-24 and node-26 runtimes now build a Node.js compile cache for your bundled code during the image build, reducing startup compilation time before runs execute. node-22 deploys are unchanged.
  • Runs whose process the kernel killed for running out of memory are now reported as TASK_PROCESS_OOM_KILLED instead of a generic exit-after-SIGKILL, when the OOM kill is recorded in the run's cgroup.
  • Deployed task processes now receive secret environment variables only with the run, not at process startup.
  • Builds use esbuild 0.28. TypeScript parameter properties are now emitted as class fields, and source map paths are URL-encoded.
  • webhooks.notion() endpoints now accept Notion's verification request. The verification_token Notion sends is stored as the endpoint's signing secret so you can paste it back into Notion to complete setup. Redeploy existing Notion endpoints to pick this up.
  • chat.agent now passes chatId, turn, and clientData to all callbacks a model can be called from, including compaction and pending message hooks that previously lacked context. The mockChatAgent turn methods now also wait for onTurnComplete and transcript saves before returning, so tests can assert on what those hooks recorded.

Bug fixes

  • Fix child_process.fork() and spawn(process.execPath, ...) in compiled bun-1.4 deploys. They were restarting the run worker instead of Bun, causing the child to never execute and the task to hang. process.execPath now points at the image's bun binary, matching the behavior in uncompiled deploys.

  • Fix webhook verification for webhooks.brex() (now reads webhook-id, webhook-timestamp, and webhook-signature headers instead of svix-*) and webhooks.composio() (now signs with the secret's raw text rather than base64-decoding it). Redeploy existing Brex and Composio endpoints to pick this up.

  • Fix chat.agent on AI SDK 7 sending the same input on every step after a prepareStep returned messages. Later steps were missing the newest tool results, causing the model to repeat the same tool call until the step limit.

    If you call chat.compact() from your own prepareStep, pass responseMessages through: chat.compact(messages, steps, { ...options, responseMessages }).

Server changes

These changes are included in the v4.8.6 Docker image and are already live on Trigger.dev Cloud:

  • Ask the Dashboard Agent to watch a deploy, task, or model and it proposes alerts you confirm one by one. Dashboard widget menus have a new Watch action to start an alert from the widget's query.
  • Select up to 100 environment variable values on the Environment variables page and delete them together. The confirmation lists every value and its environment.
  • Compare the environment variables of two environments and see only the keys that differ, with secrets shown as matching or different but never revealed. Copy values from one environment to the other, one key or up to 100 at a time.
  • A new "Needs attention" tab on the Environment variables page lists keys that are empty, missing compared with other environments, recently changed, or replaceable with OIDC, with copy, delete, and ignore actions.
  • Add opt-in per-environment encryption keys for runtime and build environment variables, with rotation and migration support.
  • Add "Ignored branches" to Git settings: pull requests from branches matching glob patterns (e.g. dependabot/**) no longer get a preview deployment.
  • Organization owners can now require multi-factor authentication for every member, and prompt for a fresh MFA check before members view environment variables, create personal access tokens, or change security settings.
  • Add a hosted MCP server so AI clients can work with your projects and runs. It is opt-in per deployment. Runs started through the hosted MCP server are recorded with the mcp-remote trigger source.
  • Personal access tokens can now expire on a custom date picked from a calendar, in addition to the preset lifetimes.
  • A scheduled task's schedules now appear on their own tab next to Runs, with every column visible. The side panel shows the schedule when the task has exactly one, and a count with a link when it has more.
  • Runs start faster when the platform is busy.
  • Revoking or expiring a personal access token now also invalidates the environment JWTs and run, batch, and session tokens minted from it.
  • Fix waitpoint callback URLs returning authentication errors when created inside preview branch runs, including previously issued URLs.
  • Fix runs getting stuck waiting for a version when triggered in the seconds after a deploy.
  • Fix sandbox task retries stalling when retry delays are short.
  • A task that returns while its run is resuming from a wait it did not await (for example a wait raced against a timeout) can now fail right away instead of staying in an executing state until heartbeat timeout. Enable with RUN_ENGINE_STALE_COMPLETION_MODE=enforce on the webapp.

How to upgrade

Update the trigger.dev/* packages to v4.8.6 using your package manager:


npx trigger.dev@latest update # npm
pnpm dlx trigger.dev@latest update # pnpm
yarn dlx trigger.dev@latest update # yarn
bunx trigger.dev@latest update # bun

Self-hosted users: update your Docker image to ghcr.io/triggerdotdev/trigger.dev:v4.8.6.

Deploy your first agent today

Get set up in minutes, either on your own or with your coding agent.

Get started for free