Find your problem by the symptom or the exact error text below. Each fix says which Codex surface and OS it applies to, and links to OpenAI's own documentation. If nothing matches, run codex --version, note your OS, and search the openai/codex GitHub issues before opening a new one.
Before you dig in
Update first. Many problems are fixed in newer releases. See update Codex.
Turn on a log for the CLI: codex -c log_dir=./.codex-log, then read ./.codex-log/codex-tui.log.
Know where logs live. Session transcripts are in ~/.codex/sessions. macOS desktop app logs are in ~/Library/Logs/com.openai.codex/. Review logs for secrets before sharing them.
Send feedback from Codex. Type / in the composer and choose feedback to get a session ID you can share with OpenAI.
In this section
Fix "codex: command not found"You installed Codex but the terminal says command not found or 'codex' is not recognized. Open a new terminal, find the binary, and fix your PATH.
Fix Codex not following your AGENTS.mdCodex doesn't load AGENTS.md, loads stale or wrong guidance, or truncates it. Check the workspace root, overrides, fallback names, size limit, and CODEX_HOME.
Fix Codex failing in WSL1Codex stopped working inside WSL after an update? From Codex 0.115 the Linux sandbox uses bubblewrap, which needs WSL2. Check your WSL version and convert.
Fix Git not detected for projects opened from \\wsl$The Codex desktop app on Windows doesn't detect Git, or Git features are missing, for projects opened from the WSL filesystem. Install Git natively and move the project.