cd /news/ai-tools/pinning-claude-code · home topics ai-tools article
[ARTICLE · art-108942] src=olafalders.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Pinning Claude Code

Developer Olaf Alders pinned his Claude Code to Opus 4.8, citing that Opus 5 feels worse in some ways, and shared a script that forces environment variables via Claude's config to disable auto-updates while re-enabling plugin updates. Alders' config sets the model to claude-opus-4-8 and excludes Fable due to high credit consumption and concerns about foreign government influence.

read6 min views1 publishedAug 24, 2026
Pinning Claude Code
Image: Olafalders (auto-discovered)

Earlier today I saw this post from Curtis Poe.

Just yesterday I pinned my Claude Code to Opus 4.8 for similar reasons. Opus 5 doesn’t seem to be a clear improvement over 4.8 and, in some ways, it just feels worse. I can’t provide you with benchmarks to prove it, so this is mostly hand waving, but I feel like the results I’m getting are worse, more verbose, wider in scope and sometimes just mystifying. It’s taking longer to do basic things. I’m happy to switch back to 4.8 for as long as it’s available. Newer does not automatically mean better. If you’ve ever released your own software, you likely know this to be true.

Curtis’ post contains a quick workaround for this, but I do something different, so I figured I’d show that off. And when I say that I do something different, it’s just a script that Claude wrote for me. (Claude, however, did not write this post.)

A few weeks ago, I wrote about being bitten by a Claude upgrade Easter Egg: Claude Code: Anatomy of a Misfeature. I was pleased to later read an article by Mauricio Patiño Cervantes which referenced my piece. I was also happy to see that this article was advocating for a way of managing Claude’s defaults that is similar to mine.

#On the Joys of Pinning

Photo: Safety Pin by Haragayato, licensed under CC BY-SA 3.0.

I’ve come to the conclusion that I prefer boring upgrades when it comes to Claude Code, so I’ve been pumping the brakes on the YOLO mode that it defaults to. There is more than one way to do this, but I wanted something that would instantly stick across all of my new sessions without requiring me to do much, since I’m against busy work. It turns out you can force environment variables via Claude’s config. That allows me to have env vars propagate instantly to new Claude sessions without personally having to update the env in all of my far too many tmux

sessions.

So, I end up with a config that looks something like this (truncated) version:

{
  "env": {
    "DISABLE_AUTOUPDATER": "1",
    "FORCE_AUTOUPDATE_PLUGINS": "1"
  },
  "model": "claude-opus-4-8",
  "availableModels": [
    "claude-opus-4-8",
    "opus",
    "sonnet",
    "haiku"
  ]
}

The highlights here are: DISABLE_AUTOUPDATER

stops Claude from happily updating itself in the background, but it also stops plugins from doing the same. I have a higher risk tolerance for plugins, so I re-enable that behaviour via FORCE_AUTOUPDATE_PLUGINS

. I then choose a default model via model

and create a list of models I’d generally like to choose from. You’ll note that Fable is missing from that list because the last time I ran /model fable

the only thing I saw was a lot of credits go up in smoke. I think what I do is just not complex enough to need Fable and I’m not super jazzed about things that can get turned on and off on the whims of a foreign government.

So that gives me the pin that goes back to Opus 4.8, but I’m not doing this by hand. I have too many places where my dot-files live, so I want this to be scriptable and idempotent. I give you my config and (caveat emptor) the LLM-generated portion of tonight’s entertainment. It currently lives in my dot-files: configure/claude-settings.sh.

Contains LLM-generated content not written by Olaf #

#!/usr/bin/env bash

#

set -eu -o pipefail

SETTINGS="$HOME/.claude/settings.json"

mkdir -p "$(dirname "$SETTINGS")"

if [[ ! -f $SETTINGS ]]; then
    echo '{}' >"$SETTINGS"
fi

set_env_key() {
    local key=$1 value=$2

    if jq -e --arg k "$key" --arg v "$value" '.env[$k] == $v' "$SETTINGS" >/dev/null; then
        return
    fi

    jq --arg k "$key" --arg v "$value" '.env[$k] = $v' "$SETTINGS" >"$SETTINGS.tmp"
    mv "$SETTINGS.tmp" "$SETTINGS"
    echo "set env.$key=$value in $SETTINGS"
}

set_key() {
    local key=$1 value=$2

    if jq -e --arg k "$key" --argjson v "$value" '.[$k] == $v' "$SETTINGS" >/dev/null; then
        return
    fi

    jq --arg k "$key" --argjson v "$value" '.[$k] = $v' "$SETTINGS" >"$SETTINGS.tmp"
    mv "$SETTINGS.tmp" "$SETTINGS"
    echo "set $key=$value in $SETTINGS"
}

set_env_key DISABLE_AUTOUPDATER 1

set_env_key FORCE_AUTOUPDATE_PLUGINS 1

set_key autoCompactEnabled true
set_key autoCompactWindow 200000

set_env_key CLAUDE_CODE_DISABLE_1M_CONTEXT 1

set_env_key CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS 5

set_key availableModels '["claude-opus-4-8","opus","sonnet","haiku"]'

set_key model '"claude-opus-4-8"'

set_key effortLevel '"medium"'

So far this has worked quite well for me. I can now upgrade Claude Code on my own schedule and tweak config settings in various environments without having to do anything other than run my dot-files installer.

── more in #ai-tools 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/pinning-claude-code] indexed:0 read:6min 2026-08-24 ·