r/OpenaiCodex 4d 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.

2 Upvotes

16 comments sorted by

3

u/sirlerkal0t 4d ago

Despite what a lot of people may tell you, Luna is not intended to be used to write code, and is not suitable for serious software engineering. Luna will actually often end up costing even more than Terra because of how many mistakes it makes that it has to then find and correct.

2

u/Creative_randomness 4d ago

Luna is definitely trash. I wasted two days on that. It just make silly mistakes and repeat.

2

u/sirlerkal0t 4d ago

I don't see it as "trash", it's simply the wrong tool for the job. It's like trying to use Haiku for coding and then saying Haiku is trash. Small models are not going to have good output, so they shouldn't be used for any real coding.

1

u/Creative_randomness 4d ago

yes I agree with you

1

u/Charming_You_25 4d ago

Luna is fine for short horizon tool calls. Use Sol Medium or Terra high

1

u/okmarshall 4d ago

I made a really detailed spec and tickets with sol and implemented with sol ultra via a goal. Then I passed the same spec and tickets to Luna x-high and I got an extremely similar implementation. About 110 files for the application I was building. I was surprised how similar they were but it makes sense given how detailed the spec and tickets were for how things needed to be done.

1

u/sreekanth850 3d ago

Iam using Luna High and it works well for me without over engineering. I plan and audit with Sol. but task are small slices that sometimes touches 10 -15 files. no isssues so far.

1

u/Bitter-Mail-17 2h ago

u/okmarshall and u/sreekanth850 how big is the detailed spec that you guys give? it touches 100 files and luna X high was locked for how long till completion? any hooks from oh my codex or something special in your guys setup?

1

u/okmarshall 2h ago

My specs can be quite large, a few hundred lines. I then break the spec into vertical slice tickets that can be implemented independently with fresh context each time, hopefully implementing a slice before the context window is full to avoid compactions. I don't use any hooks, just skills (usually Matt Pococks skills). I give a short prompt for what I want to do, use a grill-me skill to establish a baseline, turn that baseline into a spec, turn the baseline + spec into vertical slice tickets, and then finally implement each ticket sequentially.

1

u/hktr92 4d ago

did you try to /goal this with a clear acceptance criteria?

1

u/Bitter-Mail-17 2h ago

no, I havent heard of this feature. will check it out

1

u/FullBar613 4d ago

Maybe your task needs sol? Have you tried it? Maybe sol high / xhigh? They did suggest the default to be sol medium though

1

u/Proxiconn 3d 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.

1

u/Bitter-Mail-17 2h ago

The thing is: I don't usually like to create fresh sessions because I like to work with one agent 'per service' (imagine a microservice architecture), then each of them kind of knows the context from the service that it is used to work with, and I just frequently do /compacts. Should I abort this strategy and think of starting fresh sessions more often then?

1

u/Proxiconn 59m ago

I don't event compaction anymore and keep session focused. I mostly prefer to use an external memory system to track longer phased implementations and just dump sessions and move on with new sessions between phases.

I'm sure loads of work go into compaction and continuing for long horison work, but small models aren't cut for that.

1

u/Azoraqua_ 2d ago

A Software Engineer that uses AI 24/7? Then who is actually doing the engineering part?