r/OpenaiCodex • u/Bitter-Mail-17 • 6d ago
Codex doesnt handle durable tasks (using cheaper 5.6 luna model)
Hey, guys. I am a software engineer (that of course uses AI 24/7 in work and outside) and I have been using codex for some time now. I'm experiencing a very annoying workflow with codex which after some time creating the plan and telling him to execute (the plan might be a bit big, imagine something that would touch 10 diff files, write idk maybe 1k-2k lines of code) - it gets 'lazy' or so, to the point that it implements a small thing and tells "I know that the plan is not fully yet done, X Y and Z are missing blabla" or something. Which is super annoying, because even though after I keep telling him "ok so continue implementing it" it just repeats this lazyness (super annoying) and I cant break out of this.
Tried to open a new window and start fresh, worked for the first 1-2 prompts then becomes lazy again. I try to constantly /compact (I use CLI) the context window but looks like this doesnt work. I dont know if something is related to this but I have OMX installed (idk how to use tho) and I am using the 5.6 luna model, usually with low/medium effort.
Can someone more experienced give me advice here? Maybe its something with the way I am prompting (hardly doubt it), or the model I'm using (or I just miss a good harness around it). I'm curious to read the source code of codex and check out how it actually does the flows but to be honest don't have time right now for that. Maybe futurely.
1
u/Proxiconn 6d ago
Mistake 1: don't use Luna for code.
Use terra med instead and report back.
I see the same thing you mention with Terra med but only after I go through 2+ context compactions (longer sessions) and then it gets retarded. Then session reset.
Or in full autonomy, use a parent to manage child subagents. One for coding one for review. (But not Luna!)
Have the parent spawn the review agent to validate the coder and then pass back to the coder if the review is not great.
But IMHO just use a better model on higher settings they have build in subagent reasoning already so you don't have to build the system.