GuidesUpdated

Trigger.dev runs stuck in dev? Check for a second agent worker

Trace a queued local task across the app, Trigger.dev project, dashboard and worker processes when two agent worktrees are open at once.

On this page

One agent starts a Trigger.dev worker in its worktree; another starts a second worker for the same project. The website and API look healthy, but some development runs stay queued. Trigger.dev's troubleshooting guide says each project has one dev environment, and only one local `trigger.dev dev` instance can consume from it at a time. Find the competing worker, then confirm one complete run.

Canopy Servers view showing local development processes
Canopy Servers view showing local development processes

First check whether a run exists

In the right Trigger.dev project and Development environment, note the task's recent run IDs, creation times and states. No run? Inspect the browser request and backend trigger call before blaming the worker. A queued run? Compare it with the worker's output and the dashboard link it printed.

A queued run, a failed run and a task missing from the list are different problems. Canopy's Servers panel shows which local command is active; the Trigger.dev dashboard is the authority on run state.

Find the first boundary that failed.
ObservationNext checkEvidence to save
No run after app actionBackend route and Development keyRequest result and sanitized server error
Task missing in dashboardProject, environment, worker registration, task dirsWorker output and project ref
Run queuedOther dev workers for the same project; queue stateRun ID, project, every worker path and process
Run started then failedRun trace, task logs, variables, external serviceFirst actionable error and failing step

Find every local worker for that project

Check all Canopy projects and terminals that might run the Trigger.dev dev command, plus any started outside Canopy. Record each process's working directory, branch and project reference, without keys. Two worktrees give separate files, not separate Trigger.dev environments, and Trigger.dev warns that more than one dev instance per project can split consumption so some runs look stuck.

If two agents need to edit task code, name one worker owner and decide which checkout's task version you're testing. Keep the other agent on static checks until the handoff.

  • Confirm an unknown process's project and owner before stopping it.
  • A separate app port or database doesn't create a separate Trigger.dev project.

Keep one dev worker and retry one safe test

After checking with the owners, stop the extra worker and leave one on the intended checkout. Confirm it registers and prints the expected dashboard link. Run the task's Test in Development with a safe payload and follow the run to a terminal state.

The dashboard test skips your app's trigger route, so repeat the app action only after it passes.

  • Use harmless payloads when tasks can email, charge or call paid APIs.
  • Don't rerun a side-effecting task until you know whether an earlier run executed.
  • If one worker still can't consume, follow the new run's state and error; the duplicate worker may not be the only cause.

Check the app's trigger path

Repeat the original browser or API action on the same checkout. The backend needs a Development environment key; compare the new run's project and environment with the worker's, and keep the key out of prompts and screenshots.

No new run means checking the backend response and how secrets load. A failed run needs its own trace. The worker and website are separate processes, even when Canopy starts both with one click.

  • Record the branch, app URL, backend route, task ID and resulting run ID.
  • Check the latest task code and worker registration after the agent's final edit.

Make the multi-agent setup repeatable

Save the app, API and Trigger.dev commands in Canopy, and label the Trigger.dev component as the project's one worker. Document which worktree runs it and how another agent asks for a handoff. When you return, check live processes instead of assuming saved commands are running. If you add a second project or preview environment, record its project reference, task registration and test run. A second Git branch is not a second Trigger.dev environment.

Copyable resources

Queued development run triage

Use redacted identifiers and harmless payloads. Never share secret keys or private run data publicly.

App action, URL, checkout and branch: [ ]
Task ID and Trigger.dev project/environment: [ ]
Run ID, created time, state and last update: [ ]
Workers found: [PID or Canopy component, path, branch, project ref]
Single worker owner: [ ]
Other worker stopped after owner check: [ ]
Dashboard test payload and run ID/state: [ ]
App-created run ID/state after direct test: [ ]
If still failing, first failing boundary and error: [ ]
Final task code commit, worker output and owner: [ ]

Frequently asked questions

Can two agents each run trigger.dev dev for one project?

Trigger.dev's troubleshooting docs say only one local dev instance can consume from a project's dev environment at a time. Name one worker owner, or set up and verify separate projects or supported environments.

Why is my task not listed at all?

That's a registration or project/environment problem, not a queue problem yet. Check the selected project, trigger.config.ts, task directories and worker startup output.

The dashboard test passes, but my button creates no run. What next?

Inspect the browser-to-backend request and the backend's Trigger.dev project, Development key, response and sanitized logs. The dashboard test bypasses your app's trigger path.

Does saving a Canopy server command keep the worker alive?

No. A saved command makes startup repeatable. Check the live process and Trigger.dev run state when you come back.

More questions and answers →

Sources and further reading