How to make it ask me before every single edit?

Open 💬 6 comments Opened May 24, 2026 by weathon
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

VScode extendion

What feature would you like to see?

How to make it ask me before every edit like it used to be? Now I have to wait for it to finish and revert it if I do not like it. It also ran stuff without asking me and change direction without asking me. I want it to ask me for approval for every single edit

Additional information

_No response_

View original on GitHub ↗

6 Comments

yui-stingray · 3 months ago

Thanks for the request. I couldn't find a dedicated "ask before every single edit" setting in the current Codex docs or repo.

The supported controls I found for this are approval_policy, sandbox_mode, and approvals_reviewer, and the CLI / IDE extension / Codex app share the same configuration model.

Closest current options are:

  • approval_policy = "on-request"
  • sandbox_mode = "read-only" if you want Codex to ask before making edits, running commands, or accessing the network
  • sandbox_mode = "workspace-write" if you want automatic edits inside the workspace, with approval prompts for escalation such as writing outside the workspace or using network access

In the CLI/TUI you can also adjust this mid-session with /permissions. I did not find a VS Code extension-specific per-edit approval setting in the repo, so if the extension UI does not expose a strict read-only/on-request preset, that may be the feature gap.

jshaofa-ui · 3 months ago

🔧 Proposed Solution

Root Cause

Codex's permission model uses "approve once, execute many" — the permission gate exists at the task level, not the edit level. Users want granular control over individual edits.

Fix

  1. Add approvalMode setting with options: "per-task" (current default), "per-file", "per-edit", "never"
  2. Implement per-edit approval gate in the agent loop — show diff preview + approval dialog before each edit
  3. Add VSCode settings UI for the new configuration option
  4. Add keyboard shortcuts for quick approval (Alt+A / Alt+R)
  5. Add "Approve All" option to switch to per-task mode mid-flow

Files to Modify

  • src/settings.ts — Add approvalMode setting
  • src/agent/agent-loop.ts — Add per-edit approval gate
  • src/ui/approval-dialog.ts — New: approval UI component
  • package.json — Add settings configuration + keybindings

Complexity: Medium (3-5 hours, backward compatible)

Full solution document: codex-24325-per-every-edit-confirmation-fix.md

etraut-openai contributor · 3 months ago

@jshaofa-ui, please stop spamming our issue tracker with AI-generated answers. They are often incorrect and are generating significant noise.

weathon · 3 months ago

This happened again today, it ran a cp command without asking me and that rewrote a whole file

pomykalakyle · 2 months ago

I would really like this feature, please add when you can.

AijingLI-KCLLP · 5 days ago

Really need this ... I mean it should not even be a feature, it was the case before and after some update this option is not available anymore, it should just be a basic option. It seems just stupid to leave ai edit my file without checking the edit... May switch back to Claude due to this ...