Live data from Hacker News

Unrolling the Codex agent loop

openai.com

201–210 of 220 posts

Re: Unrolling the Codex agent loop

#201

Earlier quoted context omitted.

Seconded. I find codex lacks only two things: - hooks (this is a big one) - better UI to show me what changes are going to be made. the second one makes a huge diff and it's the main reason I stopped using opencode (lots of other reasons too). in CC, I am shown a nice diff that I can approve/reject. in codex, the AI makes lots of changes but doesn't pin point what changes it's doing or going to make.

You can't see diffs in git? How you using hooks?

That’s a separate tool though. You don’t want to have to open another terminal to git diff every 30 seconds and then give feedback. Much better UX when it’s inline.

My main hooks are desktop notifications when Claude requires input or finishes a task. So I can go do other things while it churns and know immediately when it needs me.

Re: Unrolling the Codex agent loop

#202

Has anyone seriously used codex cli? I was using LLMs for code gen usually through the vscode codex extension, Gemini cli and Claude Code cli. The performance of all 3 of them is utter dog shit, Gemini cli just randomly breaks and starts spamming content trying to reorient itself after a while. However, I decided to try codex cli after hearing they rebuilt it from the ground up and used rust(instead of JS, not implyi…

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.

hey I’m just spinning up in ssl birdsong models (BirdMAE, SongMAE, etc) can you share any resources? My email is stevens.994@osu.edu, would love to read your work.

Re: Unrolling the Codex agent loop

#203
post #141

Wow, this part where they describe skills sounds quite odd https://github.com/openai/codex/blob/99f47d6e9a3546c14c43af9... Why wouldnt they just expose the files directly? Having the model ask for them as regular files sounds a bit odd

Think of it as Just-In-Time context injection/enhancement

Re: Unrolling the Codex agent loop

#204

Earlier quoted context omitted.

Anthropic/Claude's entire UX is the worst among the bunch

What’s the best?

In my experience, ChatGPT, and then Grok.

I've posted a lot of feedback about Claude since several months and for example they still don't support Sign in with Apple on the website (but support Sign in with Google, and with Apple on iOS!)

Re: Unrolling the Codex agent loop

#205

Earlier quoted context omitted.

yes [0] > The Rust implementation is now the maintained Codex CLI and serves as the default experience [0] https://github.com/openai/codex/tree/main/codex-rs#whats-new...

They should switch to a native installer then. Quite confusing

    brew install codex
https://developers.openai.com/codex/quickstart/?setup=cli

Re: Unrolling the Codex agent loop

#206
post #108

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?

Amp uses Gemini 3 Flash to explore code first. That's model is a great speed/intelligence trade-off especially for that use case.

Ah! Ha. Thank you.

Re: Unrolling the Codex agent loop

#207

Earlier quoted context omitted.

yes [0] > The Rust implementation is now the maintained Codex CLI and serves as the default experience [0] https://github.com/openai/codex/tree/main/codex-rs#whats-new...

They should switch to a native installer then. Quite confusing

They're leveraging the (relative) ubiquity of npm amongst developers.

Re: Unrolling the Codex agent loop

#208
post #26

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…

It depends on the API path. Chat completions does what you describe, however isn't it legacy? I've only used codex with the responses v1 API and there it's the complete opposite. Already generated reasoning tokens even persist when you send another message (without rolling back) after cancelling turns before they have finished the thought process Also with responses v1 xhigh mode eats through the context window multi…

That’s what I used to think, before chatting with the OAI team.

The docs are a bit misleading/opaque, but essentially reasoning persists for multiple sequential assistant turns, but is discarded upon the next user turn[0].

The diagram on that page makes it pretty clear, as does the section on caching.

[0]https://cookbook.openai.com/examples/responses_api/reasoning...

Re: Unrolling the Codex agent loop

#209
post #122

Earlier quoted context omitted.

Their compaction endpoint is far and away the best in the industry. Claude's has to be dead last.

Help me understand, how is a compaction endpoint not just a Prompt + json_dump of the message history? I would understand if the prompt was the secret sauce, but you make it sound like there is more to a compaction system than just a clever prompt?

Their models are specifically trained for their tools. For example the `apply_patch` tool. You would think it's just another file editing tool, but its unique diff format is trained into their models. It also works better than the generic file editing tools implemented in other clients. I can also confirm their compaction is best in class. I've imlemented my own client using their API and gpt-5.2 can work for hours and process millions of input tokens very effectively.

Re: Unrolling the Codex agent loop

#210
post #174

Earlier quoted context omitted.

Are you sure? For reasoning, encrypted_content is for sure actually encrypted.

Hmmm, no, I don't know this for sure. In my testing, the /compact endpoint seems to work almost too well for large/complex conversations, and it feels like it cannot contain the entire latent space, so I assumed it keeps pointers inside it (ala previous_response_id). On the other hand, OpenAI says it's stateless and compatible with Zero Data Retention, so maybe it can contain everything.

They say they do not compress the user messages, but yeah, it's purpose is to do very lossy compression of everything else. I'd expect it to be small.
Post reply on HN