{"slug": "claude-code-secrets", "title": "Claude Code Secrets", "summary": "A developer documented workarounds for breaking changes in Anthropic's Claude Code CLI tool, including pinning version 1.0.17, disabling auto-updates, and patching the `exit_plan_mode` popup to prevent focus disruption. The guide provides commands to lock dependencies, spoof version checks, and modify the permission behavior for neurodivergent users.", "body_md": "| # 📌 Pinning `@anthropic-ai/claude-code` to v1.0.17 | |\n| _Last updated: 2025-07-03_ | |\n| Subsequent releases of `@anthropic-ai/claude-code` introduced breaking changes that nuked key workflows. | |\n| Locking everything to **exactly** `1.0.17` avoids that pain. | |\n| --- | |\n| ## 1. 📦 Pinning the Local Project Version | |\n| To keep your repo (and every nested dependency) on `1.0.17`, update `package.json`: | |\n| ```` json | |\n| { | |\n| \"dependencies\": { | |\n| \"@anthropic-ai/claude-code\": \"1.0.17\" | |\n| }, | |\n| \"overrides\": { | |\n| \"@anthropic-ai/claude-code\": \"1.0.17\" | |\n| } | |\n| } | |\n| ⸻ | |\n| 2. 🔧 Fixing the Global Installation | |\n| 🚮 2-1 Uninstall Any Existing Global Version | |\n| npm uninstall -g @anthropic-ai/claude-code | |\n| 📥 2-2 Install v1.0.17 Globally | |\n| npm install -g @anthropic-ai/claude-code@1.0.17 | |\n| ✋ 2-3 Disable the Auto-Updater Immediately | |\n| DISABLE_AUTOUPDATER=1 claude config set -g autoUpdaterStatus disabled | |\n| 🛡️ 2-4 (Optionally) Remove Risky Install Scripts | |\n| cd /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code | |\n| npm pkg delete scripts.prepare | |\n| npm pkg delete scripts.preinstall | |\n| rm scripts/preinstall.js | |\n| ⸻ | |\n| 3. 🛠️ Bypassing the Forced Update Check | |\n| Even with the updater off, the CLI still hard-blocks if it thinks the version is “old.” | |\n| Spoof a newer version inside the package. | |\n| 📂 3-1 Navigate to the Package Directory | |\n| cd /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code | |\n| 🗄️ 3-2 Back Up Originals | |\n| cp cli.js cli.js.original | |\n| cp package.json package.json.original | |\n| 🩹 3-3 Patch cli.js and package.json | |\n| # Pretend we're on 99.0.0 to satisfy the check | |\n| 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'))\" | |\n| 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'))\" | |\n| ⸻ | |\n| ✅ Result | |\n| • Local project and global CLI are locked to 1.0.17. | |\n| • Auto-updates are permanently disabled. | |\n| • The hardcoded version gate is tricked into thinking you’re bleeding-edge. | |\n| Happy hacking. 🔒🚀 | |\n\n| How to Remove That Annoying Plan-Mode Popup in Claude Code | |\n| _Last updated: 2025-07-03_ | |\n| > **Note 🖥️** | |\n| > This is a **macOS-centric guide** that assumes you installed Claude Code via **Homebrew**. | |\n| > If you’re on Linux, Windows, or used a different package manager, adjust the file paths (`/opt/homebrew/...`) accordingly. | |\n| ## 👋 For My Fellow Neurodivergent Coders Who Just Want to Focus | |\n| 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. | |\n| --- | |\n| ## 🐛 The Problem | |\n| 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: | |\n| - ⚡ **Focus-breaking** – every popup forces a context switch | |\n| - 🧠 **Decision fatigue** – one more yes/no in an already crowded headspace | |\n| - 🌊 **Flow disruption** – goodbye hyperfocus you worked so hard to achieve | |\n| - 👀 **Sensory overload** – another flashing element screaming for attention | |\n| --- | |\n| ## 🛠️ The Solution: One Simple Command | |\n| Instead of hunting for the line in the file, you can apply this change with a single command. | |\n| 1. **Open your terminal.** | |\n| 2. **Run this command to patch the file:** | |\n| ``` bash | |\n| 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 | |\n| ``` | |\n| 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. | |\n| That’s it. One command, zero popups. You’ll still have full control via the usual keyboard shortcut `Shift-Tab-Tab`. | |\n| ⸻ | |\n| 🧩 Why This Works | |\n| 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. | |\n| ⸻ | |\n| 💌 A Note to the Anthropic Devs | |\n| 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. 🙏 | |\n| ⸻ | |\n| 🌟 Peace at Last | |\n| Enjoy plan mode for as long as you choose, on your terms, with zero visual interruptions. | |\n| Happy coding—and may your hyperfocus sessions be long and undisturbed! 🚀 | |\n| ⸻ | |\n| Document generated by Claude after empathizing with a neurodivergent dyslexic user. |", "url": "https://wpnews.pro/news/claude-code-secrets", "canonical_source": "https://gist.github.com/FermataRest/0335bff687322dd0036cc7b27a013512", "published_at": "2026-06-25 02:02:35+00:00", "updated_at": "2026-06-25 02:12:54.352729+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models"], "entities": ["Anthropic", "Claude Code", "Homebrew", "npm"], "alternates": {"html": "https://wpnews.pro/news/claude-code-secrets", "markdown": "https://wpnews.pro/news/claude-code-secrets.md", "text": "https://wpnews.pro/news/claude-code-secrets.txt", "jsonld": "https://wpnews.pro/news/claude-code-secrets.jsonld"}}