How to turn off the annoying prompts for approval in Codex CLI / VS Code

How to turn off the annoying prompts for approval in Codex CLI / VS Code?
I tried autoApprove=true in config.toml

2 Likes

Here’s a dialog on doing such. You can report if the guidance is helpful.

The VSCode installer doesn’t set a CODEX_HOME env variable.

3 Likes

Thanks but that is not working. I tried added this to config.toml but still being prompted., and further more even when I says Always I am prompted again for same .

2 Likes

I think I have it now. typo … not seemingly getting approval prompted. Thanks!

5 Likes

[approval]
policy = “never”

3 Likes

What worked for me is putting this right in the top section of my “~/.codex/config.toml” on Windows:

approval_policy = "never"
sandbox_mode = "danger-full-access"

The first 5 lines in my “config.toml” file look like:

model = "gpt-5-codex"
search = true
approval_policy = "never"
sandbox_mode = "danger-full-access"
model_reasoning_effort = "high"

I’m currently using Codex version 0.41.0.

2 Likes

Thankyou so much but it cant work for me.

its really working bro thanks!

1 Like
1 Like

Presently [v0.60.1] config.toml lines for network access and search:
[defaults]
network_access = “enabled”

[sandbox_workspace_write]
network_access = true

[features]
web_search_request = true

–search is a ‘codex’ command line option

Deprecated:
[tools]
web_search = true

1 Like