The Codex Changelog
All Episodes
Codex CLI 0.157.0 Stops Lost Drafts on Ctrl-C

Codex CLI 0.157.0 Stops Lost Drafts on Ctrl-C

0:00|0:00

This episode breaks down how Codex CLI 0.157.0 prevents lost work by preserving unsubmitted composer drafts after interruptions, plus fixes for draft recovery, async prompts, and stale notifications. It also covers quality-of-life upgrades like Shift-click transcript selection and a longer, more reliable file upload timeout.


Chapter 1

The Invisible Draft Wiper and Conditional Interruption Mechanics in 0.157.0

Maya

Picture this. You are in your terminal, working with an agent. You spend three minutes carefully typing out a complex multi line instruction in the composer, maybe pasting in a specific code fix, while the agent is still running a background turn.

Ethan Park

Right, and then the agent starts heading in completely the wrong direction, so you hit Control C to interrupt it.

Maya

And poof! Your entire unsubmitted prompt, all those lines you just typed, vanish into thin air. Wiped clean.

Ethan Park

It is such a brutal feeling. But in Codex CLI version 0.157.0, that whole invisible draft wiper issue is finally gone. And before we dive into how pull request 47340 fixes it, a quick shoutout to Jellypod for helping make this daily show possible.

Maya

So what actually changed under the hood when you hit Control C now?

Ethan Park

So previously, the terminal UI treated a turn cancellation as a complete reset of the composer input state. But PR 47340 introduces what OpenAI calls conditional turn interruption.

Maya

Okay, meaning it separates stopping the model from clearing what you typed?

Ethan Park

Exactly. Instead of flushing the composer buffer, it intercepts Control C and turn completion signals, holding your pending keystrokes in a temporary state handle. So the running turn halts, but your text stays right there in the composer, ready for you to edit or send.

Maya

Ah, that makes so much sense. But what if the agent raised an interactive question, like asking for clarification, and you typed an answer into the box, but then the turn ended before you pressed enter?

Ethan Park

That is where PR 47422 and PR 47423 come in. Maya, you were looking at those edge cases, right?

Maya

Yeah! Those handle draft recovery. When a turn finishes or gets cut off, Codex now sweeps any unsent question answers straight back into the main composer box.

Ethan Park

Wait, does that disrupt you if you happen to be doing a reverse history search with Control R or forward slash at that exact second?

Maya

No, and that is the clever part in PR 47423! The restoration happens quietly in the background without kicking you out of your active history search mode. So you do not lose your place in your command history while your draft gets saved.

Chapter 2

Draft Recovery Workflows, Async Edge Cases, and QoL Polish

Ethan Park

Now, how does this work when subagents are involved? Say a subagent prompts you for input using request user input async?

Maya

If you have unsubmitted drafts from those async clarification questions, they get queued sequentially right back into the composer as editable text when the turn wraps up. Plus, PR 47424 clears out pending async question notifications automatically so you do not get spammed with stale popups.

Ethan Park

Okay, but there has to be a catch. Where are these drafts actually stored?

Maya

That is a crucial limitation to keep in mind. Draft recovery lives entirely in the terminal client memory. If your local background server daemon suffers an unrecoverable crash or gets killed with a hard kill signal mid turn, those uncommitted drafts cannot be restored from SQLite checkpoints.

Ethan Park

Got it. So it protects against turn cancellations, subagent completions, and normal process stops, but not a full process crash.

Maya

Right. Still, for day to day workflow, it removes a massive source of accidental work loss.

Ethan Park

There are a couple of other really handy quality of life updates in 0.157.0 as well. PR 47414 adds Shift click selection extension in fullscreen transcripts.

Maya

Oh, finally! So if you have a huge block of code in the transcript, you can click the start, hold Shift, and click the end to select the whole chunk easily?

Ethan Park

Yep, exactly that. And PR 47122 increases the OpenAI file blob upload timeout from 60 seconds all the way to 5 minutes, complete with automatic retry handling for transient network drops.

Maya

That is huge if you are uploading large context files or diagnostic logs over a spotty connection.

Ethan Park

So if you want that safety net for your unsubmitted text and smoother transcript selections, the update is live. Just run npm install g @openai/codex@0.157.0 in your terminal.

Maya

Definitely worth upgrading today. Alright, good chatting Ethan, talk soon!