Fix race conditions and improve error handling
Open 💬 2 comments Opened Jun 3, 2026 by Tornadoguy69
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Summary
- Agent control subscription race condition: Check status before subscribing
- User shell timeout: Replace 1-hour timeout with
ExecExpiration::Cancellation - Sensitive pattern checking: Prevent saving API keys/tokens in history
- Audio queue capping: Cap output queue at ~5s to prevent playback overrun
Branch with changes: https://github.com/Tornadoguy69/codex/tree/fix/race-conditions-openai
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the references. My changes are related but distinct — they focus on race conditions in agent control subscription, user shell timeout cancellation, and audio queue capping, rather than the close_agent hang specifically. Keeping this open for now.