March 5, 2026
tweakcc v4
tweakcc v4 is out with a Node.js API, ad-hoc patching, commands to extract the actual JS from native binaries, AGENTS.md support, and more.
tweakcc v4 introduces a Node.js API and an adhoc-pack subcommand, allowing anyone to patch their Claude Code install with custom sandboxed scripts. There's also a new unpack and repack command for extracting JS from native installations, and 11 new patches besides, including 2 preview feature unlocks.
tweakcc adhoc-patch
tweakcc adhoc-patch is particularly powerful. It allows you to perform a string/regex replacement or execute a custom JS script to modify your CC install. It works for both npm and native installs, automatically unpacking the JS before performing the patch and repacking when it's done.
Safe: The scripts are executed using Node.js 20+'s --experimental-permission/--permission mode, where disk and network access are forbidden. That means you can safely run scripts from HTTP without reviewing them—although, of course, they could theoretically inject malicious code into CC itself which could execute the next time you run it. So we use Oxc's beta oxfmt tool (https://github.com/oxc-project/oxc#formatter) to format the 11 MB+ JS before and after the patch and then present a diff of the changes, showing you exactly what changed, and all under 5s.
How it works: The script gets a global variable js which is set to the full contents of CC's JS code. You make your modifications to it and then return js at the end of the script. There's also a vars variable that contains common globals like chalk, React, require, and Ink's Box and Text components (CC uses React + Ink (https://github.com/vadimdemedes/ink) under the hood) in case you want to build in new UIs.
For example, a very simple script to replace "Claude Code" with "My App"—which breaks CC but makes for a good demo—would be:
// patch.js js = js.replace(/"Claude Code"/g, `"My App"`); return js;
Then just run npx tweakcc@latest --apply --script @patch.js. It's that simple. The video shows this in action.
A very good use case for this: new CC versions will sometimes break features—LSP was broken for a while last month and more recently Claude in Chrome functionality on Windows was broken. Someone usually does the work of diving into CC's minified code, hunting the bug, and writing a bash script to patch it.
But there are lots of inconveniences with that: bash doesn't work on Windows without WSL/Git Bash, different people have CC installed in different places, and of course, the native installation is difficult to patch period, and practically impossible unless you can magically make your old and new replacements exactly the same number of characters, which is usually only possible if the new snippet is smaller than the replaced snippet and you can pad it out with a comment.
tweakcc handles all of that. Provide the script with the actual patching logic and tweakcc finds the CC installation from PATH via heuristics accumulated by 7 months of patching CC for lots of different users. Then it handles patching the native binary on macOS, Windows, and Linux using node-lief, Node.js bindings we developed for LIEF for exactly this purpose.
Remote Config
tweakcc --apply now has an optional --remote-config <https://url.to/patch.js> flag that downloads a remote tweakcc from a URL and patches it. It will copy the config to your local config file in a separate remoteConfig field so you can inspect it afterwards, without overwriting your own local config.
Here’s an example:
npx tweakcc@latest --apply --config-url https://gist.githubusercontent.com/bl-ue/27323f9bfd4c18aaab51cad11c1148dc/raw/b24b5fe08874ce50f4be6c093d9589d184f91a70/config.json
tweakcc unpack/repack
There are new unpack and repack subcommands, convenience utilities to extract and re-embed the raw JS code that’s inside native binaries. They’re useful for exploring the JS code and modifying. They both take a path to a JS file and an optional path to a CC installation—which, if not specified, defaults to the current installation. Examples:
# Extracts the current CC install's JS into output.js npx tweakcc unpack output.js # ... make edits to output.js # Put the modified JS back into the binary: npx tweakcc pack output.js
New Patches
You can read the full docs for each patch on tweakcc’s readme, but here's a short description of each:
AGENTS.md support (demo video)
Enables AGENTS.md support in Claude Code. If CLAUDE.md doesn’t exist, AGENTS.md, if it does, will be loaded and used. Some other common names are also checked for, like GEMINI.md, QWEN.md, CRUSH.md, etc. You can also specify a custom list of names in your tweakcc config. Check the docs for configuration details. Here’s a demo video of this feature in action:
🔒 Unlock swarm mode
Team mode, also called swarm mode, is a new feature in Claude Code that’s automatically unlocked when you run npx tweakcc --apply. It turns Claude into a team orchestrator. It manages task lists, delegates to agents, communicates with agents asynchronously, and coordinates finishes. Here are two screenshots of some its functionality:


🔒 Unlock session memory
Session memory is an up and coming feature in Claude Code where Claude asynchronously takes notes about the current session in the background at interval. These notes are consolidated in an info-dense markdown file called summary.md for each session, and in subsequent sessions Claude is taught about the existence and use of these files and is told to use them to recall past interactions.
Thank you to George Zhang (@odysseus0z) for the initial patching for session memory!
/remember skill
This is part of session memory—/remember is a new built-in skill that instructs Claude to update CLAUDE.md based on points garnered from recent interactions as recorded by summary.md files. Check our blog post on session memory for details.
Input pattern highlighters
This is a new feature we added to Claude Code via tweakcc, where you can define custom patterns via regex that are highlighted specially in Claude Code’s input box when you type text that matches them. For example, you could highlight all numbers blue and bold. This is a nod to the ultrathink rainbow highlighting that CC had for a while, and while that specific highlighting is no longer present, we’re taking advantage of the same underlying highlighting functionality that powered ultrathink. Check the docs for configuration details.
Here's a demo where every word is assigned a different color based on its first letter:

Here's one where various common patterns like environment variables, file paths, numbers, and markdown constructs are highlighted:

Finally, here's one showing how you can render extra characters that aren't really part of the prompt by customizing the format string. The first line shows a copy of what's typed into the prompt, and in the prompt itself you can see that claude was visually (but not in reality) replaced with Claude Code, ..., etc.

Opus plan 1M
Claude Code has a feature that lets you use Opus in plan mode and Sonnet 4.5 with 1 million context when implementing the plan. This lets you use Sonnet 4.5 without context anxiety—see the docs for details.
MCP startup optimization
According to Cuipeng Fei’s blog, if you use Claude Code with MCP servers, you’re eligible for a free speed boost when starting Claude Code by configuring CC to launch more servers in parallel (default is 3) and to launch them asynchronously at that, so you can start typing and even get Claude going without being blocked by MCP servers—which you likely won’t use until later in the session anyway—starting up. Check the docs for details.
Token count rounding
Claude Code’s token counter can update extremely rapidly when tokens are pouring in; there could easily be dozens of update in a single second. For fast local terminals that’s usually no problem and presents a nice indicator of how fast you’re moving, but if you’re running CC remotely over a network connection where congestion could pose an issue, or if you happen to be using a terminal in an environment where redrawing the TUI is expensive, those updates can be quite disruptive. tweakcc can patch the token counter to round the token count to multiples of a given base, so it would change in increments of 50, for example, or even 1000. Check the docs for configuration details.
Statusline throttling/pacing
Claude Code’s docs incorrectly state that statusline updates happen at most every 300ms. Rather, they’re queued for 300ms, with no real throttling at all. tweakcc corrects that, and gives you the option to change that interval, as well as allowing you to have updates follow a fixed internal timer instead if you’d like! See the docs for configuration details.
Here are two demos:


Auto-accept plan mode
If you use Plan mode just to force Claude to prepare itself before jumping in, you might not care about what the plan actually is; you’d rather have it plan and then just go with the plan since there being a plan is enough. In that case, tweakcc has an option that makes CC automatically approve plans and switch to auto-accept mode. See the docs for details.
Thank you to Kevin Pham (@irdbl) for inventing and implementing this patch!
Dangerously bypassing permissions in sudo (thank you @brrock!)
claude --dangerously-skip-permissions auto-approves every single command that Claude attempts—including dangerous ones. While that’s undesirable on your local dev machine, it can be very convenient in protected environments like VMs and containers, where you want the model to do its thing fully autonomously. However, Claude Code refuses to even start when --dangerously-skip-permissions is passed if it’s running under sudo. This is a hard blocker—there’s nothing you can do to fix that short of a patch, and tweakcc provides a patch to do just that. The option is disabled by default, but if you enable it, you’ll be able to give Claude full sudo power without it needing permission for anything.
Thank you to Benjy Ross (@brrock) for inventing and implementing this patch!
Native installer warning suppression
When you install Claude Code via npm, you’ll see this yellow warning inside it:
Claude Code has switched from npm to native installer.
That’s useful to know for the first time, but if you want to stick with the npm install for now, tweakcc automatically removes that warning for you. See the docs for details.
Thank you Benjy Ross (@brrock) for coming up with and implementing this patch!