Claude Code v2.1.87 — 2 New Environment Variables: OAuth Console and Trusted Devices#
Published on March 30, 2026
Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog
Claude Code v2.1.87 adds 2 new environment variables while removing the 2 MCP server helper variables that debuted in v2.1.85. The net count stays flat at 202 env vars, but the swap tells a story: MCP multiplexing may be moving to a different mechanism, while OAuth customization picks up its fourth variable in three releases and a new device trust primitive appears.
What Changed#
| v2.1.85 | v2.1.87 | |
|---|---|---|
| Environment variables | 202 | 202 (0 net, +2/-2) |
| Model IDs | 16 | 16 |
| Dynamic configs | 29 | 29 |
| Slash commands | 22 | 22 |
| Binary size | 187.02 MB | 187.52 MB (+0.50 MB) |
New Environment Variables#
| Variable | Likely Purpose |
|---|---|
CLAUDE_LOCAL_OAUTH_CONSOLE_BASE | Overrides the base URL for the OAuth console interface. This is the third piece of the local OAuth override triptych: CLAUDE_LOCAL_OAUTH_API_BASE handles token exchanges, CLAUDE_LOCAL_OAUTH_APPS_BASE handles app registration, and now CLAUDE_LOCAL_OAUTH_CONSOLE_BASE handles the console/management UI. Enterprise deployments running their own identity infrastructure can now redirect every component of the OAuth flow — API, app registry, and admin console — to internal servers without any traffic touching Anthropic's endpoints. |
CLAUDE_TRUSTED_DEVICE_TOKEN | Stores a token that marks the current device as trusted, likely enabling persistent authentication sessions without repeated re-authorization. This is the "remember this device" pattern used by banking apps and enterprise SSO: after an initial MFA or full auth flow, the device receives a long-lived token that lets subsequent sessions skip the interactive login. For developers who run Claude Code across multiple terminals, tmux sessions, or CI runners on the same machine, this could eliminate the friction of re-authenticating after token expiry. |
Removed Environment Variables#
| Variable | Notes |
|---|---|
CLAUDE_CODE_MCP_SERVER_NAME | Added in v2.1.85 to identify which MCP server a helper process was acting on behalf of. Removed after just two versions. The multiplexed helper pattern may have been pulled back for rework, or the functionality may now be handled through a different mechanism — possibly integrated into the MCP config format itself rather than exposed as env vars. |
CLAUDE_CODE_MCP_SERVER_URL | The companion to MCP_SERVER_NAME, providing the server endpoint URL. Also removed. Together these formed a pair for routing MCP requests through a single helper process. Their removal doesn't necessarily mean the feature is gone — it may have been internalized so that headersHelper scripts receive server identity through a different channel (e.g., command-line arguments or the MCP protocol itself). |
Key Changes in v2.1.87#
The official changelog for v2.1.87 lists one fix:
- Cowork Dispatch delivery fix — messages in Cowork Dispatch were not getting delivered, now fixed. This is the multi-agent coordination mode where Claude Code spawns sub-agents that work in parallel; messages between them were silently failing to route.
Separately, Dispatch can now start coding tasks with specific models — tell it which model to use in natural language. As team member Noah Zweben noted on X: "We want to keep making Dispatch the most useful place to delegate Cowork and Code tasks."
Binary analysis also surfaces an interactive OAuth client secret prompt (Enter OAuth client secret:) for the first time. Combined with the three CLAUDE_LOCAL_OAUTH_* endpoint overrides, enterprises can now configure the full auth flow interactively — not just through env vars.
A new autocompact warning also appears: "Without autocompact, you will hit context limits and lose the conversation. Enable it in /config or use /compact manually." Previously autocompact was silent infrastructure — now Claude Code actively warns users who have it disabled. A companion message ("Autocompact will trigger soon, which discards older messages. Use /compact now to control what gets kept") gives a heads-up before it fires, letting you run /compact manually to control what's preserved.
Coming in the next release: vim mode gj/gk support for visual line movement (navigating within wrapped lines rather than between physical lines). Confirmed by Boris Cherny on Threads in response to a community request — expected in v2.1.88.
From the Team: Boris Cherny's 15 Hidden Features Thread#
Boris Cherny dropped a massive thread on X (14.7K likes) covering underrated Claude Code features. The highlights worth knowing:
- Mobile app — full Claude Code from iOS. Boris says he writes "a lot of my code from the iOS app."
- Teleport — move sessions between mobile/web/desktop and terminal with
claude --teleportor/teleport. Control a local session from your phone with/remote-control. /loopand/schedule— schedule Claude to run automatically at set intervals, up to a week. Use cases: auto-address code review comments, auto-rebase, PR shepherding.- Hooks — deterministic logic in the agent lifecycle: dynamically load context (
SessionStart), log bash commands (PreToolUse), route permission prompts to WhatsApp (PermissionRequest), or poke Claude to keep going (Stop). - Chrome extension — give Claude a way to verify frontend output so it iterates until the result is right.
/branch— fork your session. Also available viaclaude --resume <session-id> --fork-session./btw— side queries while the agent works. Boris: "I use this all the time."- Git worktrees —
claude -wstarts a session in a worktree. Non-git VCS users can use theWorktreeCreatehook. /batch— fan out work to dozens or hundreds of worktree agents for large code migrations.--bare— speeds up SDK startup by up to 10x. Boris confirmed this will become the default in a future version: "This was a design oversight when we first built the SDK."--add-dir— let Claude see another repo. Or addadditionalDirectoriesto your team'ssettings.json.--agent— define custom agents in.claude/agents, then runclaude --agent=<name>./voice— Boris: "I do most of my coding by speaking to Claude, rather than typing."
What These Tell Us#
OAuth customization is accelerating. Four auth-related env vars across three releases (v2.1.84–v2.1.87) — CLAUDE_AI_ORIGIN, CLAUDE_LOCAL_OAUTH_API_BASE, CLAUDE_LOCAL_OAUTH_APPS_BASE, and now CLAUDE_LOCAL_OAUTH_CONSOLE_BASE — paint a clear picture: Anthropic is decomposing Claude Code's auth stack into independently overridable components. The addition of CLAUDE_TRUSTED_DEVICE_TOKEN adds a stateful layer on top, enabling device-level trust that persists across sessions. Together, these variables let an enterprise run Claude Code's entire auth flow — login UI, token exchange, app registry, admin console, and device trust — against their own infrastructure. This is the groundwork for full corporate SSO integration where Claude Code never contacts Anthropic's auth servers.
MCP server env vars had a short life. The removal of CLAUDE_CODE_MCP_SERVER_NAME and CLAUDE_CODE_MCP_SERVER_URL just two versions after they appeared is notable. One interpretation: the env-var-based approach for MCP multiplexing was too coarse (env vars are set per-process, making it awkward to multiplex within a single process). A more likely mechanism would be passing server identity through the MCP protocol itself — the Streamable HTTP transport already supports request-level routing via URL paths. The underlying goal of reducing per-server process overhead likely remains; the implementation path is being refined.
Dispatch is becoming the orchestration layer. The Cowork Dispatch fix plus the new model-selection capability signal that Dispatch is being positioned as the primary interface for delegating parallel work. Fixing message delivery reliability in a multi-agent system is the kind of unglamorous-but-critical work that precedes heavier investment.
The SDK's --bare default flip is coming. Boris calling the current default "a design oversight" is unusually direct. This signals a breaking change in a future version — SDK consumers should start adding --bare now to avoid surprises when the default flips.
This analysis is conducted for independent security research and interoperability purposes under fair use principles. All trademarks belong to their respective owners. The information presented here documents publicly observable behavior of installed software and is not intended to circumvent any technological protection measures, infringe on intellectual property rights, or encourage unauthorized use. Use these findings at your own discretion.
Related Versions#
- Claude Code v2.1.85 — 6 New Environment Variables — MCP server config, WASM-to-TypeScript layout engine swap
- Claude Code v2.1.84 — 6 New Environment Variables — idle management, PowerShell tool, Bedrock parity
- Claude Code v2.1.83 — 8 New Environment Variables — managed-settings.d/, transcript search, 40+ fixes
- Claude Code v2.1.81 — 1 New Environment Variable —
--bareflag, concurrent OAuth fix - Claude Code v2.1.80 — Channels, Plugin Simplification, and a Bug Fix Sprint —
--channelsresearch preview
Related: Context Window Management Guide | Claude Code Productivity Tips | The Agentic Engineering Playbook