Run replay detection with ctx.run.isReplay, a --no-browser CLI flag for headless environments, and a 24-hour grace window for API key rotations.
3 improvements and 12 server changes.
Highlights
ctx.run.isReplay
Tasks can now check whether the current run is a replay via ctx.run.isReplay, allowing you to skip side effects like email sends or payments during replays.
export const myTask = task({
id: "my-task",
run: async (payload, { ctx }) => {
if (ctx.run.isReplay) {
// Skip side effects like sending emails or charging cards on replay
return;
}
await sendEmail(payload.to);
},
});
Improvements
--no-browserCLI flag: Add--no-browserflag toinitandloginto skip auto-opening the browser during authentication. Useful for CI and headless environments. Also errors loudly wheninitis run without--yesunder non-TTY stdin, instead of silently half-initializing the project. Both commands now include anExamplessection in--help.- Stack trace truncation: Truncate large error stacks and messages to prevent OOM crashes: stack traces capped at 50 frames (top 5 + bottom 45 with an omission notice), individual lines at 1024 chars, and error messages at 1000 chars. Applied in
parseError,sanitizeError, and OTel span recording.
Server Changes
Changes included in the v4.4.5 Docker image and live on Trigger.dev Cloud:
- Add a server-side deprecation gate for deploys from v3 CLI versions, controlled by the
DEPRECATE_V3_CLI_DEPLOYS_ENABLEDenv var. v4 CLI deploys are unaffected. - Regenerating an environment API key no longer invalidates the previous key immediately. The old key gets a 24-hour grace window via a new
RevokedApiKeytable, and PATs signed with the rotated key also remain valid during that window. - Ship the Errors page to all users, with Slack alert improvements (viewer-timezone timestamps via
<!date^>token, pinned "No channel" picker item), activity sparkline peak tooltips, and several dashboard UI fixes. - Session primitive server infrastructure: Postgres
Session+SessionRuntables, ClickHousesessions_v1+ replication, thesessionsJWT scope, and CRUD + realtime routes includingend-and-continuefor server-orchestrated run handoffs. - Increase the default maximum project count per organization from 10 to 25.
- Replace the DISTINCT query for task filter dropdowns with a dedicated
TaskIdentifierregistry table backed by Redis. Fixes duplicate entries when a task changes trigger source and adds active/archived grouping. Environments migrate automatically on their next deploy. - Stop writing per-tick state (
lastScheduledTimestamp,nextScheduledTimestamp,lastRunTriggeredAt) onTaskSchedule. Customer-facingpayload.lastTimestampsemantics are unchanged. - Batch items that hit the environment queue size limit now fast-fail without retries and without creating pre-failed TaskRuns.
- Fix RSS memory leak in realtime proxy routes: thread
getRequestAbortSignal()throughRealtimeClientto cancel upstream Electric requests on client disconnect. Isolated reproducer showed ~44 KB retained per leaked request. - Fix memory leak where aborted SSE connections pinned the full request/response graph on Node 20, caused by
AbortSignal.any()retaining source signals indefinitely. Also clears thesetTimeout(abort)timer inentry.server.tsxso successful HTML renders don't retain the React tree for 30 seconds. - Fix Redis connection leak in realtime streams: non-blocking methods now share a single connection, and streaming connections tear down via
disconnect()immediately with a 15-second inactivity fallback. - Upgrade Remix from 2.1.0 to 2.17.4 to address React Router security vulnerabilities.
How to Upgrade
Update trigger.dev packages to v4.4.5:
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: update your Docker image to ghcr.io/triggerdotdev/trigger.dev:v4.4.5.
Fetched June 3, 2026


