My codex superpower - when stuck and it can’t fix a bug
I presume I’m not the only one who at times has just got stuck with codex when it just cannot solve a bug and each time it tells it is confident it is fixed but it isn’t. I had it recently with an android app where an API call was failing but only on certain devices. I’ve lots of cases of it though across Android, iOS, Mac and even office add-ins, and no matter what the effort level I go to it doesn’t work it out.
I found what I think is a strong workaround to fix this. It’s basic software engineering but not one codex suggested itself. What I do now is first ask it to diagnose the issue (often on a higher reasoning level) before trying to fix. I then challenge it on the diagnosis before asking it to implement it. Something this moves it on, not always.
For more difficult cases I ask it what additional diagnostic information it would need to be sure of the issue. I then ask it to design and add that to the code as temporary diagnostics that can be exported or shown on a screen such the problematic action can give precise information where the issue is. Either in sandbox, simulator or from a real device I’ve then got additional data for codex to understand what is happening and solve.
I wanted to share as I thought this may be useful to others, and it is isn’t something I see coming up regularly in how to use codex, despite diagnostic tools being a bedrock for software dev - especially error reports and segmentation fault determination with complex code.
I’m curious do others use similar approaches and what else users do when codex gets in a cycle of trying to solve something but failing.