codex - 💡(How to fix) Fix Codex app: subagent close request triggers "agent loop died unexpectedly" and repeated message submit failures

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…

While using the Codex desktop app, trying to ask subagents to close caused task creation/message submission to fail repeatedly.

Error Message

Error shown

Error creating task failed to start turn: internal error; agent loop died unexpectedly Error submitting message The app should either close/stop the subagents cleanly or return a recoverable user-facing error without breaking message submission in the thread. The app displayed the internal error agent loop died unexpectedly, and subsequent attempts to submit messages showed Error submitting message repeatedly.

Root Cause

While using the Codex desktop app, trying to ask subagents to close caused task creation/message submission to fail repeatedly.

Code Example

Error creating task
failed to start turn: internal error; agent loop died unexpectedly

---

Error submitting message

---

0cb0ad3a-6818-4bdc-bf26-8e2ac6ba158e
RAW_BUFFERClick to expand / collapse

Summary

While using the Codex desktop app, trying to ask subagents to close caused task creation/message submission to fail repeatedly.

Error shown

Error creating task
failed to start turn: internal error; agent loop died unexpectedly

The thread then showed repeated:

Error submitting message

Trigger / context

  • Action attempted: asked subagents to close / wrap up.
  • Surface: Codex desktop app on macOS.
  • Model/UI state visible in screenshot: 5.5 Extra High, Custom profile.
  • Approximate time: 2026-05-21 around 8:55 PM ET.

Feedback trace

The app uploaded a performance trace and showed this Feedback ID:

0cb0ad3a-6818-4bdc-bf26-8e2ac6ba158e

Expected behavior

The app should either close/stop the subagents cleanly or return a recoverable user-facing error without breaking message submission in the thread.

Actual behavior

The app displayed the internal error agent loop died unexpectedly, and subsequent attempts to submit messages showed Error submitting message repeatedly.

Related issues checked

I found some broadly similar open issues around task creation/app failures, but did not find this exact subagent-close trigger with the uploaded feedback trace ID.

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…

FAQ

Expected behavior

The app should either close/stop the subagents cleanly or return a recoverable user-facing error without breaking message submission in the thread.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex app: subagent close request triggers "agent loop died unexpectedly" and repeated message submit failures