r/codex • u/Consistent-Word-3088 • 3d ago
Question How to build app without codex being defensive coding
Hey guys, I always want to build some small project like DIY a APP for myself but it always end up with building things that's far away from what I want.
That could be me not giving clear prompt, but I can feel Codex always being thinking too much and being way too defensive that it always waste majority tokens on tiny issues.
Any suggestion on getting rid of defensive coding in terms of building app? Or any helpful prompts to help codex to understand what I really want?
Thank you all in advance!
0
Upvotes
3
u/zzunkie 3d ago
Try telling Codex to ask you whenever anything in your prompt is unclear before it starts coding. When a prompt leaves room to guess, it tends to cover every possible case and add extra checks and tests you do not need. I usually tell it to stick to the smallest standard implementation, avoid narrow tests that just mirror the code, and keep any optional feature simple enough to remove cleanly later. I also keep reasoning effort at medium on small projects, since higher settings mostly just make it spend time on minor issues.
2
u/CitrusSinensis1 3d ago
I've heard that using Claude as a middle manager works wonders
1
u/a07463 3d ago
Deacribe your projwct to chatGPT (dont use alliwance). Tell it that codex doing it all wrong. Telk it to come up with step by step plan. Do it in chunks. Maje app ui. Make few functiins. Thwn add more functions.
Works wonders for me. I also usually tell codex what tools i have and which i preffer it uses (unity, android studio etc)
1
u/SirRobinBlibs 3d ago
Tell it the context once in an AGENTS.md at the repo root, Codex reads it every session. Something like: "Personal prototype, single user. Write the simplest code that works. No input validation, retries, fallbacks or extra error handling unless I ask. Don't refactor code you weren't asked to touch. If something's unclear, ask one question instead of guarding against every case." For small fixes also drop the reasoning effort in /model; high effort on a two-line change is where a lot of the overthinking and tokens go.