Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2ccc533cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| emit(EventType.WORKFORCE_COMPLETED, self.name, {}) | ||
| return report, None | ||
| emit(EventType.WORKFORCE_COMPLETED, self.name, {}) | ||
| return report, None |
There was a problem hiding this comment.
Preserve swarm history when handing off between workers
This path returns only the most recent worker report, so any earlier swarm legs are discarded after a handoff chain. In a run like A -> B where A executes tools before transferring, the final report from B no longer contains A's tool_calls, metrics, or errors, which makes completed runs look incomplete and can hide failed tool executions in earlier legs. The same overwrite pattern is also present in _aresume_swarm_stage.
Useful? React with 👍 / 👎.
Summary
Major release with swarm mode, typed events, structured output improvements, and significant refactor of the orchestration layer.
Changes
New Features
transfer_to_agent_tool()enables dynamic agent-to-agent transfers with context passing in Workforce swarm modeEventType.RUN_STARTED,EventType.TOOL_COMPLETED, etc.)json_schema→json_object→ tools for providers with varying capabilitiesBug Fixes
json_schemaresponse format (e.g., DeepSeek)Refactor
Documentation
docs/tutorials.mdwith tested examplesExamples
coding_agentexample with--prompt,--swarm,--no-streamflags