You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unified exec never detaches from long-running streaming commands (e.g. docker compose logs --follow) #5948
Running docker compose logs --follow <service> through Codex (and other streaming commands listed below) causes the agent to stay attached to the output indefinitely. Unified exec keeps the PTY session open, so the run remains “in progress” even after hours with no new output unless Ctrl‑C is sent manually.
What steps can reproduce the bug?
In an interactive Codex session, ask the agent to inspect container logs (e.g. “run docker compose logs --follow web”).
Approve the unified exec command if prompted.
Observe that the agent starts tailing the logs but never exits, even when there is no new output.
What is the expected behavior?
Either:
unified exec should timeout/auto‑detach from indefinite streaming commands, or
Codex should fall back to the regular shell tool (which enforces the default timeout) unless the user explicitly asks for a persistent session, or
the UI should surface a way to send Ctrl‑C/terminate the session automatically once the agent has gathered enough context.
Additional information
The default shell tool path applies a 10 s timeout (codex-rs/core/src/exec.rs) but unified exec does not (codex-rs/core/src/unified_exec/session_manager.rs).
The hang in my example persisted for ~10 hours until the process was manually interrupted.
Other commands that are expected to exhibit the same issue: tail -f, kubectl logs -f, journalctl -f, watch …, npm run dev, cargo watch, docker compose up, python manage.py runserver, top/htop, or any PTY-driven command that streams until interrupted.
Activity
github-actions commentedon Oct 30, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
next dev) #5229Powered by Codex Action
marcohefti commentedon Oct 30, 2025
Duplicate of #5229