Question

Codex asks me to approve every single command, even ls and npm test

Solved · 912 viewsasked by noor_builds

Started using the Codex CLI on my recipe app last week. It works, but I spend more time pressing enter than it spends coding. Every ls, every cat, every npm test pops up an approval prompt. A 20 minute task took me an hour of babysitting.

I launched it with just codex in the project folder.

What I’ve tried

Typed "stop asking me for permission" in the chat. It apologised and asked again on the next command. Also looked for a settings screen inside the CLI but could not find one.

Comment

2 answers

Marked as helpful by the asker
felix_codes

Asking in the chat does nothing, because approvals are not up to the model. They are a setting of the CLI itself.

For normal work inside one project, start it like this:

codex --full-auto

That lets it read, edit and run commands inside your project folder without asking, and it only stops when it wants to do something outside the sandbox. To make it the default, put it in ~/.codex/config.toml:

approval_policy = "on-request"
sandbox_mode = "workspace-write"

What I would not do is switch the sandbox off completely to get rid of the prompts. The prompts are annoying, but a model with full disk access and no questions is how people lose a folder.

Comment
full-auto did it. Same task took 15 minutes today and I only got asked once, when it wanted to install something. noor_builds
leo_prompts

Also check whether you started it in your home folder by accident. Outside a git repo it is extra careful, and it should be, because everything is in reach there.

Comment