CLAUDE LABJP
FORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as OctoberFORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as October
TAG

cost optimization

24 articles
Back to all tags
Related:
Claude API13Claude Code6production3Sonnet 52pricing2automation2Production2Claude Agent SDK2Files API2Automation2headless2indie dev2
Claude Code/2026-07-05Advanced

When to Use Claude Code's Native 1M Context — and When Not To: A Cost-Based Rule

With Sonnet 5 as the default, Claude Code now handles a native 1M-token context. A big window is convenient, but every token you park in it is billed again each turn. Should you load the whole repo, or feed slices? Here is an estimable token model and a decision rule that gives a concrete answer per situation, with working code and the traps to avoid.

API & SDK/2026-07-02Intermediate

Introductory Pricing Has an End Date — Effective-Dated Cost Forecasts for the Sonnet 5 Price Step

Claude Sonnet 5's introductory $2/$10 pricing ends on 2026-08-31 and reverts to $3/$15. A static price map will quietly understate your September forecast by a third. Here is an effective-dated price table and forecast design that absorbs the step.

API & SDK/2026-07-01Advanced

When Claude API Document Extraction Is Confidently Wrong — Field Notes on Catching Silent Errors with Invariants

In structured extraction from invoices and contracts, the real danger isn't a crash — it's a value that's silently wrong while the schema validates and confidence reads high. Field notes on invariants, two-pass extraction, and tracking field-level error rates.

API & SDK/2026-06-29Advanced

Stop rebuilding intermediate files every request: reuse the Code Execution container to carry pipeline state

How to reuse the Code Execution container across requests by passing its container ID, so generated files and intermediate results carry over to the next step. Includes the execution-time billing trap and how to handle container_expired safely, with working code.

API & SDK/2026-06-28Advanced

Every Tool Call Succeeds, Yet Nothing Moves Forward: Detecting Stagnation in Unattended Agents

No errors, yet the agent keeps replaying the same move while your budget quietly drains. Here is how to detect a success-but-no-progress loop using a progress oracle and action fingerprints, with a working Python implementation that halts safely.

API & SDK/2026-06-22Advanced

Your Claude Files API Storage Is Quietly Filling Up — Dedup With a Content-Hash Ledger and Reap the Orphans

Use the Files API in an automated pipeline and the same file gets uploaded again and again while orphaned files pile up unnoticed. Here is a content-hash dedup ledger plus an orphan GC design, with working code.

API & SDK/2026-06-21Advanced

Reserving Priority Capacity for User Traffic with service_tier

If you pay for Priority Tier but your user-facing responses still slow down at peak, the culprit is often your own background jobs eating the priority pool. Here is how to read service_tier, prove the contention, and isolate background work.

API & SDK/2026-06-20Advanced

Routing the effort Parameter Per Stage to Balance Claude's Output Cost and Latency

Claude's effort parameter governs all output tokens — thinking, prose, and tool calls. This guide replaces a blanket high setting with per-stage tiers and a dynamic router, grounded in measurements from a solo developer's automation pipeline.

API & SDK/2026-06-20Advanced

Putting Cloudflare AI Gateway in Front of Claude Made the Numbers I Needed Disappear — Field Notes on Instrumentation

After putting Cloudflare AI Gateway in front of Claude API, here is where I actually got stung — cost attribution, semantic-cache false hits, fallback quietly lowering quality, and budgets that don't really stop anything — with the code I used to fix each.

Claude Code/2026-06-14Advanced

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 Code/2026-06-14Intermediate

Measuring a Week of Headless Usage the Night Before the Billing Change

With headless Claude Code moving to monthly credits on June 15, I spent a week logging how many tokens my unattended runs actually consume, so I could pick a plan based on numbers instead of a guess.

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.