News

Claude Code v2.1.126 (May 1, 2026): claude project purge, gateway-aware /model, OAuth paste login, managed-sandbox security fix

Claude Code v2.1.126 adds claude project purge to delete local state, lists gateway /v1/models in /model when using ANTHROPIC_BASE_URL, lets claude auth login accept pasted OAuth codes for SSH/WSL/containers, expands dangerously-skip-permissions for protected paths, and ships a managed-sandbox security fix.

By AI Coding Tools Directory2026-05-025 min read
Last reviewed: 2026-05-02
ACTD
AI Coding Tools Directory

Editorial Team

The AI Coding Tools Directory editorial team researches and reviews AI-powered development tools to help developers find the best solutions for their workflows.

Claude shipped Claude Code v2.1.126 on May 1, 2026. It’s a wide "hardening" release, but a few changes are especially relevant if you run Claude Code inside enterprise environments, remote dev setups, or AI gateways.

Claude Code logo
Claude CodeSubscription

Anthropic's terminal-based AI coding agent with Claude Opus 4.7, /ultrareview, Routines, /ultraplan, and 80.9% SWE-bench

TL;DR

  • claude project purge [path]: delete all local Claude Code state for a project (transcripts, tasks, file history, config entry).
  • Gateway-aware /model: when ANTHROPIC_BASE_URL points at an Anthropic-compatible gateway, /model lists models from that gateway’s /v1/models.
  • OAuth paste login: claude auth login now accepts the OAuth code pasted into the terminal when the browser callback can’t reach localhost (SSH, WSL2, containers).
  • Permissions bypass expansion: --dangerously-skip-permissions now bypasses prompts for writes to .claude/, .git/, .vscode/, shell config files, and other previously-protected paths (catastrophic removal commands still prompt).
  • Security fix: fixed allowManagedDomainsOnly / allowManagedReadPathsOnly potentially being ignored in a managed-settings precedence edge case.

Quick Answer

If you only read one line: v2.1.126 makes Claude Code login and recovery more reliable in real-world dev environments (SSH/WSL/containers, laptops that sleep mid-request), and adds a first-class “reset this project” command via claude project purge.

To update, run claude update.

What Shipped in v2.1.126 (high-signal items)

Change Why it matters
claude project purge [path] Reset a project cleanly by deleting transcripts, tasks, file history, and config entry — useful when you want a fresh start or need to remove local state.
/model reads gateway /v1/models If you route Claude Code through an Anthropic-compatible gateway via ANTHROPIC_BASE_URL, you can now discover the gateway’s model list directly in the picker.
OAuth code paste support Fixes a common failure mode when localhost callbacks don’t work (SSH, WSL2, containers).
Expanded --dangerously-skip-permissions Removes more “are you sure?” prompts for writes to protected paths; useful for automation, but increases blast radius if misused.
Managed-sandbox policy enforcement fix Important for enterprise policy controls that restrict where the tool can read and what domains it can contact.

claude project purge: delete project state

claude project purge [path] is the new "reset" command. It deletes all Claude Code state for a given project — including transcripts, tasks, file history, and the related config entry — and supports --dry-run, -y/--yes, -i/--interactive, and --all.

This is helpful if:

  • you want to restart work without carrying over prior transcripts,
  • you have a project whose state has become confusing,
  • you’re cleaning up local traces on shared machines.

Gateway-aware /model (via ANTHROPIC_BASE_URL)

Many teams run Claude Code through a gateway for logging, routing, or unified credentials. In v2.1.126, the /model picker can now list models from your gateway’s /v1/models endpoint when ANTHROPIC_BASE_URL is set to an Anthropic-compatible gateway.

OAuth login works in SSH/WSL/containers

OAuth login issues are a frequent onboarding blocker in remote environments. v2.1.126 adds a practical fallback: claude auth login can accept the OAuth code pasted into the terminal when the browser callback can’t reach localhost (explicitly called out for WSL2, SSH, and containers).

Permissions bypass got broader

This version expands what --dangerously-skip-permissions bypasses: prompts for writes to .claude/, .git/, .vscode/, shell config files, and other previously-protected paths are now skipped.

That can reduce friction for power users, but it’s also a reminder to treat this flag as “automation-grade” and keep it out of untrusted sessions.

Security fix: managed sandbox enforcement edge case

Anthropic notes a security fix: allowManagedDomainsOnly / allowManagedReadPathsOnly could be ignored if a higher-priority managed-settings source lacked a sandbox block. v2.1.126 fixes that precedence edge case.

Sources

Free Resource

2026 AI Coding Tools Comparison Chart

Side-by-side comparison of features, pricing, and capabilities for every major AI coding tool.

No spam, unsubscribe anytime.

Frequently Asked Questions

What is the biggest new command in Claude Code 2.1.126?
claude project purge [path]. It deletes all local Claude Code state for a project (transcripts, tasks, file history, and config entry) so you can reset a project cleanly.
What changed about OAuth login?
claude auth login can now accept the OAuth code pasted into the terminal when the browser callback cannot reach localhost (common in SSH, WSL2, and containers).
Is there a security fix in this release?
Yes. v2.1.126 fixes a case where allowManagedDomainsOnly / allowManagedReadPathsOnly could be ignored if a higher-priority managed settings source was missing a sandbox block.