Skip to content

Codex CLI in read-only mode can write #12896

Open

Description

@SRNissen

What version of Codex CLI is running?

0.105.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Linux 6.17.0-14-generic x86_64 unknown

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

bash

What issue are you seeing?

Codex CLI in read-only mode can write

What steps can reproduce the bug?

Setup:

My ~/.codex/config.toml contains only one line:

sandbox_mode="read-only"

Steps:

  • In bash, I navigated to a repository without an AGENTS.md file.
  • I opened codex with codex and asked "add an AGENTS.md file"
  • Codex suggested a change and asked for approval to execute it
  • Approval was granted
  • The codex session was exited
  • A file AGENTS.md had been written to the repository.

What is the expected behavior?

I am no UX designer so I don't know exactly what should have happened instead. An error message, perhaps. But a read-only session should definitely not have written.

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    sandboxIssues related to permissions or sandboxing
    on Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions