Codex creates `.codex` file in repo

Resolved 💬 2 comments Opened Apr 1, 2026 by tomas-langer Closed Apr 2, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.118.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.4

What platform is your computer?

Linux 6.17.0-19-generic x86_64 unknown

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

wezterm 20240203-110809-5046fc22

What issue are you seeing?

When I run codex in my project, it creates a .codex file marked as read-only in the root.
Codex itself then reports that the repo is dirty.
It also cannot update files in my .ai directory in the repo itself without going out of sandbox (not sure if related)

What steps can reproduce the bug?

Run codex
run ls -al .codex from another shell in the same directory

What is the expected behavior?

There is no file

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #16088
  • #16376
  • #16247
  • #16336

Powered by Codex Action

tomas-langer · 4 months ago

Duplicate of https://github.com/openai/codex/issues/16088.
Search in github is not really good, that issue did not surface when I searched for ".codex"...