Reasoning & Exploration Fixes · v1.3

Auto-healing patcher & 15/15 patches

TL;DR — v1.3 introduces skeleton-based auto-healing: every patch carries a loose regex with (\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.
15
Total patches
11
Exact match
4
Auto-healed
0
Structural

Patch inventory

15 source patches across 4 bundle types. Auto-healed patches are marked 🩹.

PatchBundleStatusWhat it does
show-reasoningsplit-items🩹Reasoning as standalone render items
render-standalone-reasoningthreadBypasses null-renderer for reasoning
reasoning-start-expandedthreaduseState(o)useState(true)
reasoning-no-autocollapsethreadRemoves setExpanded(false)
reasoning-no-blinkthreadDisables streaming blink
reasoning-no-animate-heightthread🩹Zero-duration height transition
no-layout-positionthreadDisables Framer Motion layout
disable-shimmershimmerStops pulsing animation
show-exploration-itemssplit-items🩹Standalone exploration entries
fix-assistant-ordersplit-items🩹Corrects agent-item ordering
file-edits-no-tool-groupsplit-itemsKeeps patches out of tool-activity
auto-expand-execthreaddefaultExpandExecShell: true
expand-tool-activitythreaddefaultExpanded: true
thought-fade-disablemarkdownDisables Wn fadeIn spans
thought-fade-disable-unmarkdownDisables 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

inspectRule() → unpatched=0 patched=0 → "unsupported"
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.

Approach A — Patch protocol.handle
Wraps future protocol.handle("app", handler) calls
Works when no other tweak uses interceptBufferProtocol

Approach 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
Approach B also handles Statsig gate patching for Computer Use compatibility, so the CU tweak's functionality is preserved — it just runs through RF's handler instead.

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

PatchCaptured variables
show-reasoningt, i
reasoning-no-animate-heightda
show-exploration-itemsue, e, p
fix-assistant-orderw, 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.