CLAUDE LABJP
BILLING — The Jun 15 change is now live: Agent SDK, headless runs, GitHub Actions, and third-party agents leave subscription limits for separate monthly credits ($20/$100/$200) metered at full API rates, no rolloverRETIRED — As of today, Sonnet 4 and Opus 4 are retired from the API; scripts referencing older models should switch to the latest generation such as Opus 4.8EXPORT — Claude Fable 5 and Mythos 5 are suspended for all foreign nationals under a US export-control directive (Jun 12); Anthropic calls it a misunderstanding and is working to restore accessSAFE — Only the two new Mythos-class models are affected; every other model including Opus 4.8 keeps running normallySUBAGENTS — Claude Code sub-agents can now spawn their own sub-agents (up to 5 levels), and Dynamic workflows arrived in research previewINCIDENT — A Jun 5 outage raised error rates across claude.ai, the API, Claude Code, and Cowork, a reminder to design retries and fallbacks into automated runsBILLING — The Jun 15 change is now live: Agent SDK, headless runs, GitHub Actions, and third-party agents leave subscription limits for separate monthly credits ($20/$100/$200) metered at full API rates, no rolloverRETIRED — As of today, Sonnet 4 and Opus 4 are retired from the API; scripts referencing older models should switch to the latest generation such as Opus 4.8EXPORT — Claude Fable 5 and Mythos 5 are suspended for all foreign nationals under a US export-control directive (Jun 12); Anthropic calls it a misunderstanding and is working to restore accessSAFE — Only the two new Mythos-class models are affected; every other model including Opus 4.8 keeps running normallySUBAGENTS — Claude Code sub-agents can now spawn their own sub-agents (up to 5 levels), and Dynamic workflows arrived in research previewINCIDENT — A Jun 5 outage raised error rates across claude.ai, the API, Claude Code, and Cowork, a reminder to design retries and fallbacks into automated runs
Articles/API & SDK
API & SDK/2026-06-16Advanced

Confirm Your Model Actually Responds Before a Scheduled Run Begins

A model you configured can be gone before your nightly job even wakes up. Tell retirement, withdrawal, and regional restriction apart with a single startup probe, then rewrite the run config to an eligible model — with complete, working TypeScript.

Claude API71Anthropic SDK4Automation25FallbackScheduled Jobs

Premium Article

When Claude Fable 5 and Mythos 5 were suspended for foreign-national users on June 12, my first reaction was not technical worry but a broken plan. The models had shipped only three days earlier, on June 9. The very next run I had wired into my verification schedule died the moment it started, with a flat "this model is unavailable." On the same June 15, claude-sonnet-4 and claude-opus-4 retired from the API. Anything that hard-coded those IDs in a config file would have called a model that no longer existed the instant the nightly job woke up.

For unattended jobs, the awkward part is not that a model is "down." It is that something usable yesterday is gone before the job even starts. The request does not fail mid-flight — the execution plan has lost its premise. This article is about checking that premise once, at the entrance to the run, and self-healing the config before any real work begins.

Why per-request fallback alone is not enough for unattended runs

Claude Code's fallbackModel, and the usual "if it fails, try the next model" retry you write against the API, work well interactively. A person watching the screen notices a mid-stream switch and can react.

Unattended scheduled jobs — like the auto-publishing runs I operate across four sites as an indie developer — are different. If you only discover at item three of a batch that the model retired, items one and two may already have flowed to a different model through retries. Output quality becomes a mix, and you can no longer tell which artifact came from which model without combing the logs. Per-request fallback is a "notice partway and partially recover" mechanism. It does not guarantee that the run starts and stays on the right model.

What an unattended run actually needs is not per-request insurance but an entrance check: before any real work, settle the question of whether this model truly responds, for this account, at this moment.

What a startup preflight actually fixes: partial completion and cost

Call this entrance check a startup preflight. It targets two problems.

The first is partial completion. If you fix the model before the batch's real work, every item in that run is processed by the same model. No mid-run swap, no patchy quality.

The second is cost predictability. Retirement and withdrawal, unlike a 429 rate limit or a 529 Overloaded, do not recover if you wait. Throwing repeated retries at an expensive model during the real work and then giving up costs far more than firing a single max_tokens: 1 probe at startup to pick an eligible model. After the June 15 billing change moved headless execution and the Agent SDK onto a separate monthly credit pool with no rollover, killing that wasted spend at startup translates directly into the headroom you have left at month-end.

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 complete resolveEligibleModel() in TypeScript that resolves an eligible model at startup with a cheap max_tokens:1 probe
Classification logic that separates model-not-found / unavailable / 403 into retirement, withdrawal, and regional restriction
The design call to resolve once per run and emit a single structured log line to keep credit spend negligible
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-06-15
Centralizing the anthropic-beta Header So a Retired Beta Won't Kill Your Batch
Scattered anthropic-beta headers turn a beta retirement or GA graduation into a 400 that takes down an entire batch. A small capability registry, a startup preflight, and tiered fallback keep your pipeline running across feature generations.
API & SDK2026-05-06
Building an Autonomous Research Agent with Claude API: Web Search, Summarization, and Knowledge Management
A complete guide to designing and implementing an autonomous research agent using Claude API and web search tools. Covers budget control, quality assurance, and knowledge base storage for production use.
API & SDK2026-04-20
Three Hidden Pitfalls When Implementing Claude API Streaming
Real-world lessons from building with Claude API streaming: runtime environment mismatches, error handling gaps, and silent token cost overruns — with working TypeScript examples.
📚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 →