Bug: Error log when collab event channel closes on shutdown
What version of Codex is running?
codex --version reports codex-cli 0.88.0 / 0.0.0 when built from source at commit 2ca9a5652887337a9b8ee3fe0a5d2c720abaa10d (main).
What subscription do you have?
Pro (internal testing)
Which model were you using?
5.2-codex
What platform is your computer?
Apple Mac Mini M4 - Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Non-interactive zsh session (observed on stderr output)
What issue are you seeing?
After collab multi-agent runs, the CLI logs an error line on shutdown:failed to send tool call event: sending into a closed channel.
This appears to be a benign shutdown race; send only fails when the channel is closed, so the error-level log is noisy and misleading.
What steps can reproduce the bug?
- Run
codex exec --json --enable collabwith a prompt that spawns a sub-agent and closes it (e.g., ask it tospawn_agent,wait,close_agent). - Observe stderr at the end of the run; an error log line appears when the session closes.
What is the expected behavior?
No error-level log on normal shutdown; ideally log at debug level (or suppress) when the channel is closed.
Additional information
I have a minimal fix that downgrades the log to debug in codex-rs/core/src/codex.rs for this case. I can link a PR once prepared.