Skip to content

Human-in-the-Loop Functionality: How to Pause Threads Mid-Run for Input?  #4

@MePriyanshuHoo

Description

Issue with current functionality:
I couldn’t find a clear way in the API to pause a thread’s run midway, wait for user input, and then resume. This is problematic for workflows that require human intervention during execution, as there doesn’t seem to be a mechanism to handle this scenario.

For example:

  • Endpoints like /threads/{thread_id}/runs/wait are designed to wait for final output but don’t seem to support pausing mid-run for input.
  • /threads/{thread_id}/runs/stream streams output in real-time, but I’m not sure if it allows for dynamic input injection while the run is active.

Idea or request:
It would be helpful to have:

  1. A way to pause a run at a specific stage, hold its state, and await input.
  2. Documentation or examples showing how to provide input dynamically during a run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions