Live data from Hacker News

Unrolling the Codex agent loop

openai.com

31–40 of 220 posts

Re: Unrolling the Codex agent loop

#31
post #7

Earlier quoted context omitted.

I think this explains why I'm not getting the most out of codex, I like to interrupt and respond to things i see in reasoning tokens.

that's the main gripe I have with codex; I want better observability into what the AI is doing to stop it if I see it going down the wrong path. in CC I can see it easily and stop and steer the model. in codex, the model spends 20m only for it to do something I didn't agree on. it burns OpenAI tokens too; they could save money by supporting this feature!

[deleted]

Re: Unrolling the Codex agent loop

#33
post #20

Codex agent loop: Call the model. If it asks for a tool, run the tool and call again (with the new result appended). Otherwise, done https://i.ytimg.com/vi/74U04h9hQ_s/maxresdefault.jpg

I think this should be called the Homer Simpson loop, it seems more apt

Re: Unrolling the Codex agent loop

#35
post #33
post #20

Codex agent loop: Call the model. If it asks for a tool, run the tool and call again (with the new result appended). Otherwise, done https://i.ytimg.com/vi/74U04h9hQ_s/maxresdefault.jpg

I think this should be called the Homer Simpson loop, it seems more apt

They sadly renamed the Ralph Wiggum loop due to copyright concerns so little hope for Homer :(

https://github.com/anthropics/claude-plugins-official/commit...

Re: Unrolling the Codex agent loop

#36
post #35
post #33

Earlier quoted context omitted.

I think this should be called the Homer Simpson loop, it seems more apt

They sadly renamed the Ralph Wiggum loop due to copyright concerns so little hope for Homer :( https://github.com/anthropics/claude-plugins-official/commit...

ha I didn't know that, very interesting

Re: Unrolling the Codex agent loop

#37

What I really want from Codex is checkpoints ala Copilot. There are a couple of issues [0][1] opened about on GitHub, but it doesn't seem a priority for the team. [0] https://github.com/openai/codex/issues/2788 [1] https://github.com/openai/codex/issues/3585

They routinely mention in GitHub that they heavily prioritize based on "upvotes" (emoji reacts) in GitHub issues, and they close issues that don't receive many. So if you want this, please "upvote" those issues.

Re: Unrolling the Codex agent loop

#38
I use 2 cli - Codex and Amp. Almost every time I need a quick change, Amp finishes the task in the time it takes Codex to build context. I think it’s got a lot to do with the system prompt and a the “read loop” as well, amp would read multiple files in one go and get to the task, but codex would crawl the files almost one by one. Anyone noticed this?

Re: Unrolling the Codex agent loop

#39

Earlier quoted context omitted.

I found codex cli to be significantly better than claude code. It follows instructions and executes the exact change I want without going off on an "adventure" like Claude code. Also the 20 dollars per month sub tier gives very generous limits of the most powerful model option (5.2 codex high). I work on SSL bio acoustic models as context.

codex the model (not the cli) is the big thing here. I've used it in CC and w/ my claude setup, it can handle things Opus could never. it's really a secret weapon not a lot of people talk about. I'm not even using xhigh most of the time.

No, the codex harness is also optimized for the codex models. Highly recommend using first-party OpenAI harnesses for codex.

Re: Unrolling the Codex agent loop

#40

One thing that surprised me when diving into the Codex internals was that the reasoning tokens persist during the agent tool call loop, but are discarded after every user turn. This helps preserve context over many turns, but it can also mean some context is lost between two related user turns. A strategy that's helped me here, is having the model write progress updates (along with general plans/specs/debug/etc.) to…

I don't think this is true.

I'm pretty sure that Codex uses reasoning.encrypted_content=true and store=false with the responses API.

reasoning.encrypted_content=true - The server will return all the reasoning tokens in an encrypted blob you can pass along in the next call. Only OpenaAI can decrypt them.

store=false - The server will not persist anything about the conversation on the server. Any subsequent calls must provide all context.

Combined the two above options turns the responses API into a stateless one. Without these options it will still persist reasoning tokens in a agentic loop, but it will be done statefully without the client passing the reasoning along each time.

Post reply on HN