codex - 💡(How to fix) Fix infinite loop [2 comments, 3 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#20830Fetched 2026-05-03 04:44:43
View on GitHub
Comments
2
Participants
3
Timeline
10
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2closed ×1cross-referenced ×1

Error Message

WARNING: failed to clean up stale arg0 temp dirs: Acceso denegado. (os error 5) WARNING: proceeding, even though we could not update PATH: Acceso denegado. (os error 5) at path "C:\Users\antoi\.codex\tmp\arg0\codex-arg0AZeqPr" WARNING: failed to clean up stale arg0 temp dirs: Acceso denegado. (os error 5) WARNING: proceeding, even though we could not update PATH: Acceso denegado. (os error 5) at path "C:\Users\antoi\.codex\tmp\arg0\codex-arg0asG9ws"

Fix Action

Fix / Workaround

• I need to implement a settings screen, ensuring I adhere to the AGENTS framework, which includes state, scope, planning, changes, validation, and evaluating risk in the final product. For this, I’ll need to utilize tools like functions.shell_command and apply_patch. I should start with a targeted search in the app’s main Java directory and use rg for Ollama and baseUrl. I’ll run the necessary shell commands to kick this off.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.128.0

What subscription do you have?

Gpt Plus

Which model were you using?

gpt 5.2 and 5.4 codex both

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

VSCode and AndroidStudio

What issue are you seeing?

it keeps repeating its actions and does not finish anything and it keeps running out my tokens without doing anything. look at this: • Ran codex --version └ codex-cli 0.128.0 WARNING: failed to clean up stale arg0 temp dirs: Acceso denegado. (os error 5) WARNING: proceeding, even though we could not update PATH: Acceso denegado. (os error 5) at path "C:\Users\antoi\.codex\tmp\arg0\codex-arg0AZeqPr"

⚠ Skill descriptions were shortened to fit the 2% skills context budget. Codex can still see every skill, but some descriptions are shorter. Disable unused skills or plugins to leave more room for the rest.

• Context compacted

• I need to implement a settings screen, ensuring I adhere to the AGENTS framework, which includes state, scope, planning, changes, validation, and evaluating risk in the final product. For this, I’ll need to utilize tools like functions.shell_command and apply_patch. I should start with a targeted search in the app’s main Java directory and use rg for Ollama and baseUrl. I’ll run the necessary shell commands to kick this off.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• Scope (archivos a tocar, preliminar): voy a ubicar MainActivity/NavHost y el cliente de Ollama para ajustar solo esos puntos, y luego añadir una pantalla nueva Settings + un helper mínimo de persistencia (probablemente SharedPreferences o lo que ya exista). Ahora hago una búsqueda dirigida por Ollama, baseUrl y api/chat.

• Ran Get-ChildItem -Force └

… +20 lines (ctrl + t to view transcript)

◦ Implementing settings screen (2m 43s • esc to interrupt) I ran codex --version and it has >2m, doing what? look ⚠ Skill descriptions were shortened to fit the 2% skills context budget. Codex can still see every skill, but some descriptions are shorter. Disable unused skills or plugins to leave more room for the rest.

• Context compacted

• Ran codex --version └ codex-cli 0.128.0 WARNING: failed to clean up stale arg0 temp dirs: Acceso denegado. (os error 5) WARNING: proceeding, even though we could not update PATH: Acceso denegado. (os error 5) at path "C:\Users\antoi\.codex\tmp\arg0\codex-arg0asG9ws"

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue. it didn't use to have this WRONG behavior previously.

What steps can reproduce the bug?

Uploaded thread: 019de952-e37f-72d0-b022-34683bd45b52

What is the expected behavior?

I was trying to adjust the UX of an app that I am developing for myself.

Additional information

No response

extent analysis

TL;DR

The issue might be resolved by addressing the "Acceso denegado" (access denied) errors and cleaning up stale temporary directories.

Guidance

  • Investigate and resolve the "Acceso denegado" (os error 5) issues, which may be causing the Codex CLI to fail to clean up temporary directories and update the PATH.
  • Check the permissions on the directories mentioned in the warnings (e.g., "C:\Users\antoi\.codex\tmp\arg0\") to ensure that the Codex CLI has the necessary access rights.
  • Consider disabling unused skills or plugins to free up space in the skills context budget, as suggested by the warning message.
  • Verify that the issue is not related to the specific model or version being used (gpt 5.2 and 5.4 codex) by trying a different model or version.

Notes

The issue may be related to a recent change in the Codex CLI or the system configuration, as the user mentions that the behavior did not occur previously.

Recommendation

Apply workaround: Address the "Acceso denegado" errors and clean up stale temporary directories to see if it resolves the issue.

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

codex - 💡(How to fix) Fix infinite loop [2 comments, 3 participants]