I Scoped This as a Dropdown. It Was Four Services and a Streaming Rewrite.

I scoped this as a dropdown. Add one more option to the model picker, next to the ones already there. No layout change, no new screens. That was the whole plan, written down on September 30.

It turned into four services, a CLI event stream that delivered complete messages in my tests, and a rewrite of how my chat saves messages.

Here’s the part that made it tense: I’d already cancelled the old subscription before starting. The cutoff was October 13. Two weeks, fixed, no extension. Discovering things late wasn’t an option I had.

I was wrong about my own architecture

My assumption was that one daemon called the agent CLI. Everything else went through that daemon. I’d built the thing, so I knew how it worked.

I went looking anyway. I grepped for processes spawning the CLI directly, instead of trusting my memory of the design.

Six candidates came back. Not one.

What calls the CLI directly Needs a second backend?
The bridge daemon (main chat) Yes — the core of this work
Voice command intent classifier Yes
Voice general handler Yes
Monthly summary generator Low priority — already has a rule-based fallback
Another service with daily users Deliberately last. Not worth rushing.
Auto-draft replies for a side business No — see below

That last row is the one I enjoyed. I’d remembered it as an AI feature for two months. I opened the file to plan the migration and found pure template substitution — read a text file, swap placeholders, done. No model call anywhere in it. I’d been mentally budgeting migration work for a feature that was a glorified string replace.

Finding these on a map cost me an afternoon. Finding them one at a time, in production, after the subscription died, would’ve cost considerably more.

The streaming model isn’t the same streaming model

My chat UI was built around token deltas. Text arrives in fragments, the screen fills in, you watch it type. That’s how the old CLI behaved and I’d designed around it.

So I ran the new one and read the raw output:

codex exec --json --skip-git-repo-check "ping" < /dev/null
{"type":"thread.started","thread_id":"01a0f149-c044-7ea0-a9ff-2f1af90b8d0b"}
{"type":"turn.started"}
{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"Pong."}}
{"type":"turn.completed","usage":{"input_tokens":14453,"output_tokens":7}}

One event, complete text. No fragments.

My first thought was that “ping” is too short to stream. Fair theory, easy to test. I ran it again with a prompt that produced about twenty lines of output, using the same spawn pattern my daemon uses.

Same result. One item.completed, whole response at once. There’s no intermediate update event in that stream at all.

That was the event shape I observed in these CLI tests. But it meant my typing indicator was now a lie. The answer doesn’t trickle in — it lands. I had to replace “watch it type” with explicit state: accepted, working, done.

Three launch details my integration needed

Each of these I found by having something fail first.

What happens without it What it needs
Process hangs waiting for more input Close stdin immediately after spawn
Calls from my non-repository working directory were refused --skip-git-repo-check
Stream ends, process stays alive SIGTERM, then SIGKILL after 3s

That third one deserves a note. After turn.completed, my read loop exits normally — looks like a clean finish. I checked the child’s exit code at that moment and got null. The process hadn’t died. It was just sitting there.

I recognized it because the previous CLI had the same class of problem, and I’d already written the kill-timer defense for it. Same defense, ported over. Different tool, different language, identical failure shape.

Don’t assume the new tool is worse everywhere the old one was better

I went in expecting the replacement to be a downgrade and nearly over-engineered around that assumption.

The old CLI could only resume a conversation from the same working directory. I’d built careful directory tracking to satisfy that. So I tested the new one properly: started a thread in one directory, resumed it from /tmp. It remembered the conversation fine. Cross-directory resume worked in the version and test I recorded.

But it cuts the other way too. The resume subcommand doesn’t accept the sandbox or directory flags the main command takes — I found that in --help, not in docs. So resume is more flexible in one dimension and stricter in another. Neither tool is “the better one.” They’re differently shaped, and the only way I found the shape was running them.

The bug that only appeared in real use

Everything above came from deliberate testing. This one came from actually using it.

I’d send a command, switch away from the chat, come back — and my own message was gone. Not the reply. The thing I’d typed. Send it again and I’d sometimes get already has an active writer.

The cause was in my code, not the CLI. My daemon saved messages to the session file when the response finished. Until then, nothing was on the server. Returning to the chat reloaded history from the server, which honestly reported that nothing had happened yet.

So the fix wasn’t a patch, it was a restructure. The command and a turn ID now get saved before the CLI is ever launched. Execution is decoupled from the browser connection, so leaving the screen unsubscribes but doesn’t kill the work. A duplicate send returns a conflict pointing at the existing turn instead of starting a second process. And if the daemon restarts mid-turn, that turn is marked interrupted rather than guessed into success or failure.

That last rule matters to me. I’d rather show “I can’t confirm this finished” than overwrite a real answer with a wrong status.

What I haven’t verified yet

The continuity work passed type checks, builds, and isolated tests with a fake CLI standing in. I confirmed it on the running daemon: health endpoint responding, a GPT turn reporting running, the reasoning setting surviving a round trip.

I have not confirmed it by leaving and reopening the chat on my actual phone. That’s the case the whole feature exists for, and it’s still unchecked. Implemented, deployed, and confirmed-in-real-use are three different states, and I only get to claim the first two here.

Versions, for anyone comparing: codex-cli 0.159.2 and Claude Code 2.1.220, both on macOS, both driven by a background service rather than a terminal.

What I’d tell myself two weeks ago

Swapping the model was the easy half. The hard half was everything that had quietly assumed the old one’s behavior — the streaming shape, the resume rules, the flags, and the parts of my own system I’d misremembered.

Grep your own codebase before you trust your memory of it. I built this thing and I was still wrong about it in two places.

Related: this runs on the phone-driven remote setup from this post. The previous time an agent broke its own execution environment is here.

Editorial correction, November 4, 2026: Scoped CLI behavior to the recorded version and integration; historical phone verification remains open. Original measurements are unchanged.

Similar Posts