Codex "turn/start failed in TUI" and 503 on compact
Codex shows "Error: turn/start failed in TUI" or a 503 when it compacts context? What one report says, how to resume your session, and what to send support.
TroubleshootingUpdated 4 min read
On this page
You were working in Codex, and messages stopped sending. The interface turned red, or the terminal filled with this:
Error: turn/start failed in TUISometimes a 503 shows up right when Codex compacts a long conversation. This article covers what is known, what is not, and how to get your work back.
As of November 2026, we found one user report about this (last seen May 20, 2026). It has no confirmed fix, and we have not reproduced the error. The steps below are ways to get unstuck, not a guaranteed cure.
Why it happens
The cause is not confirmed. What the report says:
- A 503 during compaction. "503 Service Unavailable" is an HTTP status meaning the server could not handle the request. One person reported seeing 503 errors when Codex compacts the context. Why compaction would trigger it is not known.
- Failures in both the app and the CLI. The original poster saw messages stop sending in both at once and the interface "go all red". That pattern is consistent with a shared problem, but the report does not confirm an incident.
- A TUI error after feedback. The poster sent feedback from inside the failing session, and the whole terminal filled with
Error: turn/start failed in TUI. We can't say whether the feedback step caused it or only exposed it. - An old build. Possible in general, but the poster checked for an update and it made no difference.
| Symptom | Possible cause | What to do |
|---|---|---|
| Messages stop sending, UI turns red | Unconfirmed, possibly service-side | Wait, then resume the session |
| 503 while compacting | Server returned "Service Unavailable" | Stop retrying, try later |
Terminal filled with turn/start failed in TUI | Unknown | Close the tab, reopen, codex resume --last |
A /side conversation vanished after a window refresh | Unknown | Try codex resume from the same folder |
Step-by-step fixes
1. Pause and wait out the 503
- Stop sending messages for a few minutes.
- Check OpenAI's status page for an incident.
- Send one short message. If it goes through, carry on.
- If it fails again, quit Codex and come back later instead of retrying in a loop.
2. Check what the agent finished
Neither command below changes anything.
git status
git diff --statgit status lists changed files, and git diff --stat shows how many lines changed in each. Commit or stash what you want to keep before the agent continues.
3. Resume the session
- Close the stuck terminal tab and open a new one.
- Run
cdinto the project folder where you started the session. - Resume the most recent session:
codex resume --lastThis asks Codex to continue the latest session. Subcommands and options can differ by version, so check codex --help for yours. If the 503 returns right after you resume, wait rather than resuming repeatedly.
4. Recover a conversation that disappeared
In the report, a /side conversation vanished after a window refresh and could not be resumed, even though CLI logs for it existed. That suggests the data may not be gone.
- Open a terminal in the folder where you started the work.
- Run
codex resumeand look for the session in the list. - If it is there, select it and continue.
We can't confirm where Codex stores these logs or whether a /side conversation can always be resumed. If resume does not find it, contact OpenAI support.
5. Update Codex to rule out an old build
Update the same way you installed Codex. To see your current version:
codex --versionThe original poster updated and saw no change, so do this to rule out an old build, not as the likely cure.
Checklist before you try again
- You waited a few minutes and checked OpenAI's status page.
- You ran
git statusand saved or stashed work you want to keep. - You opened a new terminal in the same project folder.
- You used
codex resume --lastor picked the session fromcodex resume. - You are not resuming in a loop if the 503 keeps returning.
If nothing works
Contact OpenAI support. Include:
- The exact text:
Error: turn/start failed in TUI, plus any 503 message. - Your Codex version from
codex --version, and whether you use the app or the CLI. - The time it happened, with your time zone.
- Whether it happened during context compaction.
- How you sign in (ChatGPT account or API key).
- What you already tried: waiting, resuming, updating.
A message you can copy:
Codex fails with "Error: turn/start failed in TUI" and a 503 when it compacts context.
Version: (output of codex --version)
Client: CLI or app, macOS (your version)
Sign-in: ChatGPT account or API key
Time of failure: (date, time, time zone)
Tried: waited, codex resume --last, updated Codex.
The session is not recoverable from the app. Can you help restore it
or confirm whether there was an incident at that time?Common questions
Is the 503 caused by my Mac or my connection?
A 503 is a status the server returns, so it often points to the service rather than your setup. For this specific error, that is not confirmed.
Will codex resume --last bring back my work?
It asks Codex to continue the most recent session. Files the agent already wrote are in your project folder either way, so check them with git status.
Can I avoid the error during compaction?
We don't know a reliable way. Waiting out the error beats retrying in a loop.