codex - 💡(How to fix) Fix Deleting files without permission [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#19202Fetched 2026-04-24 05:58:51
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2closed ×1cross-referenced ×1

Fix Action

Fix / Workaround

In a fresh Codex session on April 23, 2026, I asked: "make a slide deck based on the pdf in this directory." The agent inspected the directory, found rolnick24a.pdf and an existing slides.html, then issued an apply_patch that deleted slides.html outright before recreating it. I did not ask it to delete the file or authorize destructive changes. After I objected, it restored the file. This is unsafe default behavior: existing user files should not be deleted as part of a normal edit flow.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.124.0

What subscription do you have?

plus

Which model were you using?

gpt-5.4

What platform is your computer?

No response

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

No response

What issue are you seeing?

In a fresh Codex session on April 23, 2026, I asked: "make a slide deck based on the pdf in this directory." The agent inspected the directory, found rolnick24a.pdf and an existing slides.html, then issued an apply_patch that deleted slides.html outright before recreating it. I did not ask it to delete the file or authorize destructive changes. After I objected, it restored the file. This is unsafe default behavior: existing user files should not be deleted as part of a normal edit flow.

What steps can reproduce the bug?

idk

What is the expected behavior?

Expected behavior: in-place edits by default; no delete-first replacement of existing files; explicit confirmation before destructive operations.

Additional information

No response

extent analysis

TL;DR

The issue can be mitigated by configuring the Codex CLI to require explicit confirmation before performing destructive operations, such as deleting existing files.

Guidance

  • Review the Codex CLI documentation to see if there's a configuration option or flag that can be set to require confirmation before deleting files.
  • Check if the gpt-5.4 model has any specific settings or overrides that may be causing this behavior.
  • Consider using a different model or version to see if the issue persists.
  • Look into setting up a test environment to reproduce the issue and experiment with different configurations.

Example

No code snippet is provided as the issue does not imply a specific code-related solution.

Notes

The lack of information about the platform, terminal emulator, and version may limit the ability to provide a comprehensive solution. Additionally, the issue may be specific to the gpt-5.4 model or the 0.124.0 version of the Codex CLI.

Recommendation

Apply workaround: Configure the Codex CLI to require explicit confirmation before performing destructive operations, as this is a safer default behavior that aligns with the expected behavior described in 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