codex - 💡(How to fix) Fix Multiple sub-agents + typing randomly breaks TUI [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21209Fetched 2026-05-06 06:24:51
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2renamed ×1
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

v0.128.0

What subscription do you have?

Pro

Which model were you using?

irrelevant

What platform is your computer?

Windows

What terminal emulator and version are you using (if applicable)?

Windows Terminal

What issue are you seeing?

Codex stopped reacting to any input and updating output in the middle of long multi-agents flow. The cursor is blinking but nothing else works. I can see the progress by resuming the same session in another instance but I it doesn't show sub-agents. Similar issue happened to me several times previously when I switch to sub-agent, then tried to switch back, started typing "/ag" and tui was blocked the same way.

It doesn't matter how long I wait, it just stays this way forever.

What steps can reproduce the bug?

It just happens randomly. I'm certain that it's threading synchronization issue. It only happens when I run 4+ sub-agents in parallel. Probably it's easier to reproduce if you run 10+ and keep actively switching between them and typing in the main context.

Uploaded thread: 019df509-ba14-7320-97b7-a5e14eb4f5a2

What is the expected behavior?

TUI keeps working without hanging

Additional information

No response

extent analysis

TL;DR

The issue is likely related to a threading synchronization problem when running multiple sub-agents in parallel, and a potential fix could involve modifying the Codex CLI to handle threading more efficiently.

Guidance

  • The problem seems to occur when running 4+ sub-agents in parallel, so trying to reproduce the issue with a smaller number of sub-agents may help isolate the problem.
  • Reviewing the uploaded thread (019df509-ba14-7320-97b7-a5e14eb4f5a2) may provide more insight into the threading synchronization issue.
  • Temporarily reducing the number of sub-agents run in parallel may serve as a workaround to prevent the TUI from hanging.
  • Investigating the Codex CLI's threading implementation and potential deadlocks or race conditions could help identify the root cause of the issue.

Notes

The issue seems to be related to the specific version of Codex CLI (v0.128.0) and the Pro subscription, but without more information about the Codex CLI's internal workings, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: reducing the number of sub-agents run in parallel, as this may help prevent the TUI from hanging while the underlying issue is investigated and addressed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING