◉CLAUDE LABJP
●2.1.296 — Subagents can set their own autoCompactWindow, and an env var pins the model used by workflow agents●HAIKU 5.5 — Since 2.1.293 (Oct 7), claude-haiku-5-5 is the default Haiku model on the Anthropic API●SONNET 4.5 — Retires on the Claude API on 11/30, 47 days left. Migrate to Sonnet 5.5●Q&A — A write-up shows three places to look when a Mod draws nothing and reports no error●AGENTS.MD — One write-up explains how to split the entry points when Codex and Claude Code share a folder: AGENTS.md and CLAUDE.md●NEW — Approval prompts for "cd, git add, commit" every time: not a missing setting, but how it works●2.1.296 — Subagents can set their own autoCompactWindow, and an env var pins the model used by workflow agents●HAIKU 5.5 — Since 2.1.293 (Oct 7), claude-haiku-5-5 is the default Haiku model on the Anthropic API●SONNET 4.5 — Retires on the Claude API on 11/30, 47 days left. Migrate to Sonnet 5.5●Q&A — A write-up shows three places to look when a Mod draws nothing and reports no error●AGENTS.MD — One write-up explains how to split the entry points when Codex and Claude Code share a folder: AGENTS.md and CLAUDE.md●NEW — Approval prompts for "cd, git add, commit" every time: not a missing setting, but how it works
Articles/API & SDK
⬡ API & SDK/2026-08-30Advanced

Read the Catalog Your CLI Already Ships Before Bulk-Replacing Model IDs

A newer generation makes older model IDs look stale. Here is how to pull the catalog embedded in your installed binary, sort every reference into matched, date-mismatched, and malformed, and stop the replacement that would break working IDs.

Claude API127model IDsmigration9auditingoperations30

✦ Premium Article

A few nights after Opus 5 started showing up as the newest model, I was reviewing my own site and stopped mid-scroll. The claude-sonnet-4-6 and claude-opus-4-6 strings scattered through my articles suddenly looked like leftovers.

It seemed like a one-line sed job. I got as far as counting the targets: 209 Japanese articles, 56 of them still indexed. My finger was on the command when I noticed the thing I had not verified.

Were those 4-6 IDs actually invalid?

Had I replaced them without checking, I would have stripped a still-working identifier out of 56 articles and handed readers code that no longer runs. Working as a solo indie developer, that flavor of well-intentioned damage is the one I fear most, because nobody else is going to catch it.

The short version: the Claude Code binary already installed on your machine carries a catalog of the model IDs that version knows about. You can read it without a network call and without an API key. What follows is how to pull it, reconcile it against your own files, and stop the replacement before it lands.

A new generation appearing is not the same event as an ID being retired

Conflating those two is exactly what nearly cost me.

A new generation means the set of options grew. A retirement means requests that used to succeed will start failing, and that normally arrives with an announcement and a date. The first does not imply the second.

The catalog I pulled from v2.1.246 contained claude-opus-4, claude-opus-4-1, claude-opus-4-5, claude-opus-4-6, claude-opus-4-7, claude-opus-4-8, and claude-opus-5 at the same time. Generations show up as a list of things that coexist, not as a history of replacements.

The habit of reading "newest released" as "previous one is dead" gets stronger the faster you skim release notes. I track updates daily, and that reflex almost took over.

The installed binary carries the model catalog

The Claude Code native binary stores its supported model identifiers as plain strings. Pin a version, run strings over it, and you get the full set that build knows about.

#!/usr/bin/env bash
# model_catalog.sh — pull the model ID catalog out of the installed CLI
# usage: ./model_catalog.sh > catalog.txt
set -euo pipefail
 
BIN="$(command -v claude || true)"
if [ -z "$BIN" ]; then
  echo "claude is not on PATH" >&2
  exit 1
fi
BIN="$(readlink -f "$BIN")"
 
# Always record which build you read. The catalog is only what that build knows.
echo "# source: $BIN" >&2
claude --version >&2
 
strings -n 8 "$BIN" \
  | grep -Eo 'claude-(opus|sonnet|haiku|fable)-[0-9][a-z0-9._@-]*' \
  | sort -u

Running it against v2.1.246 (/usr/local/bin/claude, roughly 237MB) produced this:

StageCountWhat it contains
Strings beginning with claude-233Mostly internal identifiers, not models
Containing a family name (opus / sonnet / haiku / fable)38The candidate pool
Matching the ID shape25Directly usable
Failing the shape check13Not all of these are wrong, as shown below

Only 38 of the 233 claude- strings looked like model IDs at all. The rest were internal identifiers such as claude-code-agent-id and claude-cli-internal. A naive grep hands you six times more noise than signal.

This works as long as the binary is not stripped. Distribution formats change, so I'd give the gate described later a branch for "the catalog could not be read."

I ran into exactly that in a different environment: the claude command there was only a tiny launcher stub of about 2.3MB, and the same strings and grep returned zero lines. Checking the size of the executable first (about 237MB for my v2.1.246) helps separate "extraction failed" from "the catalog simply is not in there."

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You will be able to stop a bulk replacement that would break still-valid IDs, before the command runs
✦You will be able to pull a catalog of model IDs straight from the binary on your disk, with no network call and no API key
✦You will be able to narrow more than 1,300 references down to the 63 that actually need attention
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ API & SDK2026-10-13
Haiku 5.5 is cheaper per token, but your bill jumps fivefold past about 77k Haiku 4.5 tokens
On the price sheet, Haiku 5.5 costs roughly a tenth of Haiku 4.5. But the same text becomes about 30% more tokens, and a prompt over 100k tokens is billed at five times the rate. Here is the boundary in Haiku 4.5 terms, a script I actually ran, and the changes that return a 400.
⬡ API & SDK2026-10-08
Before Sonnet 4.5 retires, one script to find the arguments that will return a 400
claude-sonnet-4-5 retires on November 30. Swapping the model ID is not enough: budget_tokens, prefill, and tool_choice will fail. Here is a scanner built from the official migration guide, its real output, and the order I would fix things in.
⬡ API & SDK2026-10-07
Before You Switch Models, Replay Your Own Call Shapes Against the Candidate for a Few Tokens
Change a model ID and the first production request is where a 400 shows up. Here is a small replay script that checks your own call shapes against a candidate model with max_tokens 16 before you switch.