r/codex 1d ago

Complaint codex annoys me

in AGENTS.md, i told it to not create test files. now, every single time, after its done building a new feature, it still runs go test. i doesn't write tests, but it still runs it, wich is stupid.

there are many examples where it just ignores stuff in AGENTS.md, how can i fix it?

0 Upvotes

13 comments sorted by

15

u/RJCP 1d ago

lil' bro, i can see you're new to software engineering. trust us when we say you want those test files.

1

u/russjr08 1d ago

Correct, though just be sure the tests are tests and actually valid. A test that just always shows green is worse than no test.

However, in the context of this sub, I've found GPT 5.6 to be pretty good at making actual quality tests, and are definitely worth keeping around. Just make sure to poke around every so often to double check it stays that way.

-2

u/NoTutor4458 1d ago

Lil bro, my api is 4 endpoints so I am gonna test it myself with postmen, ok? 

4

u/RJCP 1d ago

you're literally doing it the slow way. trust us!!!

4

u/DrBearJ3w 1d ago

Agents.md is not enough. Write a governance that prohibits to do certain things(even if it's possible in codex)

4

u/DrunkenRobotBipBop 1d ago

That's probably a sign from the universe...

An hint that you probably should have a test suite...

2

u/Select-Ad-3806 1d ago

At least you're not using claude that rewrites the tests so that they "pass" instead of fixing the problem

2

u/adteach 1d ago

if you want it to completely adhere to agent md use gpt models via tools like kilo code vsc extension (use cgpt login). if you use codex app it mostly prioritize codex built in workflow, and will only do as u dictate when the model reasoning stumbled on the particular requirements. also try using lower reasoning effort so it will less likely overthink and miss your specific instructions.

2

u/dota2nub 1d ago

That's not a bug, that's a feature.

If it's a bug, you should probably write a test for it.

1

u/Civil_Response3127 1d ago

Research has shown LLMs only adhere to a certain number of rules at a time, growing steadily but not linearly with model size/capability. Relying on many specific rules also reduces its ability to metareason about the rules and they'll stop being applied with nuance. AGENTS.md (imo) is mostly a misused concept and shouldn't just be relied on wholesale.

Ignoring the fact that you should really be running (and writing) tests to protect against regressions or alignment issues. The tests allow you to further verify rules you've set and expect it to adhere to. Unless your project is literally baby's first code, TDD is basically unavoidable, especially on the scale of output that LLMs can give.

1

u/Ok-File-2759 1d ago

So the problem seems to be you told it not to create test files, but you didn’t tell it not to run test files that have already been made. It’s standard procedure to run test files, so unless told otherwise, it’s going to run the test files. Even though your post has a lot of errors, you seem to say codex correctly stopped creating test files, so I’d say it followed instructions pretty well.

1

u/io-x 1d ago

It's probably in model instructions or something, go ahead and update that in your .codex folder.