Community-contributed binary patches for Claude Code CLI — unlock hard-coded limitations without waiting for upstream changes.
Disclaimer: This is unofficial and not supported by Anthropic. It modifies the Claude Code binary. Use at your own risk. Keep backups and know how to reinstall Claude Code.
npx skills add huybuidac/claude-code-patchkit -gThe
-gflag installs globally (user-level) so the skill is available in all projects. Without it, the skill is only available in the current project.
/plugin marketplace add huybuidac/claude-code-patchkit
/plugin install claude-patch
- macOS (arm64 tested, x86_64 expected to work)
- Python 3
codesign(ships with macOS)- Claude Code installed as native binary
- Write permission to the Claude binary
Inside a Claude Code session:
/claude-patch # Interactive mode
/claude-patch apply subagent-model # Apply specific patch
/claude-patch revert subagent-model # Revert to backup
/claude-patch status # Show all patch states
| Patch | Description | Risk |
|---|---|---|
| subagent-model | Unlock model param on Agent tool — use any model id per-call |
Low |
Claude Code is distributed as a bun-compiled binary with embedded JS bundles. Some behaviors are locked behind hard-coded Zod schemas. This is an Agent Skill — Claude reads the patch definitions and executes the procedure interactively with your confirmation at each step. It applies safe, length-preserving binary patches with:
- Fingerprint detection — locate exact byte patterns
- Context guard — verify surrounding stable strings (not minified variables)
- State detection — determine unpatched / patched / abnormal before acting
- Backup — always saves
<binary>.bak.<timestamp> - Length-preserving swap — no offset shifts or blob corruption
- Re-sign — ad-hoc codesign for macOS
- Self-verify — confirm marker count post-patch
- Never patches without explicit user confirmation
- Aborts if fingerprint doesn't match (schema changed in new version)
- Always creates backup before modifying
- Re-applies required per Claude Code update (new binary = clean slate)
- Copy
skills/claude-patch/patches/TEMPLATE.md - Fill in all sections (fingerprint, context guard, replacement, detection, script)
- Test on at least 2 Claude Code versions
- Submit a PR
- Length-preserving replacement (old bytes == new bytes in length)
- Unique marker string embedded in replacement for state detection
- Context guard using stable strings (
.describe()text, not minified variable names) - Tested version list
- macOS arm64 (Apple Silicon) — tested
- macOS x86_64 — should work (untested)
- Linux — binary layout may differ, contributions welcome
- Backups are saved as
<binary>.bak.<timestamp>next to the original - To manually restore:
cp <binary>.bak.<timestamp> <binary> && codesign --force --sign - <binary> - To reinstall Claude Code: delete
~/.local/share/claude/and re-run the installer
MIT