Skip to content

Feature request: Support resumable tool results (submitToolOutputs / long-lived human-in-the-loop tools) #517

@mindtricksdev

Description

@mindtricksdev

We’re building an MCP-style UI flow where a tool needs to request user input from a frontend and resume later (human-in-the-loop).

Today, tools must return immediately. There is no supported way to:
pause a tool execution
wait for user input (minutes later)
and then submit the tool result back into the same session.

We tried holding an async Promise open (e.g. 5–10 minutes), but the session times out / disconnects.
It would be very helpful to support a resumable pattern similar to:

session.submitToolOutputs({
  toolName: "renderUI",
  requestId,
  output: userData
});

or an equivalent API to resume a pending tool call.
This would enable:

  • MCP-style UI tools
  • human approval flows
  • long-running external workflows
  • durable agent state across frontend interactions

Is this pattern on the roadmap, or is there a recommended way to implement human-in-the-loop tools today?

At the moment, I rely on prompt engineering so the assistant finishes with a renderUI tool call, then I capture the UI input and send it back as a new user message. This works, but it’s suboptimal because it introduces an extra round-trip rather than continuing the original tool execution.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions