codex - 💡(How to fix) Fix Panic crash: codex panics and cannot recover without closing terminal if we move folder it was opened in [1 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#17454Fetched 2026-04-12 13:28:32
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1unlabeled ×1
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.120.0

What subscription do you have?

plus

Which model were you using?

No response

What platform is your computer?

Darwin 25.4.0 arm64 arm

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

zed

What issue are you seeing?

If we open codex instance in terminal in certain folder, and then remove/move folder it was inside of it, it tends to panic and crash, in a way where we cannot control+c to leave this window, but instead it hangs the whole terminal window, and we have to close it manually.

What steps can reproduce the bug?

  1. Open codex instance in a subdirectory
  2. Remove that subdirectory, or move it
  3. Codex will throw crash/panic information and not be able to recover

What is the expected behavior?

It should insert information about path being changed during operation, and either gracefully exit, or give that information and not crash afterwards, just hang and deny working until the path is restored

Additional information

No response

extent analysis

TL;DR

The issue can be mitigated by ensuring the directory where the Codex instance is running is not removed or moved while the instance is active.

Guidance

  • Verify that the Codex instance is properly handling directory changes by checking for any updates or patches to version 0.120.0 that may address this issue.
  • When working with Codex, avoid removing or moving the directory where the instance is running to prevent crashes.
  • If a crash occurs, try to identify any patterns or specific actions that lead to the crash to provide more detailed information for further troubleshooting.
  • Consider submitting a bug report with detailed steps to reproduce the issue, as this behavior is not the expected outcome.

Example

No specific code snippet is applicable in this case, as the issue seems related to the interaction between the Codex CLI and the operating system rather than a code-level problem.

Notes

The exact cause of the crash is not specified, and without more information about the Codex instance's internal workings or any error messages produced during the crash, it's challenging to provide a definitive fix. The guidance provided is based on the information given and aims to help mitigate the issue.

Recommendation

Apply workaround: Avoid removing or moving the directory where the Codex instance is running while it is active, as this seems to trigger the crash. This approach is recommended because it directly addresses the observed behavior and can help prevent the issue until a more permanent fix is available.

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