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
When I answer a parked approval and the resumed run fails to start, the approval is gone. It is
marked as answered before the run is known to have started, so there is nothing left to retry and
nothing that records that it failed.
I expect an approval to stay open until the run it unblocks has actually started, and to show me
that something went wrong when it has not.
Steps to reproduce
Run an agent until it parks on a tool that needs approval. A row appears in session_interactions with status pending.
Answer it: POST /sessions/interactions/{interaction_id}/respond.
The endpoint returns 200. The row is now responded. The run never started.
There is no way to answer that approval again, and no record anywhere that the resume failed.
What the code does
respond_interaction (api/oss/src/apis/fastapi/sessions/router.py:775) transitions the row to responded first, and the transition is guarded so it can only happen once. Only then does it
enqueue the resume. The worker's failure is logged and dropped:
oss.src.core.workflows.types.WorkflowDetachedStartFailed:
Workflow service returned HTTP 500 on detached start
Suggested shape
Either mark the row answered only once the resume has started, or transition it back to pending
when the start fails and record the error on the row so it is visible.
When I answer a parked approval and the resumed run fails to start, the approval is gone. It is
marked as answered before the run is known to have started, so there is nothing left to retry and
nothing that records that it failed.
I expect an approval to stay open until the run it unblocks has actually started, and to show me
that something went wrong when it has not.
Steps to reproduce
session_interactionswith statuspending.POST /sessions/interactions/{interaction_id}/respond.hit, the agent's saved configuration was invalid ((bug) An agent with a bodyless skill runs in the playground and 500s everywhere else #5591).
responded. The run never started.What the code does
respond_interaction(api/oss/src/apis/fastapi/sessions/router.py:775) transitions the row torespondedfirst, and the transition is guarded so it can only happen once. Only then does itenqueue the resume. The worker's failure is logged and dropped:
Suggested shape
Either mark the row answered only once the resume has started, or transition it back to pending
when the start fails and record the error on the row so it is visible.
Notes
Found while testing the approvals work on #5562.