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

Claude Code v2.1.123–v2.1.126: OAuth Fix, Model Gateway Picker & Project Purge

Claude Code v2.1.123–v2.1.126 — visual for 2026-05-02

💡 Claude Code v2.1.123 & v2.1.124: Fixing the OAuth Retry Loop and Ctrl+R History Scope

Two rapid-fire releases patched friction points that had been frustrating teams using Claude Code in locked-down or custom-auth environments. v2.1.123 fixed a bug where OAuth authentication would enter a silent 401 retry loop when CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 was set — common in regulated-environment deployments where experimental features are turned off by policy. v2.1.124 reverted a behavioral change to the Ctrl+R history picker that had inadvertently scoped it to the current project only.

v2.1.123 — OAuth 401 retry loop

If you set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 and use OAuth login (rather than an API key), the auth flow would silently loop on a 401 response instead of surfacing the error. The fix makes the auth client fail fast and show the actual error message, so you can diagnose misconfigured credentials immediately rather than waiting for a timeout.

# To verify auth is working after upgrading:
claude auth status
# Should show your login method and token expiry — not a retry spinner

v2.1.124 — Ctrl+R history picker reverted

A previous update had narrowed the Ctrl+R history search to the current project's sessions only. v2.1.124 restores the pre-change default: Ctrl+R searches all prompts across all projects. Teams with shared prompts or who regularly revisit work from other project directories benefit from the wider scope. If you prefer project-scoped history, there is no per-project setting yet — the full cross-project search is the only option post-v2.1.124.

Cross-project history search tip

With Ctrl+R searching all projects, your most-reused prompts are one keystroke away regardless of which project directory you're working in. Build a personal library of reusable prompt prefixes (e.g., "Refactor this to be testable:", "Write a changelog entry for:") and they'll surface across all contexts.

Claude Code OAuth auth v2.1.123 v2.1.124

💡 Claude Code v2.1.126: /model Picker Reads Your Gateway's Model List + claude project purge

v2.1.126 ships two useful features for teams running Claude Code through a custom gateway or managing large numbers of Claude Code projects with accumulated session data.

/model picker now reads your gateway's /v1/models

When ANTHROPIC_BASE_URL points at an Anthropic-compatible gateway, the /model picker now fetches and lists the models exposed by that gateway's /v1/models endpoint — rather than showing only the hard-coded Claude model list. This means teams using LiteLLM, OpenRouter, or internal routing proxies can switch models inside Claude Code without knowing model ID strings by heart.

# In your shell profile:
export ANTHROPIC_BASE_URL=https://my-internal-gateway.example.com/v1

# Now /model inside Claude Code lists whatever your gateway exposes
# — including fine-tunes, custom aliases, or gated internal variants
Gateway model aliasing

If you run an internal gateway, consider exposing your internal model aliases through /v1/models with descriptive IDs like opus-4-7-eu-data-residency or sonnet-4-6-fips. Claude Code's /model picker will surface these names directly, making the right model selection self-documenting for your team.

claude project purge — reclaim disk space

A new claude project purge command cleans up stale session data for projects that no longer exist or have accumulated large conversation logs. Active Claude Code installations can accumulate gigabytes of session history over months; project purge is the first built-in tool to manage that growth without manually navigating ~/.claude/projects/.

# List projects with their disk usage:
claude project list --size

# Interactively purge a specific project's sessions:
claude project purge my-old-project

# Purge all sessions older than 90 days across all projects:
claude project purge --older-than 90d
Claude Code model gateway project purge v2.1.126 developer tools
Source trust ratings ⭐⭐⭐ Official Anthropic  ·  ⭐⭐ Established press  ·  Community / research