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

28 articles
Back to all tags
Related:
claude-api16production10prompt-caching10api5python4extended-thinking3observability3context-management3tool-use3cache-control2streaming2haiku2
API & SDK/2026-05-15Advanced

Cutting Claude API Costs in Half with Messages Batches API — Design Patterns from an Indie Developer

How to reduce Claude API costs by up to 50% using the Messages Batches API. Includes async design patterns, real cost calculations, and production-ready error handling from an indie developer who runs four AI blogs on autopilot.

API & SDK/2026-05-13Advanced

Design Decisions Every Indie Developer Faces When Integrating Claude API into Mobile Apps

A practical guide to the design decisions that indie mobile developers face when integrating Claude API — covering model selection, async UX patterns, context management, offline resilience, and cost control, drawn from 10+ years of personal app development experience.

API & SDK/2026-05-06Advanced

Maximizing Profit Margins with Claude Haiku / Sonnet / Opus Model Switching

A complete implementation guide for dynamically routing Claude API requests to the right model based on task complexity. Includes cost calculation formulas, routing engine code, quality fallback logic, and real-world margin impact data.

API & SDK/2026-05-05Advanced

The Real Cost of Claude API Extended Thinking in Production — ROI Data by Task Type

Three months of measured cost, quality, and speed data for Extended Thinking across five task categories. Learn exactly when extended thinking is worth it—and when it's not.

Claude Code/2026-05-05Intermediate

Claude Code + Ollama: Cutting API Costs with Local LLMs

Worried about Claude Code API costs? Learn how to combine Ollama (local LLM) with a litellm proxy to significantly reduce expenses, and discover a practical framework for deciding which tasks to run locally versus in the cloud.

API & SDK/2026-05-02Intermediate

Cancelling Claude API Streams the Right Way: AbortController, Token Billing, and Connection Hygiene

I measured 100 cancelled Claude API streams to find out what actually gets billed. The drift numbers, the $18.70/month a missing close handler costs you, the proxy buffering trap, and a ledger that never loses a usage event — Node.js and Python.

API & SDK/2026-04-29Advanced

Production Semantic Cache for Claude API — Similarity Thresholds, Pollution Defense, and What to Track

A production playbook for adding a semantic cache in front of Claude API — threshold tuning, multi-tenant isolation, pollution prevention, fallbacks, and the metrics that actually prove it works.

API & SDK/2026-04-28Intermediate

Diagnosing Claude API Prompt Cache Misses — How to Read the usage Field

If your Claude API prompt cache isn't reducing your bill, the usage field is where to start. This guide walks through the five most common reasons cache_read_input_tokens stays at zero and how to fix each one.

API & SDK/2026-04-26Intermediate

How I Cut My Claude API Bill in Half With Prompt Caching

Done right, Anthropic's prompt caching can roughly halve your monthly API spend on workloads with long, repeated system prompts. Here is the design playbook I use after six months of running it in production.

API & SDK/2026-04-23Intermediate

Using tool_choice to Cut Wasted Inference: Four Modes and Cost Patterns for Production

tool_choice is one of the most underused parameters in the Claude API. The four modes — auto, any, tool, and none — each change both behavior and token cost. Here are the patterns I reach for in production, with runnable code.

Claude Code/2026-04-21Advanced

Claude Code × Python Hybrid Development Patterns: A Production Guide to 50% Token Reduction

Seven production-tested patterns for hybrid Claude Code × Python workflows, each with working code and real-world token reduction data.

API & SDK/2026-04-12Advanced

Intelligent Model Routing with Claude API — Auto-Selecting Sonnet 4.6 and Haiku 4.5 for Optimal Cost and Quality

Build an intelligent routing layer that automatically selects between Claude Sonnet 4.6 and Haiku 4.5 based on request complexity. Covers classifier design, circuit breakers, fallback chains, and cost monitoring for production deployments.