Auto-healing patcher & 15/15 patches
(\w+) capture groups for JS identifiers. When Codex updates change minified variable names, the engine
captures the new names and regenerates the replacement automatically. Combined with dual protocol
interception to coexist with the Computer Use tweak, all 15 patches now work against
Codex v26.519.41501 — 11 exact match + 4 auto-healed, zero structural rewrites.
Patch inventory
15 source patches across 4 bundle types. Auto-healed patches are marked 🩹.
| Patch | Bundle | Status | What it does |
|---|---|---|---|
show-reasoning | split-items | 🩹 | Reasoning as standalone render items |
render-standalone-reasoning | thread | ✓ | Bypasses null-renderer for reasoning |
reasoning-start-expanded | thread | ✓ | useState(o) → useState(true) |
reasoning-no-autocollapse | thread | ✓ | Removes setExpanded(false) |
reasoning-no-blink | thread | ✓ | Disables streaming blink |
reasoning-no-animate-height | thread | 🩹 | Zero-duration height transition |
no-layout-position | thread | ✓ | Disables Framer Motion layout |
disable-shimmer | shimmer | ✓ | Stops pulsing animation |
show-exploration-items | split-items | 🩹 | Standalone exploration entries |
fix-assistant-order | split-items | 🩹 | Corrects agent-item ordering |
file-edits-no-tool-group | split-items | ✓ | Keeps patches out of tool-activity |
auto-expand-exec | thread | ✓ | defaultExpandExecShell: true |
expand-tool-activity | thread | ✓ | defaultExpanded: true |
thought-fade-disable | markdown | ✓ | Disables Wn fadeIn spans |
thought-fade-disable-un | markdown | ✓ | Disables Un fadeIn wrapper |
Auto-healing engine
When Codex updates change minified JavaScript identifiers, exact-match regexes stop working. v1.3's auto-healing engine recovers them automatically through three stages:
1. Skeleton anatomy
Every patch now carries a skeleton object alongside its exact-match regex:
// fails when Codex renames "t", "i", "s"
unpatched: /if\(t\.type===`reasoning`\)\{i&&i\.push\(t\);continue\}/
// (\w+) captures whatever the new names are
skeleton: {
match: /if\((\w+)\.type===`reasoning`\)\{(\w+)&&\2\.push\(\1\);continue\}/,
replacement: (m) => `if(${m[1]}.type===` + "`reasoning`" + `){...${m[2]}&&s(` + "`explored`" + `)...}`,
verify: /if\(\w+\.type===`reasoning`\)\{console\.log\(/,
}
2. Heal flow
autoHeal()
→ try cache: previous healed pattern?
→ if cache miss: run skeleton.match against bundle
→ capture {1: "t", 2: "i"} etc.
regenerate → call skeleton.replacement(captures) → produces patched source
verify → run skeleton.verify against output → ✓
cache → save to
api.storage per Codex version → survives restart
Concrete: fix-assistant-order auto-heal source-patcher.js:171
When Codex updated from v26.519.22136 to v26.519.41501, the exact regex stopped matching because minified variable names changed:
Old: D=E[E.length-1], O=Xe(D)?D:null, k=(O?.content?.trim().length??0)>0... New: w=C[C.length-1], T=me(w)?w:null, E=(T?.content?.trim().length??0)>0...
The skeleton's (\w+) groups captured w, C, T, me, E, h, S and the replacement function regenerated the correct patched code. The patch worked on the first reload — no manual intervention.
Protocol interception
v1.3 uses a dual approach because the Computer Use tweak (co.bennett.computer-use) registers
protocol.interceptBufferProtocol("app", handler), which replaces the entire app:// handler and
bypasses protocol.handle wrapping.
protocol.handle→ Wraps future
protocol.handle("app", handler) calls→ Works when no other tweak uses
interceptBufferProtocolApproach B — Register
protocol.interceptBufferProtocol→ Calls
uninterceptProtocol("app") first (removes CU handler)→ Reads files from ASAR, patches Statsig gates, patches all 15 patches
→ Retries at
[0, 50, 150, 500, 1500, 3000, 6000, 12000]ms
Results vs Codex v26.519.41501
Verified offline via scripts/verify-patches.js against the extracted ASAR.
Verification output
✅ Exact OK: 11 🩹 Auto-healed: 4 💀 Structural rewrite: 0 ⚠️ Ambiguous: 0 ❓ No skeleton: 0 ✅ AUTO-HEALING SUCCESSFUL: 4 patches auto-healed! ───────────────────────────── Total: 15 Working: 15/15 (exact or auto-healed)
Auto-healed patches
| Patch | Captured variables |
|---|---|
show-reasoning | t, i |
reasoning-no-animate-height | da |
show-exploration-items | ue, e, p |
fix-assistant-order | w, C, T, me, E, h, S |
See the v1.2 explainer for the full debugging timeline, architecture walkthrough, and the original v1.1 → v1.2 migration story.