← Back to all entries
2026-04-04 💡 Tips 'n' Tricks

300k Batch Outputs, Data Residency & Claude Code's April Toolkit

300k Batch Outputs, Data Residency & Claude Code's April Toolkit — visual for 2026-04-04

💡 300k Token Outputs Are Now Live on the Message Batches API

Anthropic has extended the maximum output length on the Message Batches API to 300,000 tokens for Claude Opus 4.6 and Claude Sonnet 4.6. This is a ten-fold increase over the previous 32k cap and opens up a class of long-form generation jobs that previously required stitching together multiple API calls or chunking output manually. To access it, add the output-300k-2026-03-24 beta header to your batch request.

What you can do with 300k output tokens

Important constraint: Batches API only, not the synchronous Messages endpoint

The 300k cap applies exclusively to the Message Batches API, not to real-time /messages calls. A 300k-token generation can take well over an hour to complete, making it unsuitable for synchronous use. Budget for the 24-hour batch processing window, and design your pipeline to poll for results rather than block on a response. Standard batch pricing (50% of standard API rates) applies — so a 300k-output Opus 4.6 job costs significantly less than the same output via streaming.

Request snippet

POST /v1/messages/batches
anthropic-beta: output-300k-2026-03-24
anthropic-version: 2023-06-01
Content-Type: application/json

{
  "requests": [
    {
      "custom_id": "long-doc-gen-001",
      "params": {
        "model": "claude-opus-4-6-20260130",
        "max_tokens": 300000,
        "messages": [{ "role": "user", "content": "Write a complete..." }]
      }
    }
  ]
}
⭐⭐⭐ docs.anthropic.com
Message Batches API max tokens long-form generation Opus 4.6 Sonnet 4.6

💡 Data Residency Controls: Pin Your Model Inference to the US

Anthropic has shipped data residency controls for the Claude API — a new inference_geo parameter that lets you specify where model inference runs on a per-request basis. At launch, two options are available: "us" (US-only inference) and "global" (default, no geographic constraint). US-only inference is priced at 1.1× the standard rate for models released after February 1, 2026, including Opus 4.6 and Sonnet 4.6.

Who needs this

Inference geo vs. workspace geo — they are independent settings

Anthropic separates two distinct residency controls: Inference geo (where the model runs — configurable per request) and Workspace geo (where account/billing data is stored — currently US-only at launch). You can mix them independently. A global-geo workspace can still issue per-request US-only inference calls if a specific job requires it — useful for multi-tenant platforms where most data is unrestricted but some records are regulated.

API usage

POST /v1/messages
Content-Type: application/json
anthropic-version: 2023-06-01

{
  "model": "claude-sonnet-4-6-20260131",
  "max_tokens": 1024,
  "inference_geo": "us",
  "messages": [{ "role": "user", "content": "Summarise this contract..." }]
}
data residency compliance inference_geo enterprise security

💡 Claude Code's April Wave: MCP Persistence, --bare Flag & Channel Relays

The April 2026 Claude Code releases bring a cluster of quality-of-life improvements aimed at developers building on top of Claude Code or running it in automated pipelines. Three stand out as particularly significant for power users.

MCP tool result persistence override

MCP tool results have historically been truncated when they exceed Claude Code's internal buffer size — a problem for tools that return large payloads like database schemas, API specs, or full file trees. The new _meta["anthropic/maxResultSizeChars"] annotation on tool results lets individual MCP servers declare a higher persistence limit (up to 500,000 characters), bypassing the default cap for that result alone. If your MCP server regularly returns large structured payloads, annotate the result and the data will pass through without truncation.

The --bare flag for scripted automation

Running Claude Code in scripts or CI pipelines previously incurred overhead from hooks, the Language Server Protocol sync, plugin sync, and skill directory walks — none of which matter in non-interactive contexts. The new --bare flag skips all of these when combined with -p (print mode), giving you a leaner, faster execution path for scripted claude -p "…" --bare invocations.

--channels permission relay

Unattended Claude Code sessions on remote servers have long faced a problem: when a tool needs user approval, there's no one at the terminal to grant it. The new --channels flag enables channel servers that declare the permission capability to forward tool approval prompts to your phone or another device — turning any networked device into an approval terminal for remote Claude Code sessions.

Other notable additions

Automate approvals safely with --channels

The --channels relay is a significant step toward truly headless autonomous Claude Code deployments. The key safety property to understand: the channel server acts as a relay — approval decisions still happen on your chosen device, not on the server. It is not an auto-approval mechanism; it's a remote approval UI. Pair it with restrictive permission policies (allowlist-only tool permissions, no bash allowed without approval) to keep the autonomy bounded.

Claude Code MCP automation developer tools changelog
Source trust ratings ⭐⭐⭐ Official Anthropic  ·  ⭐⭐ Established press  ·  Community / research