Skip to content

[possible degradation] Directories are now not trusted by default even with the --dangerously-bypass-approvals-and-sandbox option. #14345

@your-diary

Description

@your-diary

What version of Codex CLI is running?

codex-cli 0.114.0

What subscription do you have?

ChatGPT

Which model were you using?

No response

What platform is your computer?

No response

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

No response

What issue are you seeing?

I recently updated codex from v0.112.0 to v0.114.0.

Now, even with the --dangerously-bypass-approvals-and-sandbox option, I always see the confirmation prompt like below every time I run codex in a new directory:

> You are in /home/user/workdir/some_project

  Do you trust the contents of this directory? Working with untrusted contents comes with higher risk of prompt
  injection.

› 1. Yes, continue
  2. No, quit

This is annoying because of three reasons:

  • I just don't want the prompt. That defeats the purpose of using the --dangerously-bypass-approvals-and-sandbox option.

  • I use codex in a Docker container. For extra safety, I mount config.toml readonly to the container. So, even if I select 1 in the prompt above, the selection is not recorded.

  • I test a one-off script very often (e.g. 15 times a day). Every time I do that, I create a new temporary directory with a random name (e.g. mkdir ~/my_playground/${RANDOM}). So registering every possible directories to the trust directories list in advance is not feasible.

What steps can reproduce the bug?

  1. Create a new directory.

  2. cd to the directory.

  3. Run codex --dangerously-bypass-approvals-and-sandbox.

What is the expected behavior?

  • It should trust any directory by default as before.

  • Or, at least there should be both of these:

    • another option to trust all directories by default (e.g. --dangerously-trust-any-directories)

    • breaking change notice / migration guide in the release note

Additional information

Possible cause:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehaviors that worked in previous versions but were broken due to an updatesandboxIssues related to permissions or sandboxing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions