CLAUDE LABJP
TOOLSWAP — Mid-conversation tool changes are in beta: add or remove tools between turns while keeping the prompt cache intact, on Fable 5, Mythos 5, Opus 4.8, and Opus 5FALLBACK — The fallbacks parameter gained a default mode that applies Anthropic's recommended fallback models per refusal category, with server-side fallback also in betaADDDIR — A new DirectoryAdded hook fires right after /add-dir or the SDK register_repo_root request registers a working directory mid-sessionMCPERR — Entries skipped by --mcp-config validation now surface as mcp_server_errors in the headless stream-json init event, and terminal runs print a startup warningFANOUT — Concurrently running subagents are now capped at 20 by default, and hitting --max-budget-usd denies new spawns while halting the background agents already runningOPUS5 — Claude Opus 5 ships with a 1M-token context window, 128K max output, thinking on by default, and the same pricing as Opus 4.8TOOLSWAP — Mid-conversation tool changes are in beta: add or remove tools between turns while keeping the prompt cache intact, on Fable 5, Mythos 5, Opus 4.8, and Opus 5FALLBACK — The fallbacks parameter gained a default mode that applies Anthropic's recommended fallback models per refusal category, with server-side fallback also in betaADDDIR — A new DirectoryAdded hook fires right after /add-dir or the SDK register_repo_root request registers a working directory mid-sessionMCPERR — Entries skipped by --mcp-config validation now surface as mcp_server_errors in the headless stream-json init event, and terminal runs print a startup warningFANOUT — Concurrently running subagents are now capped at 20 by default, and hitting --max-budget-usd denies new spawns while halting the background agents already runningOPUS5 — Claude Opus 5 ships with a 1M-token context window, 128K max output, thinking on by default, and the same pricing as Opus 4.8
Articles/Claude Code
Claude Code/2026-06-13Advanced

Pin Your Execution Model with enforceAvailableModels — Don't Let Auto-Upgrades Burn Through Your Credits

From June 15, monthly credits become non-rolling. This is a setup-layer approach to keep subagents and fallbacks from silently upgrading to pricier models, using enforceAvailableModels to pin the model set from the managed-settings layer, with a verification step you can run in CI.

Claude Code204Cost Optimization8SettingsAutomation40Model Selection3

Premium Article

From June 15, headless claude -p, the Agent SDK, GitHub Actions, and third-party agents move off subscription caps and onto API-rate monthly credits with no rollover. As an indie developer I run four technical blogs (Dolice Labs) through a nightly batch, and the first thing I worried about with this change wasn't quality dropping — it was credits running dry mid-month because of an unintended model upgrade.

The failure path is mundane. The parent agent is assigned Haiku, but a subagent definition still carries model: opus, or the fallbackModel for overload points at a heavier model, or — during a new model's launch window — I reach for "the smartest one" on a whim and leave it there. The per-run difference is small, but across a batch that runs every night, it adds up by the end of the month.

This article centers on a managed setting called enforceAvailableModels and a design that pins the very set of models a session can pick, keeping credit consumption inside a predictable range. It's not a prompt trick — it's a ceiling built at the settings layer.

Why pinning the model pays off after the billing change

In months with rollover, or back when we ran inside subscription caps, an accidental heavy run got absorbed the following month. With non-rolling monthly credits, that cushion is gone. Credits are a budget that simply stops when exhausted, which makes in-month allocation a real part of operations design.

This is where suppressing consumption at the entrance matters. Asking, in the prompt, to "please use a cheaper model" isn't reliably honored inside recursive subagents or automatic workflows. But if you narrow the set of selectable models in a managed setting, no path — wherever it originates — can launch a model outside that set. The whole point here is turning cost control from a request into a constraint.

One data point from my own pipeline: generating a single article (research + draft + JA/EN consistency check) on Haiku versus accidentally running the same steps on Opus turned the per-token price gap directly into a several-fold consumption gap. At a scale of six articles a night across four sites, a single night of that mistake pushes the daily budget up. That's exactly why I want a setting to stop it, not human vigilance.

Which layer enforceAvailableModels lives in

Claude Code resolves its final settings by stacking several layers. Roughly, from highest precedence down:

  1. Managed settings — placed by a device or org admin and not overridable by the user
  2. Project settings — the repo's .claude/settings.json
  3. User settings — ~/.claude/settings.json
  4. Runtime flags and in-session choices

If you want your cost ceiling to be a floor that can't be broken, put it in the non-overridable managed-settings layer. enforceAvailableModels declares, at this layer, "the set of models any session on this machine (or in this org) is allowed to use." Anything outside the set can't be selected — not by a runtime flag, not by a subagent definition.

Here's where the managed-settings file lives on macOS (on Linux it's /etc/claude-code/managed-settings.json).

# Managed settings on macOS (placed as root; not user-overridable)
/Library/Application Support/ClaudeCode/managed-settings.json

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
A concrete managed-settings configuration that pins the model set a session may use, combining enforceAvailableModels with permissions.deny globs
A three-tier fallback that only ever steps down inside the allowed set, so an overloaded run never bounces up to a pricier model
A small inverted-assertion script to verify in CI that out-of-set models are actually rejected, plus how to roll the policy out across multiple repos
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

Claude Code2026-06-14
Pacing Non-Rollover Monthly Credits: A Burn-Rate Scheduler That Avoids Both Early Exhaustion and Wasted Balance
Non-rollover monthly credits punish you for spending too fast and for spending too slow. Here is the design of a scheduler that derives a daily burn rate from remaining balance and days left, throttles headless runs automatically, and the real numbers from running it on a personal automation setup.
Claude Code2026-07-25
Locking down Claude Code sandbox egress with strictAllowlist
Tightening automation egress with strictAllowlist in Claude Code v2.1.219, plus measured failure timings that tell a policy deny from DNS and real outages.
Claude Code2026-07-18
Branch with /fork, Delegate with /subtask — Two Commands That Traded Jobs
In Claude Code 2.1.212, /fork now clones your conversation into a background session, and in-session subagents moved to /subtask. Here is how I decide between them, and the budgets worth setting before you start branching freely.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →