Packages

@trigger.dev/sdk

4.8.8 · 20 Nov 2026MIT1.7M / weekRepositoryHomepagenpmAtom feed

Your version

4.5.2

9 Jul 2026Where it was published

4.8.8 is the newest release of 4.x.

In short

7 security10 new10 fixed

  • Security

    Harden account and access-control handling across auth, RBAC, org membership, and impersonation.

  • Security

    Harden URL handling for alert webhooks and platform notifications.

  • Security

    Harden the query and prompt-override APIs and rate-limit the query ai-title endpoint.

  • Security

    Improve redaction of secrets from debug logs.

  • Security

    Tighten environment scoping when replaying a run.

  • Security

    Scope run, batch, and trigger lookups to the caller's tenant.

  • Security

    Honor the MCP server's --dev-only flag.

Release note

trigger.dev v4.5.2

Upgrade

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 Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.2

Release notes

Read the full release notes: trigger.dev/changelog/v4-5-2

Security

  • Security

    Harden account and access-control handling across auth, RBAC, org membership, and impersonation.

  • Security

    Harden URL handling for alert webhooks and platform notifications.

  • Security

    Harden the query and prompt-override APIs and rate-limit the query ai-title endpoint.

  • Security

    Improve redaction of secrets from debug logs.

  • Security

    Tighten environment scoping when replaying a run.

  • Security

    Scope run, batch, and trigger lookups to the caller's tenant.

  • Security

    Honor the MCP server's --dev-only flag.

Features

  • Bulk actions allow runs to be re-run based on a filter or run IDs. Now it's also available via API and in the official SDK. Create, list, retrieve, poll and abort bulk actions. Runs can be targeted to a different compute region, just like in the web UI.

Improvements

  • Large batch payloads now offload to object storage instead of riding inline in the trigger request. batchTrigger and batchTriggerAndWait (and the by-id and by-task variants) offload any per-item payload over 128KB before sending, the same way single trigger and triggerAndWait already do, so a big batch no longer blows past the API body limit.

  • Removed internal helpers that were only used by the end-of-life v3 self-hosted compute providers.

  • Add an onEvent callback to TriggerChatTransport / useTriggerChatTransport that emits typed lifecycle events for sends, stream connects, first chunk, and turn completion. Send-success metrics, time-to-first-token, and "sent but never answered" watchdogs become a few lines of client code.

    onEvent: (event) => {
      if (event.type === "message-sent") metrics.timing("chat.send_ms", event.durationMs);
      if (event.type === "first-chunk") metrics.timing("chat.ttft_ms", event.sinceSendMs ?? 0);
    },
  • The environment and branch selector dropdown will automatically revalidate when opened so that new branches show up.

  • A cleaner sign-in flow: request a magic link right from the login page, or continue with SSO.

  • Serve PostHog analytics from a same-origin /ph path that reverse-proxies to PostHog Cloud EU, following PostHog's first-party reverse-proxy guidance.

  • Refreshed the SSO & Directory Sync settings page layout and copy.

  • Migrated the webapp to Tailwind CSS v4 with a CSS-first @theme. Semantic color tokens are now CSS variables overridable per theme. Tailwind runs through @tailwindcss/postcss; plugins replaced or upgraded to v4-compatible versions.

  • Replaced raw charcoal-* Tailwind classes with semantic theme tokens across the dashboard. Adds surface, border, and text tokens to the themable layer so future themes only override CSS variables.

Bug fixes

  • Fix chat turns that throw, for example from an onTurnStart hook, leaking their message listener, which lost or duplicated messages sent during later turns.

  • Fix chat.agent and chat.createSession permanently dropping user messages when several arrived during a single turn: every buffered message is now dispatched as its own turn instead of only the first.

  • Fix chat continuation runs replaying already-answered messages: turns delivered while the run was suspended now advance the session.in resume cursor, so a new run picks up exactly where the previous one left off.

  • Fix chat.createSession swallowing a message sent shortly after stopping a turn: the turn's message listener now detaches when the stream settles, so those messages run as the next turn.

  • Anchor batch item run-ops residency on the batch's own friendlyId so a mid-batch flag change can no longer mint an item into a different physical store than its BatchTaskRun row.

  • AI generation cost now uses the exact provider-reported cost from OpenRouter/Vercel AI Gateway when present, instead of catalog pricing, so cache-discounted and fallback-routed requests match the amount the provider actually billed.

  • Deleting a project no longer triggers a slow database cleanup that could hang on projects with many runs.

  • Fixed the agent playground chat failing to send messages, with "Failed to fetch" errors in some environments. Messages now reach the agent reliably.

  • Deploying with an outdated CLI could produce an image that fails to start on every run. These deploys are now stopped before going live, with a message asking you to upgrade the CLI and re-deploy.

  • Runs resuming after a wait no longer fail with TASK_EXECUTION_ABORTED when the database is briefly unreachable; the resume endpoint returns a retryable response for transient infrastructure errors instead of a permanent one.

All packages: v4.5.2

@trigger.dev/build, @trigger.dev/core, @trigger.dev/plugins, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.