openai / openai/codex

Agent ignores AGENTS.md and invents an unsafe production workflow

Open
#44,171 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug model-behavior
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.901.51231 (8109)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

Feedback ID: 01a08672-ef8c-79d2-9d3b-ef9856cdec6e

The agent does not reliably follow explicit instructions provided in AGENTS.md. It invents its own workflow, makes unsupported assumptions, and performs actions that were neither requested nor documented.

This is especially dangerous during sensitive operations because the agent may continue despite uncertainty instead of stopping, verifying the instructions, or asking for clarification.

Expected behavior: AGENTS.md instructions must be treated as binding. The agent should not replace them with its own preferred workflow.

What steps can reproduce the bug?

Session ID: 01a08672-ef8c-79d2-9d3b-ef9856cdec6e

  1. Open a project containing detailed AGENTS.md instructions.
  2. Ask the agent to perform a task covered by those instructions.
  3. Observe that the agent chooses its own undocumented workflow instead of following the prescribed process.
  4. When problems or inconsistencies appear, the agent continues making assumptions rather than stopping and checking the applicable instructions.

The issue is that explicit project instructions are available and relevant, but the agent does not consistently follow them.

What is the expected behavior?

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Start by reproducing the behavior in a project with detailed AGENTS.md instructions, using the reported session and feedback IDs as context, then locate the instruction-loading and task-execution paths. Done means the agent treats applicable AGENTS.md instructions as binding, avoids unsupported actions, and stops to verify or ask when uncertainty remains.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.