🧭 Claude Code v2.1.225: Gateway Spend-Limit Messages, Remote Control by Name, and Nine Bug Fixes
Two Claude Code releases landed early on August 8: v2.1.225 (01:09 UTC) with a full set of new features and fixes, and v2.1.226 (02:48 UTC) with reliability improvements. The most developer-visible changes in v2.1.225 are richer gateway spend-limit feedback, a name-based discovery upgrade to SendMessage, and a significant sweep of OAuth and session-stability bug fixes.
Gateway spend-limit messages now name the cap
When a user or session hits a gateway-defined spend limit, Claude Code's usage warning previously gave a generic "limit reached" notice. As of v2.1.225, the message now surfaces three pieces of information the gateway operator controls:
- The cap amount (e.g. "$50 monthly")
- The reset time (e.g. "resets September 1")
- The operator's custom message (e.g. "Contact your team admin to request an increase")
What this means for operators
If your organisation runs Claude Code behind a gateway with spend controls — common in enterprise deployments where teams have per-user or per-project budgets — you can now write a message that appears verbatim to users when they hit the cap. Use this to direct users to your internal request workflow rather than leaving them confused. The gateway must be on v2.1.225 or later for the enhanced message to be passed through.
SendMessage can now address Remote Control sessions by name
Cross-session SendMessage previously required you to already be in a two-way conversation with a Remote Control session before you could send it a message. In v2.1.225, ListAgents now surfaces Remote Control sessions on other machines in the format name [ref], and SendMessage can open a conversation with them by that name — no prior exchange needed.
# Discover all reachable sessions (including Remote Control on other machines)
ListAgents()
# → local-session-1, laptop-main [ref], desktop-work [ref]
# Start a conversation with a Remote Control session by name
SendMessage(
to: "desktop-work",
content: "Run the full test suite and report back"
)
This makes coordinator-worker patterns more robust: a headless coordinator can target named workers without needing them to initiate contact first.
Workspace trust prompt added to claude agents
Launching claude agents in an untrusted directory now shows the same workspace trust prompt that claude itself shows. Previously, the agents subcommand skipped the trust check, meaning an untrusted directory could spin up agent sessions without the user explicitly accepting trust for that workspace.
Bug fixes worth knowing
- MCP OAuth on macOS 401 burst: A keychain read timeout could cause MCP OAuth servers to fire a burst of 401 errors in rapid succession. Fixed — the retry now backs off correctly.
- Long-lived CLAUDE_CODE_OAUTH_TOKEN 401: Replacing a long-lived
CLAUDE_CODE_OAUTH_TOKEN with a stored login's short-lived token caused transient 401s that would break headless sessions until restart. Fixed.
- Auto mode + safety-filter refusals: If auto mode's own permission check was refused by a safety filter, that refusal was incorrectly counted toward the consecutive-block limit, which could stall the session. Fixed.
- Cross-session message parking: Messages sent to headless sessions during startup were silently parked with no notice and no expiry. They now surface correctly.
- Remote Control conversation history: After a very large conversation was compacted, resuming a Remote Control session could corrupt the conversation history. Fixed.
- Agents list hover side-effect: Hovering over a session in another project in the agents panel was changing the directory the next local agent would start in. Fixed.
- self-hosted-runner with unwriteable base-dir:
claude self-hosted-runner would register successfully and then fail every session if --base-dir could not be created or written. It now reports the error upfront.
- VSCode Focus view: The Focus view was folding away the latest to-do list, pending questions' context, and settled answers. Thinking-only folds now show "Thought for Ns" and re-collapse correctly when the turn completes.
- Web sessions reconnect storm: Claude Code on the web was misreporting sessions as stuck and re-sending a growing event backlog on every reconnect. Fixed.
Claude Code
2.1.225
gateway spend limits
SendMessage
Remote Control
MCP OAuth
workspace trust
bug fixes
🧭 Claude Managed Agents Gets Session Budgets, Advisor Models, Inference Geo-Routing, and GitHub-Sourced Skills
The August 7 platform release notes added four substantial capabilities to Claude Managed Agents that collectively give enterprise operators much finer control over cost, quality, compliance, and skill management for agentic deployments.
Session budgets: hard spend caps with a clean stop reason
You can now set a budget on any Claude Managed Agents session — a hard cap on the session's spend, priced at public list rates. When a session reaches its budget, it pauses with stop_reason: "budget_reached" instead of continuing to accrue costs. Removing or raising the budget immediately resumes the session. Deployments can carry a default budget that is applied to every session they start.
# Creating a session with a spend budget
POST /v1/sessions
{
"agent_id": "ag_...",
"budget": {
"amount": 5.00,
"currency": "usd"
}
}
# Resuming a paused session by clearing the budget
PATCH /v1/sessions/{session_id}
{ "budget": null }
How to handle budget_reached in your code
Poll or stream session events for session.stopped with stop_reason: "budget_reached". At that point your application can notify the user, log the overage, escalate for approval, or programmatically increase the budget. Unlike a hard API error, the session state is fully preserved — context, tool state, and memory — so resumption is seamless after the budget is adjusted.
Advisor model: consult a smarter model mid-turn
You can now give any Managed Agents session an advisor: a second model (which must be at least as capable as the primary agent's model) that the primary thread can consult mid-turn for strategic guidance. Configure it in the agent's multiagent roster:
# Agent definition with an advisor
{
"model": { "id": "claude-sonnet-5" },
"multiagent": {
"roster": [
{
"type": "advisor",
"model": "claude-opus-5"
}
]
}
}
The advisor pattern is designed for deployments where a lower-cost model handles the bulk of execution but needs occasional high-capability reasoning for decision points — for example, a Sonnet 5 agent that consults Opus 5 only when it encounters ambiguous requirements. The primary thread makes the advisor call explicitly; the advisor does not act autonomously.
Inference geo-routing: pin model inference to a specific region
Enterprise operators with data-residency requirements can now control where model inference physically runs for a Managed Agents agent. Set inference_geo inside the model object when creating the agent, or override it on a per-session basis:
# Creating an agent pinned to EU inference
POST /v1/agents
{
"model": {
"id": "claude-fable-5",
"inference_geo": "eu"
},
...
}
# Overriding per-session (e.g. for a specific customer's data)
POST /v1/sessions
{
"agent_id": "ag_...",
"agent": {
"type": "agent_with_overrides",
"model": { "inference_geo": "us" }
}
}
GDPR and data-sovereignty implications
For operators subject to GDPR, HIPAA, or national data-sovereignty rules, inference_geo is the recommended mechanism to ensure that prompt and response content does not leave a specified geographic boundary during inference. The available regions and their pricing differentials are listed in the Data residency documentation. Note that inference_geo controls inference location only — data retention and storage policies are governed separately.
Skills now loadable from GitHub repositories
When a Managed Agents session mounts a GitHub repository (via the existing repository mounting feature), Claude now automatically discovers any skills in the repository's root .claude/skills directory at session start — without requiring the operator to enumerate them in the agent configuration. Skills become available to the agent for that session only.
This enables a workflow where skills live alongside the code they support: a repository for a product can carry its own .claude/skills/ directory, and any agent session working on that repo automatically gains those skills without manual wiring in the agent definition.
Managed Agents
session budget
budget_reached
advisor model
inference geo
data residency
GitHub skills
enterprise
🧭 Three Cost-Control Layers for Agentic Deployments — and When to Use Each
With today's Claude Code and Managed Agents releases, there are now three distinct mechanisms for controlling spending in agentic deployments. They sit at different layers and serve different purposes — understanding which to apply where can prevent both unexpected bills and unnecessary friction for users.
Layer 1: Effort level (model-level)
The effort parameter controls how much reasoning the model applies per request. Lower effort means less thinking, faster responses, and lower token costs. Set it in the agent's model config:
{ "model": { "id": "claude-opus-5", "effort": "medium" } }
Best for: Workloads where you know most tasks don't need maximum reasoning (e.g. extraction, summarisation, routing). This is a quality-vs-cost trade-off, not a hard spend cap.
Layer 2: Gateway spend limit (Claude Code — operator layer)
Operators running Claude Code behind a gateway can set per-user or per-team spend limits that surface in Claude Code's UI. As of v2.1.225, when a user hits the limit they now see the cap amount, reset time, and a custom operator message. This is the right layer for human-interactive Claude Code usage where you want to give users visibility into their budget and route them to your internal request workflow.
Layer 3: Session budget (Managed Agents — session layer)
The new budget field on Managed Agents sessions sets a hard spend cap that triggers stop_reason: "budget_reached" when reached. This is designed for automated / agentic workflows where there is no interactive user to warn — you need the session to stop cleanly and preserve state so your application can decide what to do next.
Recommended layering for enterprise deployments
- Use effort level on the agent definition to set a cost/quality baseline appropriate for the typical task.
- Use session budget on every production Managed Agents session as a safety backstop — set it conservatively at first and raise it based on observed usage patterns.
- Use gateway spend limits for your human-facing Claude Code rollout to give employees budget visibility and drive them to your internal approval process.
These three controls compose cleanly: a session can have low effort (cheap per-turn), a session budget (total cap), and the operator's gateway enforcing a separate per-user monthly ceiling — all three active simultaneously with no conflicts.
cost control
session budget
effort level
gateway spend limit
Managed Agents
Claude Code
enterprise
best practices