I Deleted the Script I'd Improved the Day Before
Three tools stood between me and a cheaper model. Now there's one, and the launcher that held them together is gone.
For a while I had a tiny shell script called ck. It launched Claude Code against cheaper models hosted on Baseten, DeepSeek and Kimi, for jobs that didn't need the expensive one. Most of the script was plumbing. claudish translated Claude Code's requests, a local headroom proxy on port 8792 trimmed them before they went out, and Baseten sat at the end.
On Monday morning I made it better. Headroom had been cut in a cleanup back in September and I wanted it back, so I taught ck to check whether the proxy was running, start it if it wasn't, and wait for the port to open:
while [ "$i" -lt 40 ]; do
nc -z 127.0.0.1 "$HR_PORT" 2>/dev/null && break
sleep 0.25
i=$((i + 1))
done
Forty tries, a quarter second apart, so it gives up after ten seconds. Sixteen new lines in total. I was pretty pleased with them.
On Tuesday afternoon I moved everything onto OmniRoute. It's a local gateway that starts at login as a background service, takes requests on one port, routes them to whichever provider I've set up, and compresses them on the way out. That covers what claudish and headroom were doing between them, in one process. claudish came out of my tool list, the proxy went away, and ck shrank to a few environment variables pointing Claude Code at 127.0.0.1:20128.
About an hour later I deleted ck too. Those same variables now live in Claude Code's own settings file, so typing plain claude goes through the gateway. Once the settings file could hold them, the wrapper had nothing left to do except be one more name I had to remember.
So the sixteen lines I wrote on Monday lived for roughly thirty-one hours. The work they did is still happening. It's just done by something that starts itself at login, instead of a loop knocking on a port four times a second hoping somebody answers.
The headroom proxy has now been removed twice and restored once, which is a weird relationship to have with a piece of software. I don't think it's coming back a third time. I've also said that kind of thing on this blog before.

