Claude Code 2.1.126: Gateway Models, Project Purge, OAuth Fixes
Claude Code 2.1.126 brings gateway model listing, a new project purge command, and fixes for OAuth login in WSL2/SSH/containers. Major stability improvements for stream timeouts, image handling, and Windows shell detection.
TL;DR
- Model picker now pulls from gateway endpoints when using Anthropic-compatible gateways
- New
claude project purgecommand to nuke all project state in one go - OAuth login now works in WSL2, SSH, containers, and slow connections
- Major fixes for permissions, image handling, stream timeouts, and Windows shell detection
New
- Gateway model listing — `/model` picker now reads from your gateway's `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway
claude project purge— Delete all Claude Code state for a project (transcripts, tasks, file history, config) with `--dry-run`, `-y/--yes`, `-i/--interactive`, and `--all` flags- OAuth code paste fallback — `claude auth login` now accepts OAuth codes pasted into the terminal when browser callback can't reach localhost (fixes WSL2, SSH, container auth)
- Slash command telemetry — `claude_code.skill_activated` OpenTelemetry event now fires for user-typed slash commands with new `invocation_trigger` attribute
- Permission bypass flag — `--dangerously-skip-permissions` now bypasses prompts for writes to `.claude/`, `.git/`, `.vscode/`, and shell config files (catastrophic commands still prompt)
- Windows PowerShell detection — Now detects PowerShell 7 from Microsoft Store, MSI without PATH, and .NET global tool; treats PowerShell as primary shell when enabled
- Permission stall indicator — Auto mode spinner turns red when a permission check stalls instead of appearing to run normally
Fixed
- OAuth login timeout on slow/proxied connections, IPv6-only devcontainers, and localhost-unreachable scenarios
- Image paste breaking sessions when larger than 2000px — now auto-downscales on paste and removes oversized images from history
- Login screen showing for "OAuth not allowed for organization" errors — now displays admin contact guidance
- Rare race condition where concurrent credential writes could clear valid OAuth refresh tokens
- API retry countdown stuck at "0s" instead of counting between attempts
- "Stream idle timeout" error after waking Mac from sleep mid-request
- Background and remote sessions falsely aborting with "Stream idle timeout" during long model thinking pauses
- Assistant finishing thinking but showing no output after empty turns
- Overly fast trackpad scrolling in Cursor and VS Code 1.92–1.104 integrated terminals
- Claude.ai MCP connectors suppressed by manual servers stuck in needs-auth state
- Japanese/Korean/Chinese text rendering as garbled on Windows in no-flicker mode
Ctrl+Lclearing prompt input — now only forces screen redraw per readline behavior- Deferred tools (WebSearch, WebFetch) unavailable to skills with `context: fork` on first turn
- Plan-mode tools unavailable in interactive sessions launched with `--channels`
- Blank remote-session transcripts when certain messaging tools unavailable
/pluginUninstall reporting "Enabled" instead of "Uninstalled"/remote-controlretries appearing stuck on "connecting…" — each retry now shows result- Remote Control failure notifications not showing error reason for initial connection failures
- Windows clipboard writes exposing copied content in process command-line arguments visible to EDR/SIEM; also fixes >22KB selections not reaching clipboard
- PowerShell tool mis-flagging bare `--` as `--%` stop-parsing token
- Agent SDK hang when model emits malformed tool name in parallel tool call batch
- Read tool malware-assessment reminder causing spurious refusals on legacy models
- Security: `allowManagedDomainsOnly` / `allowManagedReadPathsOnly` being ignored when higher-priority managed-settings source lacked `sandbox` block
- Host-managed deployments auto-disabling analytics on Bedrock/Vertex/Foundry
Update: npm install -g @anthropic-ai/claude-code or check your IDE's extension marketplace for the latest version.
Source: Claude Code