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
PR #147 improves the OpenCode dispatch prompt by switching child phase examples from background TaskOutput polling to synchronous Task(..., run_in_background: false) calls.
However, after additional testing, this appears to be only a mitigation, not a root fix.
In long conversations, the dispatch agent can still mis-handle child completion, and the underlying TaskOutput / background_output behavior can still report completion or error before the child session has truly finished.
Summary
PR #147 improves the OpenCode dispatch prompt by switching child phase examples from background
TaskOutputpolling to synchronousTask(..., run_in_background: false)calls.However, after additional testing, this appears to be only a mitigation, not a root fix.
In long conversations, the dispatch agent can still mis-handle child completion, and the underlying
TaskOutput/background_outputbehavior can still report completion or error before the child session has truly finished.Why PR #147 is not sufficient by itself
The PR changes Trellis prompts/templates, but it does not change the underlying runtime semantics of background task completion.
We now have evidence that:
In real usage,
background_output/TaskOutputcan disagree withsession_info/session_readerrorThis is especially visible in longer sessions
There is at least one environment-level signal that the runtime/wrapper can override the requested mode
run_in_background=false was automatically converted to background mode for reliability monitoringCurrent understanding
Based on inspection so far:
TaskOutput/background_outputcompletion state machineLikely root-cause area
The real fix likely needs to happen in one of these lower layers:
oh-my-openagentor another environment-level integration layer if it wraps subagent executionWhat would be a real fix
A real fix would make background task completion depend on the child session reaching a terminal state, rather than only the wrapper task returning.
In other words,
TaskOutput/background_outputshould not reportcompleted/errorwhile the associated child session is still actively progressing.Suggested next step
Related