Skip to main content

Wait for token

Inside your run function it would be useful to be able to pause execution until something external has happened.

We had a feature called "wait for event" in v2 that allowed you to do this. You could then send an event from your own code and the run would continue where it left off.

An example might be for an application process where the application needs to go through an approval step e.g. an AML check.

There would be a timeout of how long it would wait, with a default.

Status: Completed5 comments

Comments5

  • mattaitken

    Team•

    Apr 17, 2025

    This is now available in our v4 beta

    https://trigger.dev/blog/v4-beta-launch

  • Dmitrii Bykov (sukazavr)

    •

    Mar 2, 2025

    I believe this feature request is a subset of API for Task Manual Pause & Resume

  • Slava Kurilyak

    •

    Nov 8, 2024

    +1 for this feature as it would unlock human-in-the-loop workflows when using AI agents

  • Aaron J. Spurlock

    •

    Oct 3, 2024

    100% would be amazing to be able to do this again.

  • Fergus Ferrier

    •

    Sep 1, 2024

    I don’t see how human in the loop flows are practical without this.