Provide environment information
System:
OS: macOS 26.5.1
CPU: (12) arm64 Apple M2 Max
Memory: 293.34 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.17.1
Yarn: 1.22.19
npm: 10.9.2
pnpm: 10.26.2
bun: 1.3.14
Describe the bug
Testing a chat.agent() task via the Trigger.dev dashboard playground shows "Failed to fetch" in the UI. Browser DevTools shows the append request to api.trigger.dev fails with a CORS error, and the OPTIONS preflight returns 400.
The agent run starts successfully (preload → waiting for first message → suspended), but user messages never reach the worker (messages: [] in run payload).
SDK | @trigger.dev/sdk@4.5.0
CLI | bunx trigger.dev@latest dev → Trigger.dev 4.5.0
To reproduce
I have this agent:
import { chat } from "@trigger.dev/sdk/ai";
import { streamText, stepCountIs } from "ai";
export const demoAgent = chat.agent({
id: "demo-agent",
run: async ({ messages, signal }) => {
return streamText({
...chat.toStreamTextOptions(),
model: /* OpenRouter gpt-4o-mini */,
system: "You are a friendly demo assistant...",
messages,
abortSignal: signal,
stopWhen: stepCountIs(15),
});
},
});
Steps to reproduce
- Run local dev worker:
- cd apps/trigger-test && bun run trigger:dev
- Confirm: Local worker ready on branch: default [node] -> 20260704.4
- Open Trigger.dev dashboard → dev environment.
- Open task demo-agent → use the chat/agent playground UI (not the regular JSON "Test" tab).
- Wait for preload (run starts, agent suspends at "waiting for first message").
- Type a message and send.
- UI shows "Failed to fetch".
Additional information
No response
Provide environment information
System:
OS: macOS 26.5.1
CPU: (12) arm64 Apple M2 Max
Memory: 293.34 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.17.1
Yarn: 1.22.19
npm: 10.9.2
pnpm: 10.26.2
bun: 1.3.14
Describe the bug
Testing a chat.agent() task via the Trigger.dev dashboard playground shows "Failed to fetch" in the UI. Browser DevTools shows the append request to api.trigger.dev fails with a CORS error, and the OPTIONS preflight returns 400.
The agent run starts successfully (preload → waiting for first message → suspended), but user messages never reach the worker (messages: [] in run payload).
SDK | @trigger.dev/sdk@4.5.0
CLI | bunx trigger.dev@latest dev → Trigger.dev 4.5.0
To reproduce
I have this agent:
Steps to reproduce
Additional information
No response