You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The wait_for_run_to_complete MCP tool blocks indefinitely if a run never transitions to a terminal state (e.g., stuck in DEQUEUED because the dev worker isn't processing it).
This causes MCP clients (like Claude Code) to hang forever waiting for a response — in my case 19+ minutes before I manually interrupted.
Steps to reproduce
Trigger a task via the MCP trigger_task tool (dev environment)
Call wait_for_run_to_complete with the returned runId
If the dev worker is restarting, disconnected, or otherwise not picking up the run, it stays in DEQUEUED state
The MCP tool never returns — it blocks indefinitely
Expected behavior
wait_for_run_to_complete should:
Accept an optional timeout parameter (e.g., default 120s)
Return an error or status update if the timeout is exceeded (e.g., { status: "DEQUEUED", error: "timeout_exceeded" })
Current behavior
The tool blocks forever with no way to set a timeout. The MCP client (Claude Code in my case) shows "Running..." indefinitely.
Environment
Trigger.dev v4 (dev mode)
MCP server: @anthropic-ai/claude-code using Trigger.dev MCP
Worker: local dev worker (npx trigger.dev dev)
Workaround
Avoid wait_for_run_to_complete entirely. Instead use a polling pattern:
trigger_task → get runId
sleep 5s
get_run_details(runId) → check status
Repeat or report stuck if still DEQUEUED after ~15s
Bug
The
wait_for_run_to_completeMCP tool blocks indefinitely if a run never transitions to a terminal state (e.g., stuck inDEQUEUEDbecause the dev worker isn't processing it).This causes MCP clients (like Claude Code) to hang forever waiting for a response — in my case 19+ minutes before I manually interrupted.
Steps to reproduce
trigger_tasktool (dev environment)wait_for_run_to_completewith the returnedrunIdDEQUEUEDstateExpected behavior
wait_for_run_to_completeshould:timeoutparameter (e.g., default 120s){ status: "DEQUEUED", error: "timeout_exceeded" })Current behavior
The tool blocks forever with no way to set a timeout. The MCP client (Claude Code in my case) shows "Running..." indefinitely.
Environment
@anthropic-ai/claude-codeusing Trigger.dev MCPnpx trigger.dev dev)Workaround
Avoid
wait_for_run_to_completeentirely. Instead use a polling pattern:trigger_task→ getrunIdsleep 5sget_run_details(runId)→ check statusDEQUEUEDafter ~15s