r/vibecoding • • 3d ago

Discussion GPT-6 Sol can pass your tests while ignoring AGENTS.md — I built a fix you can A/B

This changes GPT-6 Sol’s behavior.

In my controlled test, stock GPT-6 Sol read the repository instructions but ignored mandatory AGENTS.md gates. With this repair, the same model followed them.

That’s it. It makes Codex follow AGENTS.md more reliably without changing the model.

OpenAI’s own Codex prompting guide says Codex automatically injects AGENTS.md and that the model is trained to closely adhere to those instructions:

https://developers.openai.com/cookbook/examples/gpt-5/codex_prompting_guide

But people are reporting the opposite in practice:

https://github.com/openai/codex/issues/62195

And here’s a cross-model reproduction where Codex could literally quote the ignored AGENTS.md rule after failing to follow it:

https://www.reddit.com/r/codex/comments/1x7ms4i/codex_ignored_the_same_agentsmd_instruction/

The nasty part is that the code can still work.

In my controlled codex-cli 0.172.0 / gpt-6-sol A/B:

Stock: completed the coding task and passed its test, but skipped mandatory workflow gates.

Repaired: executed the required sequence:

intent → authorization → edit → test

Same executable. Same model. Same task. Same Codex home. Same sandbox. Same evaluator.

The only material difference was the repair-profile instruction ingress.

The behavioral score went from 3/6 → 6/6 in that run.

This is not a claim that every model or every prompt is now magically compliant. It is a reproducible demonstration that this failure mode can be measurably changed without modifying the underlying model.

The repo includes the standalone tool, tests, controlled A/B harness, caveats, and independently verifiable receipts:

https://github.com/cjc0013/codex-instruction-adherence-repair

If you use Codex with a serious AGENTS.md, try it and tell me whether it changes the behavior for you.

1 Upvotes

2 comments sorted by

1

u/tiago_fernandes53 1d ago

Does the harness test conflicts too? Repo gates should not override higher-priority rules.

1

u/Either_Pound1986 1d ago

I wasn’t trying to build a complete instruction-precedence conformance suite. The goal was much narrower: demonstrate, under a controlled high-conflict setup, that GPT-6 Sol could successfully complete the coding task while ignoring mandatory AGENTS.md workflow instructions, then show that a specific repair measurably changed that behavior.

That’s what the A/B demonstrates: stock 3/6, repaired 6/6, with the same model, task, executable, Codex home, sandbox, and evaluator.

The repair itself is not intended to make AGENTS.md override genuinely higher-priority instructions; it explicitly preserves the host’s normal authority ordering.

A separate higher-priority-conflict regression would still be a reasonable additional guardrail test, and I may add one to verify that the repair doesn’t overcorrect. But that would be a separate test from the behavior this repo was built to demonstrate.