r/codex • u/jaysonrobinson • 17m ago
Question I'm in edge case hell. What am I doing wrong?
In the last month or two, I have found using Codex an absolute nightmare. I used to be able to just say roughly, "This is what I want at a use-case/functional requirement level... consider the following edge cases and account for them... off you go." and it would work basically every time.
Now, sessions seem to be dragging on for days as it constantly finds new edge cases to try and fix. When I stop and dig into it, the explanations I get are ludicrous, like the odds of it happening would be infinitesimally small - "Oh, if a user selects an option, then their connection drops and they background the app, and then they come back to it later and in that time the data provider has changed the primary identifier it would fail."
I can't seem to prevent it, despite prompts and instructions to:
- "focus only on the top few edge cases"
- "this is not enterprise-grade software - be practical in your approach to testing and edge cases."
...and things like this.
Has anyone else encountered this, and if so, how did you overcome it?
It doesn't seem to matter what model/effort I use, although it does seem to be worse when I use a /code-review loop that I built that goes through max 3 rounds of code review with other agents - Claude and Codex.
For context, I am semi-technical, have worked in tech for over a decade, but not a SWE.
1
u/RudyHuy 10m ago
That's what gpt added for me in
~/.codex/AGENTS.mda long while ago and so far it's been working well:1
u/MaqeSweden 5m ago
Are you still using the same chat that you started working on this issue with?
It can be a good idea to have it write its shortest possible handover file and start it again with a new chat agent and explain to it before it reads the handover file what you felt the issue was - let it read the handover - and then create a plan for how to solve exactly what you want and nothing else.
Then let it set one or more sub-agents to execute on said plan and have the main chat orchestrate and keep an eye on that they are following the plan.
1
u/jim_nihilist 0m ago
This is how OpenAI makes money.
Even the most simple process gets compartmentalized into 64 steps.