# Claude Code Secrets

> Source: <https://gist.github.com/FermataRest/0335bff687322dd0036cc7b27a013512>
> Published: 2026-06-25 02:02:35+00:00

| # 📌 Pinning `@anthropic-ai/claude-code` to v1.0.17 | |
| _Last updated: 2025-07-03_ | |
| Subsequent releases of `@anthropic-ai/claude-code` introduced breaking changes that nuked key workflows. | |
| Locking everything to **exactly** `1.0.17` avoids that pain. | |
| --- | |
| ## 1. 📦 Pinning the Local Project Version | |
| To keep your repo (and every nested dependency) on `1.0.17`, update `package.json`: | |
| ```` json | |
| { | |
| "dependencies": { | |
| "@anthropic-ai/claude-code": "1.0.17" | |
| }, | |
| "overrides": { | |
| "@anthropic-ai/claude-code": "1.0.17" | |
| } | |
| } | |
| ⸻ | |
| 2. 🔧 Fixing the Global Installation | |
| 🚮 2-1 Uninstall Any Existing Global Version | |
| npm uninstall -g @anthropic-ai/claude-code | |
| 📥 2-2 Install v1.0.17 Globally | |
| npm install -g @anthropic-ai/claude-code@1.0.17 | |
| ✋ 2-3 Disable the Auto-Updater Immediately | |
| DISABLE_AUTOUPDATER=1 claude config set -g autoUpdaterStatus disabled | |
| 🛡️ 2-4 (Optionally) Remove Risky Install Scripts | |
| cd /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code | |
| npm pkg delete scripts.prepare | |
| npm pkg delete scripts.preinstall | |
| rm scripts/preinstall.js | |
| ⸻ | |
| 3. 🛠️ Bypassing the Forced Update Check | |
| Even with the updater off, the CLI still hard-blocks if it thinks the version is “old.” | |
| Spoof a newer version inside the package. | |
| 📂 3-1 Navigate to the Package Directory | |
| cd /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code | |
| 🗄️ 3-2 Back Up Originals | |
| cp cli.js cli.js.original | |
| cp package.json package.json.original | |
| 🩹 3-3 Patch cli.js and package.json | |
| # Pretend we're on 99.0.0 to satisfy the check | |
| node -e "let f='cli.js';let fs=require('fs');fs.writeFileSync(f,fs.readFileSync(f,'utf8').replace(/1\\.0\\.17/g,'99.0.0'))" | |
| node -e "let f='package.json';let fs=require('fs');fs.writeFileSync(f,fs.readFileSync(f,'utf8').replace(/1\\.0\\.17/g,'99.0.0'))" | |
| ⸻ | |
| ✅ Result | |
| • Local project and global CLI are locked to 1.0.17. | |
| • Auto-updates are permanently disabled. | |
| • The hardcoded version gate is tricked into thinking you’re bleeding-edge. | |
| Happy hacking. 🔒🚀 | |

| How to Remove That Annoying Plan-Mode Popup in Claude Code | |
| _Last updated: 2025-07-03_ | |
| > **Note 🖥️** | |
| > This is a **macOS-centric guide** that assumes you installed Claude Code via **Homebrew**. | |
| > If you’re on Linux, Windows, or used a different package manager, adjust the file paths (`/opt/homebrew/...`) accordingly. | |
| ## 👋 For My Fellow Neurodivergent Coders Who Just Want to Focus | |
| If you’re like me—ADHD, dyslexic, or simply someone who **needs** to stay in flow—Claude’s bright-green **“Ready to code?”** popup is a vibe-killer. You’re deep in thought, and then **BAM!** 😤 Claude asks if you’re done planning. No thanks, Claude—I’ll decide when it’s time to exit plan mode. | |
| --- | |
| ## 🐛 The Problem | |
| Since **v1.0.17**, Claude Code ships an `exit_plan_mode` tool that spawns that popup whenever it *thinks* you’re finished. For neurotypical folks, maybe it’s just a minor speed bump. For us? It’s: | |
| - ⚡ **Focus-breaking** – every popup forces a context switch | |
| - 🧠 **Decision fatigue** – one more yes/no in an already crowded headspace | |
| - 🌊 **Flow disruption** – goodbye hyperfocus you worked so hard to achieve | |
| - 👀 **Sensory overload** – another flashing element screaming for attention | |
| --- | |
| ## 🛠️ The Solution: One Simple Command | |
| Instead of hunting for the line in the file, you can apply this change with a single command. | |
| 1. **Open your terminal.** | |
| 2. **Run this command to patch the file:** | |
| ``` bash | |
| sed -i.bak 's/behavior:"ask",message:"Exit plan mode?"/behavior:"deny",message:"Exit plan mode?"/' /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js | |
| ``` | |
| This finds the permission check for the "Exit plan mode?" prompt and changes the behavior from `"ask"` to `"deny"`. It also automatically creates a backup file named `cli.js.bak` in the same directory, just in case something goes wrong. | |
| That’s it. One command, zero popups. You’ll still have full control via the usual keyboard shortcut `Shift-Tab-Tab`. | |
| ⸻ | |
| 🧩 Why This Works | |
| The `sed` command performs a direct search-and-replace on the `cli.js` file. Changing the permission from `"ask"` → `"deny"` tells Claude: “You’re never allowed to run this tool.” The code stays intact—nothing crashes—but the popup cannot fire. | |
| ⸻ | |
| 💌 A Note to the Anthropic Devs | |
| Accessibility isn’t only about screen readers. For neurodivergent users, unwanted pop-ups are an access barrier. Please consider making the plan-mode prompt optional in future releases. We know when we want to switch modes—trust us. 🙏 | |
| ⸻ | |
| 🌟 Peace at Last | |
| Enjoy plan mode for as long as you choose, on your terms, with zero visual interruptions. | |
| Happy coding—and may your hyperfocus sessions be long and undisturbed! 🚀 | |
| ⸻ | |
| Document generated by Claude after empathizing with a neurodivergent dyslexic user. |
