#761 Engine: workflow result empty after sleep/resume (deferred get_status shows {})

closed medium Created 2026-06-21 03:38 · Updated 2026-06-21 03:55

Description

Edit
_select_workflow_result (inline_executor/core.py:210) returns the LAST task's {task}.result variable. For workflows that durably sleep and RESUME (e.g. a builder.wait deferred agent), get_status returns result.output={} even though the work completed and agent_result IS populated in workflow_state. Non-resumed run_goal surfaces the agent answer fine; only the sleep/resume path loses it. The docstring claims resume-independence but empirically the resumed run's top-level result is empty. Repro: MCP run_goal_deferred(goal, delay_seconds=30) -> completes, agent_result set, but get_status result={}. Likely the result column is computed at a point where the last task's .result isn't yet committed on the resume path, or last-task selection differs after rebuild. Does NOT affect whether the deferred job runs (it does, unattended). Fix engine-side so deferred/scheduled runs surface their final answer in get_status.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...