◉CLAUDE LABJP
●CC 2.1.330 — Claude Code 2.1.330 fixes the multi-minute freeze right after compacting a long conversation●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 8 days left. The suggested replacement is claude-sonnet-5-5●MCP 401 — Users report MCP servers that return 401 time out silently instead of showing an error●NEW — New: Desktop creates a worktree for every session? Three places to check●OPUS 4.5 — The 11/24 date for Opus 4.5 is a not-sooner-than floor, not a retirement notice●SCHEMA — Same schema, different shape: compare structured output from the Agent SDK and the Messages API●CC 2.1.330 — Claude Code 2.1.330 fixes the multi-minute freeze right after compacting a long conversation●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 8 days left. The suggested replacement is claude-sonnet-5-5●MCP 401 — Users report MCP servers that return 401 time out silently instead of showing an error●NEW — New: Desktop creates a worktree for every session? Three places to check●OPUS 4.5 — The 11/24 date for Opus 4.5 is a not-sooner-than floor, not a retirement notice●SCHEMA — Same schema, different shape: compare structured output from the Agent SDK and the Messages API
Articles/Claude Code
⟐ Claude Code/2026-06-17Advanced

When an Announced Billing Change Is Withdrawn at the Last Minute, Change No Code

A billing change that was supposed to take effect was withdrawn on the day. To survive announce, apply, and revert without touching code, I keep platform behavior behind a single flag and project the monthly delta from real logs.

Claude Code291Automation44Operations25Cost Management4Indie Dev23

✦ Premium Article

The first thing I saw when I opened the logs was a note I had written myself: "takes effect today."

A few hours later, the reversal arrived. The change that was supposed to move headless claude -p runs, the Agent SDK, and GitHub Actions onto a separate pool of monthly credits was put on hold the day it was meant to land. They stay, as before, inside the subscription limit.

The night before, I had been getting ready to rework the headless stages of my pipeline. I had the script open and was halfway into adding a branch when my hands stopped.

Stopping was the right call. Had I edited ahead of time, I would now be peeling that branch back out. So today I want to write down, plainly, the design that lets me sit through announce, apply, and revert without touching the body of the code.

The condition: never add a branch at any stage

Running four sites on autopilot as a solo developer, I do not get to decide how the platform behaves. The only thing I decide is where in my own code I absorb a change in that behavior.

Get the absorption point wrong and this is what happens. Every announcement adds a branch to the script; every effective date deletes the old one; every reversal puts it back. The work of chasing the change causes more incidents than the change itself.

So I set one condition. At no stage of announce, apply, or revert do I touch the generation or push code. The only thing I touch is configuration. To make that true, platform behavior has to be pulled out of the body and gathered in one place.

Gather platform behavior in one place

First, I moved every external fact about billing and credits into a single object. The body of the code reads nothing else.

// src/config/platform.ts
// The single source of truth for platform behavior.
// The body reads only this; external changes are absorbed by these values alone.
 
export type PlatformState = {
  // Has headless execution been split onto a separate credit pool?
  headlessSeparateCredits: boolean;
  // Approximate cost (USD) per stage, updated from real logs
  costPerStageUsd: Record<string, number>;
  // Is this config "applied" or merely "staged" (announced only)?
  status: "applied" | "staged";
  // Rationale and last-verified date; append on each reversal or re-announcement
  note: string;
  verifiedOn: string; // YYYY-MM-DD (JST)
};
 
export const PLATFORM: PlatformState = {
  headlessSeparateCredits: false, // withdrawn, so left at false
  costPerStageUsd: {
    "topic-select": 0.04,
    "body-generate": 0.21,
    "quality-gate": 0.03,
    "push": 0.01,
  },
  status: "staged",
  note: "The 6/15 credit split was withdrawn (on hold) the same day. Staying staged until an effective date is reconfirmed.",
  verifiedOn: "2026-06-17",
};

The body just reads the value.

// src/pipeline/run.ts
import { PLATFORM } from "../config/platform";
 
// Which execution pool headless runs in is decided by one flag.
// The only branch is "read the config"; no logic is rewritten anywhere.
const runner = PLATFORM.headlessSeparateCredits
  ? "metered-credits"
  : "subscription";
 
console.log(`[stage] runner=${runner} status=${PLATFORM.status}`);

That is the whole point. When an announcement lands, run.ts stays shut. The only thing that moves is a single boolean in platform.ts: true once an effective date is confirmed, left false on a reversal. Keeping status at staged lets the code say "I know about the announcement, but I have not applied it."

✦

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 single source of truth for platform behavior, so apply and revert both flip one flag instead of editing logic
✦A dry-run diff estimator that projects the monthly cost delta from your own usage logs before you commit
✦An operating routine that prevents the double failure of pre-emptive edits left stranded after a reversal
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-08-22
Handing a long job to another session — and the completion marker for when the notification never arrives
How to use notify_when_idle to hear when another Claude Code session finishes, and a small completion marker that keeps you from waiting forever when the notification is dropped.
⟐ Claude Code2026-08-03
Existence Checks Pass, Writes Fail — Probing Capabilities Before an Unattended Run
A directory existing and a directory being writable are two different facts. Measured results from five broken-environment cases, why static clues cannot predict the worst of them, and a capability-probe preflight for unattended Claude Code runs.
⟐ Claude Code2026-10-23
When a Nightly claude -p Said MCP Needed Authentication, I Added a Preflight That Splits Sleep From Keychain
Claude Code 2.1.307 fixed MCP failures caused by macOS sleep and a locked login keychain. Here is a preflight script that helps with or without the fix, and a way to match failures against sleep history.