Skip to content

Instantly share code, notes, and snippets.

View jmac122's full-sized avatar

Jared jmac122

  • Texas
  • 00:26 (UTC -05:00)
View GitHub Profile
@jmac122
jmac122 / patch-thinking-blocks-macho.sh
Created April 22, 2026 00:59 — forked from phpmypython/patch-thinking-blocks-macho.sh
Length-preserving Mach-O binary patcher that restores auto-expanded thinking blocks on Claude Code 2.1.113+ — the native-binary replacement for the old sed-on-cli.js patchers that stopped working when Anthropic switched to a Bun-compiled executable. macOS only. Backup + auto-restore on failure.
#!/bin/bash
# Patch Claude Code (2.1.113+) Bun-compiled Mach-O binary so thinking blocks
# auto-expand inline in the live view, without forcing global verbose mode.
#
# Context: https://github.com/anthropics/claude-code/issues/49268
#
# Up to ~2.1.110 Claude Code shipped a pure-JS `cli.js` that could be patched
# with sed to auto-expand thinking blocks. Starting with 2.1.111–2.1.113 the
# package ships a Bun-compiled native Mach-O binary at
# `node_modules/@anthropic-ai/claude-code/bin/claude.exe`. The minified JS is