explaingit

butanium/claude-code-patches

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

Unofficial byte-level patches that remove small friction points from the Claude Code CLI, applied automatically at session start.

Mindmap

mindmap
  root((repo))
    What it does
      Patches Claude Code binary
      Removes repeated messages
      Same length safe edits
    Tech stack
      Python
      Bash
    Use cases
      Silence repeated reminders
      Reduce notification noise
      Add shutdown reason support
    Audience
      Claude Code power users
      Developers
    Safety
      Refuses loudly on mismatch
      Keeps original backup
    Setup
      SessionStart hook

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Disable the repeated task-tool reminder message injected into Claude Code sessions.

USE CASE 2

Stop a repeated notification from being sent on every turn between collaborating sessions.

USE CASE 3

Let one session attach a short reason when approving another's shutdown request.

USE CASE 4

Remove a repeated block of security warning text from inter-session messages.

What is it built with?

PythonBash

How does it compare?

butanium/claude-code-patches0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity3/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Version-anchored to Claude Code 2.1.x, a Claude Code update can make a patch stop applying until it's re-derived.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This project is a set of small, unofficial patches for the Claude Code binary, the command line tool used to run Claude as a coding assistant. The patches are applied automatically each time a session starts and each one removes a specific piece of friction in how the tool behaves, the kind of small annoyance you only notice after using the harness for a long time. The patches work by editing the compiled program file directly, in place, rather than changing any configuration setting. Because the underlying program is a single packaged file with the actual program text embedded inside it, each patch replaces one small piece of that text with a same length replacement, so nothing shifts around and breaks. Every patch checks first that the code it expects to find is still there. If a Claude Code update changes that code, the patch simply refuses to apply and prints a message explaining why, rather than risking damage to your program. A backup copy is kept the first time any patch runs, and patches can be reapplied safely without causing problems. Four patches are included. One removes a repeated reminder message about task tools not being used recently. Another stops a background notification from being sent on every single turn between collaborating AI sessions, while still allowing genuine failure or shutdown messages through. A third lets one collaborating session pass along a short reason when approving another session's shutdown request, since the stock behavior only allows a silent approval. The fourth removes a repeated block of security warning text that gets attached to every message between collaborating sessions, on the reasoning that repeating a long warning verbatim many times trains people to stop reading it. Installing it means cloning the repository and adding a line to your Claude Code settings file so the patches run automatically at the start of every session. Verified as working against version 2.1.x as of July 2026, and released under the MIT license.

Copy-paste prompts

Prompt 1
Help me add the SessionStart hook to my Claude Code settings.json for these patches.
Prompt 2
Explain what each patch in patches/ changes about Claude Code's behavior.
Prompt 3
Walk me through restoring the original Claude Code binary from its backup.
Prompt 4
Show me how a same-length in-place binary patch avoids corrupting the file.

Frequently asked questions

What is claude-code-patches?

Unofficial byte-level patches that remove small friction points from the Claude Code CLI, applied automatically at session start.

What language is claude-code-patches written in?

Mainly Python. The stack also includes Python, Bash.

What license does claude-code-patches use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is claude-code-patches to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is claude-code-patches for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.