Releases: triggerdotdev/trigger.dev
Release list
trigger.dev v4.5.9
trigger.dev v4.5.9
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.9
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-9
What's changed
Breaking changes
- Setting a queue concurrency limit higher than your environment limit is now rejected with an error instead of being silently reduced to the environment limit, so a queue never looks like it has more capacity than it can get. Limits already saved are unchanged. (#4131)
Improvements
-
trigger mcpnow always starts the MCP server, and the interactive install wizard has moved behindtrigger mcp --install. Previously the wizard opened whenever stdout was a terminal, so any MCP host that spawns the command over a pseudo-terminal waited on a server that never started and eventually timed out. (#4131) -
Ask whether an environment is healthy and get an answer instead of a wall of charts.
trigger report healthreturns a verdict on three questions: is work flowing, are the runs that start succeeding, and is the telemetry fresh enough to trust either answer. When something looks wrong it names the most likely cause and a next action. (#4131)npx trigger.dev@latest report health --env prod --period 24h
The verdict is computed server side, so the CLI, the new
get_reportMCP tool, andGET /api/v1/reports/healthall return the same text with the same sparklines. In MCP hosts that support prompts,reportis also available as a slash command. -
Prevent build debug logs from including environment variable values. (#4420)
-
Send the running CLI version when checking for platform notifications so notices can be limited to compatible CLI releases. (#4407)
-
Correct the
expirationTimedocs onauth.createPublicTokenand the trigger-token helpers: a number is a Unix timestamp in seconds, not milliseconds. (#4388)
Server changes
These changes affect the self-hosted Docker image and Trigger.dev Cloud:
- A queue's concurrency limit can now be set as a percentage of your environment limit, from the dashboard or the API. Percentage limits track the environment limit, so raising or lowering it re-divides capacity without you editing every queue. (#4131)
- See how every queue in an environment is doing: backlog, throughput, concurrency against its limit, when it was throttled, and how long runs waited before starting. Each queue also gets its own page, which breaks the same numbers down per concurrency key so you can tell whether one key is starving the rest. (#4131)
- The agent detail page now uses the same layout as the other metrics pages: filters stay pinned at the top, the activity charts sit in a row beneath them, and the tabs and table scroll with the page, with the agent config in a resizable panel on the right. (#4131)
- Self-hosted instances can now serve deployed runs' API traffic from a different origin than the public one, per organization, via the
INTERNAL_API_ORIGINenvironment variable and a feature flag. (#4366) - A queue's concurrency keys are now paged and searchable, so a queue with thousands of keys shows all of them instead of only the busiest 50. (#4131)
- Accepting an old invitation could change the role of someone who was already in the organization. An invitation now leaves an existing member's role untouched, people who are already in an organization are no longer sent invitations to it, and the invite form now says which addresses it skipped instead of failing with an unhelpful error. (#4409)
- Removed an unused internal dashboard sync route that is no longer part of any product surface. (#4400)
- Fixed error reports being attributed to the wrong request when several requests were in flight at once. (#4372)
- Invalid queries sent to the query API are no longer treated as internal errors, and a query that does fail is now recorded together with the query text that produced it. (#4372)
All packages: v4.5.9
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Contributors
Chris Arderne, Eric Allam, claude[bot], James Ritchie, Matt Aitken, github-actions[bot], @D-K-P, Saadi Myftija
Full changelog: v4.5.8...v4.5.9
trigger.dev v4.5.8
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.8
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-8
What's changed
Improvements
- Preserve the partial assistant message when a chat turn's model stream fails mid-response.
chat.agentnow passes the recovered partial toonTurnComplete, andchat.createSession'sturn.complete()keeps it before rethrowing, instead of dropping the streamed-so-far output. (#4348)
Server changes
These changes affect the self-hosted Docker image and Trigger.dev Cloud:
- Favorite any dashboard page to a new Favorites section in the side menu, and customize the sidebar by renaming favorites, hiding items, and reordering items and sections. (#4375)
- List API endpoints now clamp the page size to a maximum of 100. Requests asking for a larger page size return up to 100 items and keep paginating, rather than pulling an unbounded page. (#4360)
- Organizations without billing alerts now get default spend alert thresholds, so you're notified before usage grows unexpectedly. The billing limit page no longer pre-selects an option before you've set a limit and prompts you to configure one. Alert previews now update immediately after you change your billing limit. (#4328)
- When you create a Personal Access Token, the generated token now shows its first and last few characters instead of being fully hidden, so you can confirm you copied the right value. (#4363)
- Add metrics to the realtime backend that measure how often a single changed run is served to multiple subscriptions in one batch. (#4341)
- Realtime run subscriptions can now be configured to read run data straight from the primary database, so a run's latest state is never served from a lagging replica. Off by default; replica reads are unchanged unless you turn it on. (#4378)
- SSO and Directory Sync are no longer restricted to Enterprise plans — get in touch and we can turn them on for your organization whatever plan you're on. (#4393)
- Improved supervisor observability: it now reports metrics for its outbound requests, making failed calls to upstream services easier to monitor. (#4350)
- The runs list on a task's page now updates live — run statuses change and newly triggered runs appear without a manual refresh, matching the main Runs page. (#4377)
- Speed up the Batches list page for environments with a large number of batches, which could previously time out while loading. (#4361)
- Container startup no longer prints database and ClickHouse connection strings (with credentials) to the logs. (#4346)
- The tasks page no longer runs two queries whose results were never displayed, cutting wasted work on every page load and removing a source of hidden server errors (#4380)
All packages: v4.5.8
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Contributors
claude[bot], Eric Allam, James Ritchie, @nicktrn, Matt Aitken, github-actions[bot], Chris Arderne
Full changelog: v4.5.7...v4.5.8
trigger.dev v4.5.7
trigger.dev v4.5.7
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.7
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-7
What's changed
Improvements
-
Add
node-24andnode-26as supportedruntimeoptions intrigger.config.ts. Theexperimental-node-24andexperimental-node-26names are now deprecated aliases and emit a deprecation warning; switch tonode-24/node-26instead. (#4337)import { defineConfig } from "@trigger.dev/sdk"; export default defineConfig({ runtime: "node-24", project: "<your-project-ref>", });
-
Avoid logging task run environment variable values at debug level (#4336)
-
Custom chat agent loops get two ergonomic wins for owning the turn loop. (#4304)
chat.writeTurnComplete()now returns the turn boundary's resume cursors (lastEventIdfor the output stream andsessionInEventIdfor the input stream), so you can persist them straight from the task instead of round-tripping them back from the client.const { lastEventId, sessionInEventId } = await chat.writeTurnComplete(); await db.chats.update(chatId, { lastEventId, sessionInEventId });
chat.pipeAndCapture()no longer throws when a stream is stopped or fails. It now returns aPipeAndCaptureResultwhosemessageholds any partial output captured before the stop or failure, alongside a typedstatus("complete" | "aborted" | "error") and, on failure, theerror. Read the message off the result:const { message, status, error } = await chat.pipeAndCapture(result, { signal, }); if (message) conversation.addResponse(message); if (status === "error") logger.error("turn failed", { error });
Note:
pipeAndCapturepreviously resolved toUIMessage | undefined. Update call sites to read.messagefrom the returned result. -
Suppress a build-time warning that could appear in Vite-based projects when the optional
@ai-sdk/otelpackage is not installed. (#4188)
Bug fixes
- Fixes intermittent
trigger devrun crashes where a run could fail at boot with a crypticCannot find module .../dev-run-worker.mjsafter a rebuild had cleaned up the build directory the run was launched against. Dev runs now retry cleanly instead of hard-crashing when their build directory is missing, the dev watchdog no longer removes the build tree of a still-running session, and a run assigned to a worker version that was superseded by a rebuild now fails fast with a clear message instead of silently hanging until it times out. (#4276)
Server changes
These changes affect the self-hosted Docker image and Trigger.dev Cloud:
- Refreshed the side menu: separate organization and account menus, a new project switcher, and the menu is now resizable by dragging its edge. The account Profile page has also been redesigned. (#4066)
- Allow different organization members to use the same development branch name without sharing or colliding with each other's branch environments. (#4323)
- Limit account settings email input to 254 characters. (#4330)
- Prevent duplicate Staging and Preview environments when account setup requests overlap (#4261)
- Fix the docs link on the empty Prompts page, which pointed to a page that no longer exists. (#4247)
All packages: v4.5.7
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Contributors
Chris Arderne, James Ritchie, Matt Aitken, Katia Bulatova, @nicktrn, github-actions[bot], Eric Allam, @D-K-P
Full changelog: v4.5.6...v4.5.7
trigger.dev v4.5.6
trigger.dev v4.5.6
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.6
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-6
What's changed
Breaking changes
- Self-hosted deployments no longer ship shared default credentials; fresh installs generate their own. If yours still uses a previously published default, set a unique value before upgrading, or set
ALLOW_INSECURE_DEFAULT_SECRETS=trueto keep booting while you migrate. (#4316)
Security patches
- Require explicit browser approval for CLI and MCP login, with resilient polling while approval is pending. (#4316)
- Deployed task telemetry now reports the deployment identifier (e.g.
deployment_abc123) in theworker.idattribute, instead of an opaque internal value. Upgrade to get the readable identifier in your own OpenTelemetry exporters. (#4316) - Prevent prototype pollution when applying run metadata operations or reconstructing nested telemetry attributes, while preserving legitimate
constructorandprototypefields. (#4316) - Add helpers to mint and verify the deployment-scoped token used to authenticate run controllers to the platform. (#4316)
- Added optional request rate limiting for telemetry ingestion endpoints. (#4316)
- Background-worker deployment lookups are now scoped to the authenticated environment. (#4316)
- Updating a GitHub App installation from the callback flow is now scoped to your own organization, so an installation ID belonging to another organization can no longer be used to refresh that organization's installation record. The GitHub App installation session is also now single-use, so completing an installation callback invalidates its state and it can no longer be replayed. (#4316)
- Scope schedule and environment-variable writes to the caller's project and environment (#4316)
- Reject compute snapshot callbacks that do not match the snapshot request that created them. (#4316)
- Require secret-key authentication to initialize the session out (agent→client) stream, matching the append route. (#4316)
- Live run and trace subscriptions now validate their identifiers more strictly and only return data from your own organization. (#4316)
- Window-function names in the query compiler are now validated against the allowlist, matching how other function calls are handled. (#4316)
- Authenticate run controllers to the platform with a signed, deployment-scoped token. (#4316)
- Verify that worker actions (starting, completing, and continuing a run, and reading its snapshots) target a run belonging to the caller's environment. (#4316)
All packages: v4.5.6
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Contributors
Chris Arderne, github-actions[bot]
Full changelog: v4.5.5...v4.5.6
trigger.dev v4.5.5
trigger.dev v4.5.5
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.5
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-5
What's changed
Improvements
- Add experimental Node.js 24 and 26 task runtimes. Set
runtimetoexperimental-node-24orexperimental-node-26intrigger.config.ts. (#4085) - Add
defaultRegionto the project GET and list API responses; null when unset. (#4146)
Server changes
These changes affect the self-hosted Docker image and Trigger.dev Cloud:
- Transient internal sync failures are now retried quietly instead of surfacing as errors. (#4270)
- Optionally route ClickHouse read traffic to a read replica while writes stay on the primary. Set
CLICKHOUSE_READER_URLto move all reads, or target the busiest paths withRUNS_LIST_CLICKHOUSE_URL(runs list) andEVENTS_READER_CLICKHOUSE_URL(traces, spans, logs). All optional; unset keeps current behavior. (#4081) - Remove the deprecated realtime stream write endpoint used by retired v3 task clients. (#4250)
- Fix batchTrigger requests that set a per-item idempotency key failing with an error instead of creating and deduplicating the runs (#4271)
- Speed up idempotency checks on
batchTriggercalls that use idempotency keys. Large batches against a task with a big run history no longer degrade to multi-second lookups. (#4255) - The "Preview branches" usage on the Limits page now counts only preview branches. (#4283)
- Avoid opening a redundant database connection pool when the legacy and primary databases are the same server, preventing connection usage from doubling. (#4253)
- Fix pages occasionally loading unstyled or failing to load during a deploy. The dashboard now reloads automatically to recover. (#4282)
All packages: v4.5.5
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Contributors
Chris Arderne, @nicktrn, @d-cs, Eric Allam, github-actions[bot], @isshaddad, Katia Bulatova, Matt Aitken
Full changelog: v4.5.4...v4.5.5
trigger.dev v4.5.4
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.4
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-4
What's changed
Breaking changes
- Trigger.dev v3 is no longer supported. For self-hosted deployments, 4.5.0 is the last version we officially support for running v3; stay on 4.5.0 or upgrade to v4. v3 triggers, batch triggers, reschedules, and deploys now return a clear upgrade message instead of running. (#4236)
Improvements
- You can now mark environment variables synced via the
syncEnvVarsbuild extension as secrets. Return{ name, value, isSecret: true }from your callback and those variables are stored redacted in the dashboard, just like manually created secret env vars. (#4203) - Remove the legacy
--mcpand--mcp-portoptions from thedevcommand. Run the dedicatedtrigger mcpcommand to start the Trigger.dev MCP server. (#4246) - Removed the unused
ResourceMonitorexport from@trigger.dev/core/v3/serverOnly. It was a server-side logging helper with no remaining consumers. (#4244) - Removed the unused
@trigger.dev/core/v3/zodNamespaceexport and the legacy v3 socket message schemas. These were only used by the now-retired v3 engine and have no v4 consumers. (#4236)
Bug fixes
- Fix a
chat.agentmessage-loss race where sending a message right after an action (such as an undo) could drop the follow-up's response from the UI until a refresh. (#4234)
Server changes
These changes affect the self-hosted Docker image and Trigger.dev Cloud:
- Added
EVENT_REPOSITORY_POSTGRES_WRITES_DISABLEDto skip all PostgreSQL task-event writes for deployments that store task events in ClickHouse. Leave it off unlessEVENT_REPOSITORY_DEFAULT_STOREisclickhouse_v2, otherwise task events are lost. (#4242) - Promo credits: a /promo signup landing page, redeeming a promo code when a new org selects a plan, and showing remaining credits on the usage page. (#4138)
- Speed up retrieving a background worker by version. The endpoint no longer runs a slow lookup that scanned the full task table for large deployments; it now reuses data it already loads, so the response is the same but returns much faster. (#4245)
- Clearer login error when an email address is blocked by the WHITELISTED_EMAILS setting: the message now explains the address isn't allowed on this instance instead of the ambiguous "This email is unauthorized". (#4220)
- Make the native build server the default in project build settings. It's now opt-out, stored as a new
disableNativeBuildServerkey. Also clarifies in the UI that build settings apply to GitHub-triggered and native build server deployments. (#3980) - Optionally process high-volume telemetry ingestion in parallel for higher throughput under heavy load by setting
OTEL_TRANSFORM_WORKER_POOL_ENABLED=1. Off by default. (#4232) - Add a
REALTIME_BACKEND_DEFAULTenv var to choose the default realtime backend (electric,native, orshadow) for environments whose org has no per-org override. Defaults toelectric, so existing behavior is unchanged. (#4231) - Clarified on the Regions page that a region only affects where your runs execute, not where your data is stored. This shows as a tooltip on the Location column and in the confirmation dialog when you change your default region. (#4226)
- Improved the reliability of how run data is read and written. (#4237)
- Fixed stale login errors: an error from a previous login attempt (for example a rejected email address) no longer keeps reappearing on the login page and no longer makes later, successful attempts look like they failed. (#4220)
- The Errors page now shows better details for each error. Errors that don't carry a message — such as errors thrown without a message, or values thrown that aren't
Errorobjects — get a meaningful title instead of all reading "Unknown error", and are grouped by their name (or value) rather than collapsed into a single group. The error type now shows the actual error name, and stack traces now appear where previously they were missing. (#4225) - Return a clear client error when SSO form submissions use an unsupported content type (#4238)
- Query page: extracting fields from a run's output with JSON functions (such as JSONExtractString or JSONExtractInt) no longer fails with an "illegal type: JSON" error. (#4221)
All packages: v4.5.4
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Contributors
Chris Arderne, Eric Allam, @d-cs, Matt Aitken, @isshaddad, github-actions[bot], @nicktrn, Saadi Myftija, Oskar Otwinowski, @D-K-P, claude[bot], Wes Mason, James Ritchie
Full changelog: v4.5.3...v4.5.4
trigger.dev v4.5.3
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.3
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-3
What's changed
Breaking changes
- Removed support for the end-of-life v3
trigger devCLI. Starting a dev session with an old v3 CLI now returns an upgrade message instead of connecting - upgrade to the v4 CLI to continue usingtrigger dev. (#4198)
Bug fixes
- Fix TS2742 ("inferred type cannot be named") when exporting a
chat.agentfrom a project with declaration emit:ChatTaskWirePayloadandChatInputChunkare now declared in the public@trigger.dev/sdk/chatsubpath, so inferred agent types emit portable declarations and the wire types are directly importable. (#4218)
Server changes
These changes affect the self-hosted Docker image and Trigger.dev Cloud:
- Reduce primary database load on the runs page by serving its empty-state check from ClickHouse instead of Postgres. (#4202)
- Fixed submitting your email on the login page reloading back to an empty form instead of showing the magic link confirmation screen. (#4215)
All packages: v4.5.3
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Contributors
Eric Allam, Oskar Otwinowski, github-actions[bot], Matt Aitken, James Ritchie, claude[bot], Chris Arderne, @nicktrn
Full changelog: v4.5.2...v4.5.3
trigger.dev v4.5.2
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.2
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-2
What's changed
Security
- Harden account and access-control handling across auth, RBAC, org membership, and impersonation. (#4199)
- Harden URL handling for alert webhooks and platform notifications. (#4199)
- Harden the query and prompt-override APIs and rate-limit the query ai-title endpoint. (#4199)
- Improve redaction of secrets from debug logs. (#4199)
- Tighten environment scoping when replaying a run. (#4199)
- Scope run, batch, and trigger lookups to the caller's tenant. (#4199)
- Honor the MCP server's
--dev-onlyflag. (#4199)
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. (#4105)
Improvements
-
Large batch payloads now offload to object storage instead of riding inline in the trigger request.
batchTriggerandbatchTriggerAndWait(and the by-id and by-task variants) offload any per-item payload over 128KB before sending, the same way singletriggerandtriggerAndWaitalready do, so a big batch no longer blows past the API body limit. (#4165) -
Removed internal helpers that were only used by the end-of-life v3 self-hosted compute providers. (#4194)
-
Add an
onEventcallback toTriggerChatTransport/useTriggerChatTransportthat 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. (#4187)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. (#4171)
-
A cleaner sign-in flow: request a magic link right from the login page, or continue with SSO. (#4182)
-
Serve PostHog analytics from a same-origin
/phpath that reverse-proxies to PostHog Cloud EU, following PostHog's first-party reverse-proxy guidance. (#4183) -
Refreshed the SSO & Directory Sync settings page layout and copy. (#4196)
-
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. (#4139) -
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. (#4139)
Bug fixes
- Fix chat turns that throw, for example from an
onTurnStarthook, leaking their message listener, which lost or duplicated messages sent during later turns. (#4176) - Fix
chat.agentandchat.createSessionpermanently 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. (#4176) - 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. (#4176)
- Fix
chat.createSessionswallowing 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. (#4176) - 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
BatchTaskRunrow. (#4178) - 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. (#4186)
- Deleting a project no longer triggers a slow database cleanup that could hang on projects with many runs. (#4191)
- Fixed the agent playground chat failing to send messages, with "Failed to fetch" errors in some environments. Messages now reach the agent reliably. (#4193)
- 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. (#4184)
- Runs resuming after a wait no longer fail with
TASK_EXECUTION_ABORTEDwhen the database is briefly unreachable; the resume endpoint returns a retryable response for transient infrastructure errors instead of a permanent one. (#4161)
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
Contributors
Chris Arderne, Matt Aitken, Eric Allam, James Ritchie, @nicktrn, @d-cs, Katia Bulatova, Wes Mason, github-actions[bot], @isshaddad, @D-K-P, claude[bot]
Full changelog: v4.5.1...v4.5.2
trigger.dev v4.5.1
trigger.dev v4.5.1
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.1
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-1
What's changed
Improvements
- Extend the SSO plugin contract with WorkOS Directory Sync (SCIM) support. (#4148)
All packages: v4.5.1
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Contributors
@d-cs, Chris Arderne, @nicktrn, Oskar Otwinowski, claude[bot], Eric Allam, James Ritchie, Matt Aitken, github-actions[bot], Wes Mason
Full changelog: v4.5.0...v4.5.1
trigger.dev v4.5.0
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 # bunSelf-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.0
Release notes
Read the full release notes: https://trigger.dev/changelog/v4-5-0
What's changed
AI Agents (chat.agent)
Run Vercel AI SDK chat completions as durable Trigger.dev tasks instead of fragile API routes. A conversation runs as one long-lived task keyed on chatId, so it survives page refreshes, network blips, redeploys, and crashes, and every turn is a span in the dashboard.
import { chat } from "@trigger.dev/sdk/ai";
import { streamText, stepCountIs } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
export const myChat = chat.agent({
id: "my-chat",
run: async ({ messages, signal }) => {
return streamText({
...chat.toStreamTextOptions(), // system prompt, compaction, steering, telemetry
model: anthropic("claude-sonnet-4-5"),
messages,
abortSignal: signal,
stopWhen: stepCountIs(15),
});
},
});Sessions
The durable primitive underneath chat.agent, usable on its own: a run-aware, bidirectional stream channel keyed on a stable externalId whose .in / .out streams survive run boundaries (suspend, crash, idle-timeout, redeploy). One Session spans many runs, which makes it a good fit for agent inboxes and approval flows.
import { sessions } from "@trigger.dev/sdk";
// Create the session and trigger its first run (idempotent on externalId)
await sessions.start({
type: "inbox",
externalId: userId,
taskIdentifier: "inbox-agent",
});
const session = sessions.open(userId);
await session.in.send({ text: "hello" });
const stream = await session.out.read({ signal: AbortSignal.timeout(30_000) });
for await (const chunk of stream) console.log(chunk); // durable across run swapsAI Prompts
Define prompt templates as code, versioned on every deploy, and override the text or model from the dashboard without redeploying (environment-scoped). Each generation links back to its prompt version for usage, cost, and latency.
import { prompts } from "@trigger.dev/sdk";
import { z } from "zod";
export const supportPrompt = prompts.define({
id: "customer-support",
model: "gpt-4o",
variables: z.object({ customerName: z.string(), issue: z.string() }),
content: `You are a support agent for Acme.
Customer: {{customerName}}
Issue: {{issue}}`,
});
// Honors any active dashboard override, else the current deployed version
const resolved = await supportPrompt.resolve({ customerName: "Alice", issue: "Can't log in" });
// resolved.text, resolved.model, resolved.versionuseChat integration
useTriggerChatTransport is a Vercel AI SDK ChatTransport that runs useChat over Trigger.dev realtime with no API routes. Text, tool calls, reasoning, and data-* parts stream natively, and it works with AI SDK v5, v6, and now v7.
First-turn fast path (chat.headStart)
Runs the first turn in your warm server process while the agent boots in parallel, cutting cold-start time-to-first-chunk roughly in half (measured ~2.8s to ~1.2s). Available via the new @trigger.dev/sdk/chat-server subpath.
Human-in-the-loop, stop, and steering
The agent control surface: tool approvals (needsApproval + addToolApprovalResponse), client-driven stop-generation, mid-execution steering (pendingMessages), and between-turn context injection (chat.inject / chat.defer), all durable across the conversation.
Agent Skills
skills.define({ id, path }) bundles a SKILL.md folder into your deploy image. The agent gets a one-line summary up front and loads the full instructions plus scoped bash / readFile tools on demand (progressive disclosure), so a capability is something the model reaches for rather than a pre-declared typed tool.
trigger skills for coding assistants
trigger skills installs version-pinned Trigger.dev skills plus a bundled docs snapshot into Claude Code, Cursor, GitHub Copilot, and Codex, so your assistant's Trigger.dev knowledge stays current with your installed SDK version. trigger init now offers to set up the MCP server and skills too.
Model library
A new Models page in the dashboard: a catalog of models grouped by provider with context window, capabilities, and input / output pricing per 1M tokens, plus a "Your models" tab showing per-model usage, cost, and cache-hit sparklines from your actual traffic.
Dev branches
Run multiple local trigger dev sessions in parallel (separate git worktrees or coding agents) without runs colliding, each isolated with its own dashboard, via trigger dev --branch <name>.
TriggerClient
An instantiable client so one process can trigger and read across projects, environments, and preview branches, each with its own auth and baseURL, with no shared global state.
import { TriggerClient } from "@trigger.dev/sdk";
const prod = new TriggerClient({ accessToken: process.env.TRIGGER_PROD_KEY });
const preview = new TriggerClient({
accessToken: process.env.TRIGGER_PREVIEW_KEY,
previewBranch: "signup-flow",
});
await prod.tasks.trigger("send-email", { to: "user@example.com" });
await preview.runs.list({ status: ["COMPLETED"] });SDK and runtime
- AI SDK 7 support (v5 and v6 still supported), with OpenTelemetry telemetry auto-wired
- Large trigger-payload offload: trigger payloads at or above 128KB upload to object storage automatically, using the same auth and baseURL as the trigger call
- Region support on the runs API: filter runs by region and read each run's executing region (also on MCP
list_runs) - Duplicate task-id detection:
devanddeployfail with a clear error instead of silently overwriting envvars.uploadgains anisSecretflag to import redacted secret variables- Retry hardening:
TASK_MIDDLEWARE_ERRORnow retries under the task's retry policy
All packages: v4.5.0
@trigger.dev/build, @trigger.dev/core, @trigger.dev/python, @trigger.dev/react-hooks, @trigger.dev/redis-worker, @trigger.dev/rsc, @trigger.dev/schema-to-json, @trigger.dev/sdk, trigger.dev
Full changelog: v4.4.0...v4.5.0