Skip to content

Claude Code v2.1.225: Gateway spend limits, headless auth fixes

Claude Code v2.1.225 adds gateway spend-limit warnings and patches six bugs including 401 storms that broke headless and MCP OAuth sessions.

Claude Code v2.1.225 adds gateway spend-limit warnings and fixes six bugs — including two that silently killed headless sessions with 401 storms.

The release adds one feature and patches six issues:

  • Gateway spend-limit support — usage warnings now name the cap, reset time, and operator message (requires gateway on v2.1.225)
  • Workspace trust prompt — claude agents now prompts for untrusted directories, matching claude behavior
  • Transient 401 fix — long-lived CLAUDE_CODE_OAUTH_TOKEN was being replaced by a stored login’s short-lived token, breaking headless sessions until restart
  • MCP OAuth on macOS — burst of 401 errors after keychain read timeout fixed
  • Auto mode safety-filter — refusals from the model’s own permission check no longer count toward the consecutive-block limit; action still denied, model told to move on
  • Cross-session messages — parked messages in headless sessions and during startup now have notice and expiry
  • Conversation history — no longer breaks on Remote Control session resume after very large conversations

The auth fixes matter most for anyone running Claude Code in CI or headless mode. The CLAUDE_CODE_OAUTH_TOKEN bug silently swapped a long-lived token for a short-lived one, killing automated sessions until manual restart. The macOS keychain timeout produced the same symptom — 401 storms that looked like the server never authenticated.

The auto mode fix is subtler. When the safety filter refused the model’s own permission check, that refusal counted toward the consecutive-block limit — meaning the model could exhaust its retry budget on a denial it caused itself. The action is still denied, but the model now gets told to move on instead of burning retries.

NOTE

The gateway spend-limit feature requires the gateway itself running v2.1.225. Older gateways won’t surface the cap, reset time, or operator message in the warning.

Available now in Claude Code v2.1.225. If you run headless sessions, update — the 401 fixes alone justify it.