patch-cc — patch the claude code binary — the settings menu that ships as a patcher
2026·10 · active · python
the itch
the tweaks i wanted in claude code — thinking inline instead of behind ctrl+o, tool calls that show their arguments, my own name on the banner — exist only as community patch scripts written in javascript, for a tool that no longer ships any javascript you can reach. claude code is a bun single-file executable now; the npm package is a wrapper that downloads it.
patch-cc is those patches as a real tool: pure python, no node, no bun. run `uvx patch-cc`, get a fullscreen menu, toggle what you want, press s. the patch set is a port of a-connoisseur/patch-claude-code, with the subagent-model idea from aleks-apostle — credited in the readme, rebuilt from the binary up.
the binary is the state
the menu never asks you to type something it could discover. agent names and model aliases are read out of your binary itself, so the picker can never offer a value your build would reject; free text exists only where a value is genuinely free (the startup name, the --version marker, the org/email label). and nothing is written until you save — quitting with unsaved changes asks first.
a patched binary records its own manifest inside itself, so the menu always reopens showing the real current state and `patch-cc status` answers exactly. no dotfile that can drift from the truth: if the binary says patched, it is, and `patch-cc restore` puts the original bytes back.
smaller after surgery
inside the binary's .bun section sits a module graph: a payload arena, a table of 52-byte records, and a 15-byte trailer that literally reads ---- Bun! ----. patch-cc splices the ~20 MB entrypoint bundle in place — and drops the 161 MB of precompiled bytecode riding alongside it, because any source edit invalidates it anyway. the patched binary is 114 MB against the original 275: smaller after surgery, at the honest cost of ~650 ms recompiling on launch.
the fragile one is live thinking: upstream has reshaped that stream reducer at least three times, so the patch is built as ~11 named steps that each record their own outcome. a scalar hit count can't tell "everything landed" from "half of it silently drifted" — which is exactly how a patch like this hides its own regressions. `patch-cc doctor` replays every step against your build and says so.
the models are a patch
v0.2.0 answers a different itch: the models themselves. pick gpt-5.x ids off your chatgpt/codex plan and patch-cc writes them into the binary — the subagent enum, the validators, the /model picker, the context-window table, and the binary's own model registry. that last one is what makes them first-class instead of merely accepted: the status line names them, /effort reads their real capabilities, /advisor takes them. `sol` resolves to the newest gpt-5.6-sol the way `opus` resolves to the newest opus — derived, not configured. registering models in the bundle follows clodex; the routing here lives in the bundle, not a tls intercept.
requests split at the wall: only the models you picked divert to a localhost gateway — pure stdlib, stateless — translating anthropic messages ⇄ openai responses, sse both ways, reasoning round-tripped, an effort clamp that steps down one rung when the backend refuses. every anthropic request stays byte-identical; your claude plan never notices. the port lives in the binary's manifest and `codex serve` reads it back out — nothing to configure, nowhere to drift.
facts
status: active · v0.7.1
install: uvx patch-cc
patches: 13 — toggles, pickers, free text
codex: gpt-5.x in /model — first-class
gateway: anthropic ⇄ openai · pure stdlib · localhost
surgery: 275 MB in → 114 MB out
runtime: pure python 3.11+ · rich + blessed
license: MIT
links
github · pypi
← anfreire.dev · the interactive version needs javascript