mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-01 01:12:43 -05:00
fix: a native Codex chat stops as soon as one of its subagents finishes (#35230)
When Codex started a subagent in a native Codex chat, the chat ended the moment that subagent finished, even though the main task was still working. The reply was saved as finished with whatever had arrived so far, and Codex recorded the main task as interrupted. A failing subagent also failed the whole chat with its own error. The chat now ends only when the main task itself finishes, and an error from the main task still shows. Fixes #35226
This commit is contained in:
1 parent
7e2b509869
commit
529bb58b9a
1 file changed
+3
@@ -169,6 +169,9 @@ async def run(transport, output, prompt, images, options):
|
||||
)
|
||||
elif method == 'turn/completed':
|
||||
turn = params.get('turn') or {}
|
||||
# Subagent turns complete on this stream too.
|
||||
if turn.get('id') != turn_id:
|
||||
continue
|
||||
if turn.get('status') == 'failed' or turn.get('error'):
|
||||
raise ValueError(str(turn.get('error') or 'Codex turn failed'))
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user