Skip to content

Releases: triggerdotdev/trigger.dev

trigger.dev v4.5.2

Choose a tag to compare

@github-actions github-actions released this 09 Jul 13:38
a3dca98

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: 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-only flag. (#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. 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. (#4165)

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

  • 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. (#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 /ph path 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 onTurnStart hook, leaking their message listener, which lost or duplicated messages sent during later turns. (#4176)
  • 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. (#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.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. (#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 BatchTaskRun row. (#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_ABORTED when 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

Choose a tag to compare

@github-actions github-actions released this 06 Jul 18:34
c584236

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  # bun

Self-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

Choose a tag to compare

@github-actions github-actions released this 02 Jul 10:32
86ef3c4

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.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 swaps

AI 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.version

useChat 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: dev and deploy fail with a clear error instead of silently overwriting
  • envvars.upload gains an isSecret flag to import redacted secret variables
  • Retry hardening: TASK_MIDDLEWARE_ERROR now 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

trigger.dev v4.5.0-rc.7

Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Jun 12:19
015106d

Upgrade

npx trigger.dev@4.5.0-rc.7 update
pnpm dlx trigger.dev@4.5.0-rc.7 update
yarn dlx trigger.dev@4.5.0-rc.7 update 
bunx trigger.dev@4.5.0-rc.7 update

Self-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.0-rc.7

Improvements

  • @trigger.dev/sdk now bundles the Trigger.dev agent skills and a curated snapshot of the docs those skills reference. The skills that trigger skills installs into your coding agent read this content from node_modules, so the guidance your AI assistant follows is pinned to the SDK version installed in your project and stays current across upgrades instead of going stale until the next reinstall. (#3937)

  • Running a CLI command like dev, deploy, preview, or update before initializing a project no longer crashes with a raw Cannot find matching package.json stack trace. The CLI now detects the missing project and points you to npx trigger.dev@latest init instead. (#3929)

  • The agent skills installed by trigger skills are now namespaced with a trigger- prefix (e.g. trigger-authoring-tasks, trigger-getting-started) so they don't collide with unrelated skills in your coding agent's skills directory. Adds a trigger-cost-savings skill for auditing and reducing compute spend (right-sizing machines, maxDuration, batching, debounce), and @trigger.dev/sdk now bundles the full Trigger.dev documentation so your agent can read the complete, version-pinned reference directly from node_modules. (#3970)

  • The run span API response now includes cachedCost and cacheCreationCost on the ai object, alongside the existing inputCost / outputCost / totalCost. inputCost reflects only the non-cached input, so these fields let you reconstruct the full cost breakdown for prompt-cached calls. (#3958)

  • chat.headStart now works with the chat.customAgent and chat.createSession backends, not only chat.agent. The warm step-1 response hands over to your loop the same way it does for a managed agent. (#3963)

    In a chat.customAgent loop, consume the handover on turn 0:

    const conversation = new chat.MessageAccumulator();
    const { isFinal, skipped } = await conversation.consumeHandover({ payload });
    if (skipped) return; // warm handler aborted, so exit without a turn
    if (isFinal) {
      await chat.writeTurnComplete(); // step 1 is the response, no streamText
    } else {
      const result = streamText({ model, messages: conversation.modelMessages, tools });
      // Pass originalMessages so the handed-over tool round merges into the
      // step-1 assistant instead of starting a new message.
      const response = await chat.pipeAndCapture(result, {
        originalMessages: conversation.uiMessages,
      });
      if (response) await conversation.addResponse(response);
    }

    With chat.createSession, the iterator surfaces it as turn.handover; call turn.complete() with no argument on a final handover. The lower-level chat.waitForHandover() and accumulator.applyHandover() are also exported for hand-rolled loops.

  • Cache your chat agent's system prompt with Anthropic prompt caching. chat.toStreamTextOptions() now emits the system prompt as a cacheable message when you opt in, so a large, stable system block is billed at cache-read rates on every turn instead of full price. (#3952)

    // at the streamText call site (Anthropic sugar)
    streamText({
      ...chat.toStreamTextOptions({ cacheControl: { type: "ephemeral" } }),
      messages,
    });
    
    // provider-agnostic equivalent
    chat.toStreamTextOptions({
      systemProviderOptions: { anthropic: { cacheControl: { type: "ephemeral" } } },
    });
    
    // or where the prompt is defined
    chat.prompt.set(SYSTEM_PROMPT, {
      providerOptions: { anthropic: { cacheControl: { type: "ephemeral" } } },
    });

    Without an option, system stays a plain string. Pairs with a prepareMessages cache breakpoint to cache the conversation prefix across turns too.

  • Three fixes for custom agent loops (chat.customAgent, chat.createSession, and hand-rolled MessageAccumulator loops): (#3936)

    • Continuation runs no longer replay already-answered user messages into the first turn. The .in resume cursor is now seeded before any listener attaches (the same boot logic chat.agent uses), so a chat that continues after a cancel, crash, or upgrade only sees genuinely new messages.
    • Steering a hand-rolled loop mid-stream no longer wipes the in-flight assistant response. chat.pipeAndCapture now stamps a server-generated message id on the stream, so a prepareStep injection keeps the partial text instead of replacing the message.
    • Task-backed tools (ai.toolExecute) now work from custom agent loops: the parent's session is threaded to the child run, so child tasks can stream progress into the chat with chat.stream.writer({ target: "root" }) instead of failing with "session handle is not initialized".

All packages: v4.5.0-rc.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

Full changelog: v4.4.0.7...v4.5.0-rc.7

trigger.dev v4.5.0-rc.6

Pre-release

Choose a tag to compare

@github-actions github-actions released this 12 Jun 15:52
5fab8ca

Upgrade

npx trigger.dev@4.5.0-rc.6 update
pnpm dlx trigger.dev@4.5.0-rc.6 update
yarn dlx trigger.dev@4.5.0-rc.6 update 
bunx trigger.dev@4.5.0-rc.6 update

Self-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.0-rc.6

chat.agent Improvements

  • Reliability fixes for chat.agent. A user message sent while the agent is streaming is no longer delivered twice (which could run a duplicate turn), input appends now carry an idempotency key so a retried send can't duplicate a message, stopping a generation clears the streaming state so a page reload doesn't replay the stopped turn, and runs can now carry the full set of dashboard tags instead of being silently truncated. onTurnComplete now fires on errored turns (with the thrown error attached) and the failed turn's user message is persisted so it isn't lost on the next run. Custom agents and manual chat.writeTurnComplete callers now trim the output stream, sending a custom action no longer leaves a second stream reader running, and a long-lived watch subscription no longer grows its dedupe set without bound. (#3891)
  • Continuation chat boots no longer stall for around 10 seconds before the first turn. The session.in resume cursor is now found with a non-blocking records read instead of draining an SSE long-poll (which always waited out its full 5 second inactivity window, twice per boot), the boot reads run concurrently, and chat snapshots carry the cursor so subsequent boots skip the scan entirely. (#3907)
  • Fix two chat.createSession() bugs: stopping a generation no longer wedges the run (the turn loop raced a totalUsage promise that never settles after a stop-abort), and continuation runs now wait for the next message instead of invoking the model with an empty prompt. (#3920)

Other improvements and fixes

  • trigger init now sets up your AI coding assistant as part of project setup: pick the MCP server, the agent skills, or both, then scaffold with the CLI or hand off to your assistant. Adds a new getting-started agent skill that teaches assistants how to bootstrap Trigger.dev (install the SDK, write trigger.config.ts, create a first task, run trigger dev), so the AI-driven setup path works end to end. It ships in the CLI alongside the existing skills, version-matched to your SDK. (#3872)
  • dev and deploy now fail with a clear error when two tasks are defined with the same id, including across different task types (e.g. a scheduled task and a regular task sharing an id). Previously the second definition silently overwrote the first, so one of the tasks would vanish with no warning. Task ids are detected as duplicates during indexing (naming each offending id and the files it was found in), and the same rule is enforced server-side when the background worker is registered. (#3865)
  • trigger skills installs Trigger.dev agent skills into your coding agent so it knows how to write tasks, schedules, realtime, and chat.agent code. The skills ship with the CLI and are copied into each tool's native skills directory (Claude Code, Cursor, GitHub Copilot, and Codex / AGENTS.md), and trigger dev offers to install them on first run. (#3868)

All packages: v4.5.0-rc.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

Full changelog: v4.4.0.6...v4.5.0-rc.6

trigger.dev v4.5.0-rc.5

Pre-release

Choose a tag to compare

@github-actions github-actions released this 05 Jun 13:14
a730faa

Upgrade

npx trigger.dev@4.5.0-rc.5 update
pnpm dlx trigger.dev@4.5.0-rc.5 update
yarn dlx trigger.dev@4.5.0-rc.5 update 
bunx trigger.dev@4.5.0-rc.5 update

Self-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.0-rc.5

Highlights

  • Adds AI SDK 7 support. The ai peer range now includes v7, and the chat.agent / chat surfaces work against v7's ESM-only build. On v7, install @ai-sdk/otel alongside ai and the SDK registers it for you so experimental_telemetry spans keep flowing into your run traces (v7 stopped emitting them from ai core). v5 and v6 keep working unchanged. (#3833)
  • useTriggerChatTransport now recovers when restored session state points at a session that no longer exists in the current environment (#3816)

Improvements

  • The MCP server no longer tells the AI agent to wait for a run to complete after every trigger_task call. Waiting is now opt-in: the agent only waits when you ask it to (for example "trigger and then wait for it to finish"). This avoids burning tokens polling runs you didn't need to block on and keeps responses clearer. (#3838)
  • Update the bundled OpenTelemetry packages to their latest releases (@opentelemetry/sdk-node 0.218.0, @opentelemetry/core 2.7.1, @opentelemetry/host-metrics 0.38.3). (#3810)
  • envvars.upload now accepts an optional isSecret flag, letting you create the imported variables as secret (redacted) environment variables. When omitted, variables default to non-secret. (#3809)
  • Offload large trigger payloads to object storage before sending the trigger API request. The SDK uploads packets at or above the existing 128KB limit and sends an application/store pointer instead of embedding large JSON in the request body. TriggerTaskRequestBody now validates that application/store payloads are non-empty storage paths. (#3785)

Bug fixes

  • Fix @trigger.dev/core build: cast the underlying log record exporter when calling forceFlush so it typechecks against the updated OpenTelemetry LogRecordExporter type (which no longer declares forceFlush). (#3829)

All packages: v4.5.0-rc.5

@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

Full changelog: v4.4.0.5...v4.5.0-rc.5

trigger.dev v4.5.0-rc.4

Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Jun 08:55
e0681d2

Upgrade

npx trigger.dev@4.5.0-rc.1 update
pnpm dlx trigger.dev@4.5.0-rc.1 update
yarn dlx trigger.dev@4.5.0-rc.1 update 
bunx trigger.dev@4.5.0-rc.1 update

Self-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.0-rc.4

Highlights

  • Add a tools option to chat.agent. Declaring your tools here threads them into the SDK's internal convertToModelMessages, so each tool's toModelOutput is re-applied when prior-turn history is re-converted. (#3790)

Improvements

  • Bump @s2-dev/streamstore to 0.22.10 to fix a TASK_RUN_UNCAUGHT_EXCEPTION ("Invalid state: Unable to enqueue") when a chat.agent turn is aborted mid-stream. (#3792)
  • Coerce numeric concurrencyKey values to string at the API boundary across tasks.trigger, tasks.batchTrigger, and the Phase-2 streaming batch endpoint. (#3789)

All packages: v4.5.0-rc.4

@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

Full changelog: v4.5.0-rc.3...v4.5.0-rc.4

trigger.dev v4.5.0-rc.3

Pre-release

Choose a tag to compare

@github-actions github-actions released this 01 Jun 09:40
8f066ac

trigger.dev v4.5.0-rc.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  # bun

Self-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.0-rc.3

Release notes

Read the full release notes: https://trigger.dev/changelog/v4-5-0-rc-3

What's changed

Improvements

  • Retry TASK_MIDDLEWARE_ERROR under the task's retry policy instead of failing the run on the first attempt. The error was already classified as retryable by shouldRetryError, but shouldLookupRetrySettings did not include it, so the retry flow fell through to fail_run. Fixes #3231. (#3676)

Bug fixes

  • Fix TypeError in unflattenAttributes when the input attribute map contains conflicting dotted key paths (e.g. both a.b set to a scalar and a.b.c set to a value). The path-walk loop now applies last-write-wins when a prior key wrote a primitive, null, or array at an intermediate slot, matching the existing precedent in AttributeFlattener.addAttribute. Callers no longer crash when handed malformed external attribute inputs. (#3762)
  • Fix external trace context leaking across runs on warm-started workers with processKeepAlive enabled. Every subsequent run's attempt span was being exported with the first run's traceId and parentSpanId, breaking causal-chain navigation in external APM tools. Runs without an external trace context are unaffected. (#3768)

All packages: v4.5.0-rc.3

@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

Full changelog: v4.4.0.3...v4.5.0-rc.3

trigger.dev v4.5.0-rc.2

Pre-release

Choose a tag to compare

@github-actions github-actions released this 23 May 16:20
d34014d

trigger.dev v4.5.0-rc.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.0-rc.2

Release notes

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

What's changed

Improvements

  • The per-turn merge now overlays the wire copy's tool-part state advancement onto the agent's existing chain — state + the matching resolution field (output / errorText / approval) come from the wire, everything else (text, reasoning, tool input, provider metadata) stays whatever the snapshot or hydrateMessages returned. Previously a full-message replace overwrote those fields with whatever the client shipped, so a slimmed wire copy landed a tool call with no arguments on the next LLM call. Covers output-available / output-error (HITL addToolOutput) and approval-responded / output-denied (approval flow).
  • TriggerChatTransport.sendMessages and AgentChat.sendRaw now slim assistant messages that carry advanced tool parts. The wire payload is just { id, role, parts: [<state + resolution field>] } for submit-message continuations; everything else passes through. Reasoning blobs and full tool inputs no longer ride the wire on every addToolOutput / addToolApproveResponse, so continuation payloads stay well under the .in/append cap on long agent loops.
  • Add TriggerClient for running multiple SDK clients side-by-side, each with its own auth, preview branch, and baseURL. Useful when a single process needs to trigger tasks or read runs across multiple projects, environments, or preview branches without mutating shared global state. (#3683)

Bug fixes

  • Fix chat.agent HITL continuations on reasoning-heavy turns. Two changes that work together: (#3719)

All packages: v4.5.0-rc.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

Full changelog: v4.4.0.2...v4.5.0-rc.2

trigger.dev v4.5.0-rc.1

Pre-release

Choose a tag to compare

@github-actions github-actions released this 21 May 15:46
0b5b817

Upgrade

npx trigger.dev@4.5.0-rc.1 update
pnpm dlx trigger.dev@4.5.0-rc.1 update
yarn dlx trigger.dev@4.5.0-rc.1 update 
bunx trigger.dev@4.5.0-rc.1 update

Self-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.5.0-rc.1

Release notes

Read the full release notes: https://trigger.dev/changelog/v4-5-0-rc-1

What's changed

Bug fixes

  • Fix chat.agent skills silently missing in trigger dev for projects whose task files read process.env at module top level (e.g. a third-party SDK client initialized at import). Skill folders now bundle into .trigger/skills/ reliably regardless of which env vars are set when the CLI launches. (#3690)
  • Fix COULD_NOT_FIND_EXECUTOR when a task's definition is loaded via await import(...) from inside another task's run(). The runtime workers now register such tasks with a sentinel file context, and the catalog logs a one-time warning per task id. (#3688)

All packages: v4.5.0-rc.1

@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

Full changelog: v4.4.0.1...v4.5.0-rc.1