0.150.1: untrusted project AGENTS.md is included in prompt input
Open
Nobody has claimed this yet.
bug
CLI
config
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Codex version
codex-cli 0.150.1
Environment
macOS arm64. Reproduced with a fresh temporary CODEX_HOME and a disposable Git repository.
Reproduction
- Create a disposable Git repository whose
AGENTS.mdcontains a unique sentinel. - Use a fresh
CODEX_HOME. - Run:
CODEX_HOME=/path/to/fresh-home codex -C /path/to/repo debug prompt-input \
-c 'projects."/path/to/repo".trust_level="untrusted"' \\\n 'probe input'\n```\n\nThe rendered prompt contains the sentinel from the project `AGENTS.md`.\n\nI also reproduced through a real non-interactive turn with `codex exec --strict-config --json --ephemeral`, an isolated `CODEX_HOME`, and the same exact normalized project path configured as `untrusted`; the model returned the sentinel instruction. No config file was persisted in the isolated home.\n\n### Expected\n\nProject-level `AGENTS.md` content is omitted when that exact project has `trust_level="untrusted"`, consistent with the 0.150.0 release note: “Untrusted projects no longer supply project-level `AGENTS.md` instructions.”\n\n### Actual\n\nProject-level `AGENTS.md` content is included in both `debug prompt-input` and the model-visible non-interactive turn.\n\n### Safety note\n\nThe reproducer uses only a disposable repository and a harmless sentinel. No private repository content or credentials are included.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the codex debug prompt-input and codex exec --strict-config --json --ephemeral entry points and reproduce the issue using an isolated CODEX_HOME and disposable repository. Trace how trust_level="untrusted" affects project-level AGENTS.md loading during prompt construction. Done means the sentinel is absent from both prompt-input output and the model-visible non-interactive turn.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100