Bug Description
Interactive workflows with approval gates (interactive loop nodes with gate_message) cannot resume after the user approves. The workflow pauses correctly, the approval is recorded in the DB, but the resume never triggers.
Steps to Reproduce
- Create a DAG workflow with
interactive: true at the workflow level
- Include an interactive loop node with
gate_message (e.g., a plan approval gate)
- Run the workflow from the web UI
- Workflow runs through prior nodes, pauses at the interactive gate
- Approve via the UI button or by typing in chat
- Expected: workflow resumes from the paused node
- Actual: no further events are written; the run stays in
failed status
Root Cause
In packages/core/src/orchestrator/orchestrator-agent.ts, dispatchOrchestratorWorkflow has three dispatch paths:
- Resumable run detected (line ~269) — calls
executeWorkflow with 9 args
- Interactive workflow (line ~282) — calls
executeWorkflow with 9 args
- Background workflow — calls
dispatchBackgroundWorkflow which pre-creates the run with parent_conversation_id set
Paths 1 and 2 never pass parentConversationId (the 11th parameter of executeWorkflow), so it's stored as NULL in remote_agent_workflow_runs.
When the approval is processed, the resume lookup at findResumableRunByParentConversation (in packages/core/src/db/workflows.ts) queries:
WHERE parent_conversation_id = $2
This never matches NULL, so the resumable run is never found and the workflow never resumes.
Evidence
Queried the DB for a real workflow run that hit this:
id: 6e4d0513...
workflow_name: compliance-phase
status: failed
parent_conversation_id: NULL <-- this is the problem
Events show approval_received but no subsequent node execution events.
Environment
- Archon v0.3.6 (dev branch, commit a4242e6)
- Platform: web UI
- Database: SQLite
Proposed Fix
Pass conversation.id as parentConversationId for the interactive and resumable-run branches in dispatchOrchestratorWorkflow, matching what the background workflow path already does via the pre-created run.
Bug Description
Interactive workflows with approval gates (interactive loop nodes with
gate_message) cannot resume after the user approves. The workflow pauses correctly, the approval is recorded in the DB, but the resume never triggers.Steps to Reproduce
interactive: trueat the workflow levelgate_message(e.g., a plan approval gate)failedstatusRoot Cause
In
packages/core/src/orchestrator/orchestrator-agent.ts,dispatchOrchestratorWorkflowhas three dispatch paths:executeWorkflowwith 9 argsexecuteWorkflowwith 9 argsdispatchBackgroundWorkflowwhich pre-creates the run withparent_conversation_idsetPaths 1 and 2 never pass
parentConversationId(the 11th parameter ofexecuteWorkflow), so it's stored asNULLinremote_agent_workflow_runs.When the approval is processed, the resume lookup at
findResumableRunByParentConversation(inpackages/core/src/db/workflows.ts) queries:This never matches
NULL, so the resumable run is never found and the workflow never resumes.Evidence
Queried the DB for a real workflow run that hit this:
Events show
approval_receivedbut no subsequent node execution events.Environment
Proposed Fix
Pass
conversation.idasparentConversationIdfor the interactive and resumable-run branches indispatchOrchestratorWorkflow, matching what the background workflow path already does via the pre-created run.