Turns and events
Submit Codex work and consume the structured events produced while it runs.
A turn is one user request in a thread. run() waits for completion and returns a turn result; runStreamed() returns an async event sequence.
Items include agent_message, reasoning, command_execution, file_change, mcp_tool_call, web_search, todo_list, and error. Command executions and MCP calls expose an in-progress and completed/failed lifecycle. The MCP server represents the same operations with turn/start, turn/steer, and turn/interrupt, and emits codex/event/* notifications.
2026幎8æ31æ¥ã«æŽæ°