Claude Code 2.1.177 Changelog: MCP Hang, CLAUDE_CODE_OAUTH_TOKEN Bug, Slash Parser Regression

Claude Code 2.1.177 changelog: stdio MCP calls hang when claude -p loads a full fleet, CLAUDE_CODE_OAUTH_TOKEN is shadowed by stale on-disk credentials causing 401s, /compact is forwarded as plain text, and the Windows build cannot launch. Fleet pin and fix guide.

TheRouter Newsroomvia anthropics/claude-code GitHub issues
Editorial illustration of Claude Code 2.1.177 changelog with four regression branches — headless MCP hang under claude -p, CLAUDE_CODE_OAUTH_TOKEN shadowed by credentials file, slash-command bypass, Windows launch failure — converging on operator fleet pin decisions

Claude Code shipped v2.1.177 on June 13, 2026 at 01:25 UTC with an empty release body and the standard auto-update fan-out. Within 48 hours, four separate Claude Code 2.1.177 regression issues with reproducible repros and regression labels were filed against the anthropics/claude-code repo — and every one of them lands on a code path operators rely on: headless MCP, OAuth credentials, slash-command interception, and the Windows binary itself.

This is the operator post-mortem and the fleet response that routing and platform teams need to make today.

What's broken in Claude Code 2.1.177

Four distinct regressions are confirmed by upstream-labeled GitHub issues since 2026-06-13:

  • #68375 — stdio MCP tool calls hang under claude -p. When the full MCP fleet is loaded (≈10+ servers, mixed stdio + http/sse), a single local stdio tool call wedges. Connection handshake succeeds; the tool call never returns and only ends when claude is killed. Workaround: relaunch with --strict-mcp-config --mcp-config <minimal> to load only the needed server. Reduces tool latency from "hung" to ~5s. Labels: bug, has repro, area:mcp, regression.
  • #68241 — CLAUDE_CODE_OAUTH_TOKEN shadowed by stale ~/.claude/.credentials.json. Precedence reversed: in 2.1.177 the on-disk credential file wins over the environment variable. If the file holds an expired access token whose single-use refresh token was already consumed, Claude 401s and drops to /login instead of falling back to the still-valid env-var token. Renaming or emptying the file restores the env token. Labels: bug, area:auth, regression.
  • #68170 — /compact and other slash commands sent as plain text. The leading-/ slash parser fails on 2.1.177 native installer (macOS confirmed). /compact is delivered to the model as ordinary prose rather than triggering context compaction. Reproduces in both local terminal and Remote Control mobile sessions. Last working: 2.1.173. Labels: bug, area:tui, area:core, regression.
  • #68504 — Windows binary refuses to launch. Update from 2.1.174 → 2.1.177 yields the Windows "not compatible with this version of Windows" error on claude.exe. Both claude and claude update are unreachable; downgrade requires a manual npm install of a pinned older version. Labels: bug, platform:windows, area:packaging, regression.

The official claude code 2.1.177 release notes were published as an empty GitHub Release body — there is no upstream changelog entry yet on main/CHANGELOG.md, which still ends at 2.1.176. That's part of what makes triage harder: there's no shipped diff summary to scope what changed.

Why every one of these regressions matters for operator fleets

These aren't cosmetic bugs. Each one lives on a path that operator and routing teams depend on for production automation:

  • Headless claude -p is the automation backbone. It's what CI workers, scheduled cron jobs, gateway-side evaluators, and self-hosted runners use to call Claude programmatically. Any regression that makes stdio MCP tool calls hang silently until the outer wall-clock timeout fires is not a "tool latency issue" — it's a queue-pileup risk. Headless workers consume seats and capacity for the full timeout instead of finishing in ~5s.
  • The CLAUDE_CODE_OAUTH_TOKEN precedence reversal is a credential governance break. Containerized and headless deployments specifically inject the OAuth token via env var precisely so that no file is needed. If a prior session inside the container wrote .credentials.json to a mounted ~/.claude, that file now silently overrides the injected token on the next run. Operators rotating tokens via env redeploy will see auth failures even though the freshly-rotated token is valid.
  • Slash-command parsing is the basis of every interactive operator workflow. /compact, /cd, /model, /usage, /agents — all the operator-facing controls travel through the leading-/ parser. When the parser is bypassed, the model receives the slash command as a chat prompt and either tries to "interpret" it or refuses. Remote Control mobile sessions are especially exposed because they're how operators inspect background agents away from the desktop.
  • Windows packaging breakage disables an entire OS-class of operator workstations until rollback or a 2.1.178 hotfix ships.

The cross-cutting pattern: claude code 2.1.177 regression impact concentrates on the unattended and remote paths — headless, containerized, mobile — that operators built tooling around in the last two release cycles.

The router and operator angle

Because 2.1.177 ships as an auto-update via the native installer, every operator-managed fleet has already absorbed the regression by default. The mitigation playbook routing teams should ship today:

  1. Pin Claude Code on 2.1.176 for all fleet-managed installs. Use the managed settings requiredMinimumVersion and pair it with disableAutoUpdate: true on container images and CI runners. 2.1.176 contains the availableModels env-var bypass closure and the Bedrock awsCredentialExport caching fix — both already operator-relevant — without the four 2.1.177 regressions.
  2. For containers that must stay on 2.1.177, normalize headless launches. Wrap every claude -p automation call with --strict-mcp-config --mcp-config <minimal> and a per-job MCP allowlist scoped to only the servers that specific job needs. This bypasses the #68375 fleet-hang code path until upstream fixes it.
  3. Audit OAuth credential precedence in container base images. Before redeploying 2.1.177 containers, ensure ~/.claude/.credentials.json is either absent or explicitly emptied (echo '{}' > ~/.claude/.credentials.json) so the injected CLAUDE_CODE_OAUTH_TOKEN is consulted. Add a build-step assertion that the file is empty after image build. Don't trust env-var precedence on 2.1.177.
  4. Document the slash-parser regression in operator runbooks. Any cookbook step that says "type /compact to reduce context" is now broken on 2.1.177. Until fixed, operators should fall back to closing and resuming the session, or downgrading to 2.1.173.
  5. Hold the Windows fleet on 2.1.174 or 2.1.176. npm install -g @anthropic-ai/claude-code@2.1.176 to roll back, and add an internal-gateway block on auto-update prompts for Windows machines.
  6. Wire /usage per-skill and per-MCP attribution into your gateway dashboard — visibility into which MCP servers each session loads makes it easier to spot when #68375 is biting a particular pipeline. See our Claude Code usage attribution playbook for the field-level mapping.

The macro-level routing implication: a single bad release can compromise four independent operator code paths at once. Treat Claude Code version pinning as a first-class part of your fleet governance layer, not a developer-machine convenience. The 2.1.175 enforceAvailableModels framework already gave operators the primitive for hard version constraints — 2.1.177 is the day to actually use it.

What TheRouter users should monitor next

  • Watch for v2.1.178. Given the breadth and severity of confirmed regressions (#68170, #68241, #68375, #68504 all labeled regression upstream), a hotfix is the most likely response. Resume auto-update only after verifying the changelog explicitly lists fixes for each. The Claude Code releases page is the source of truth.
  • Inspect your background-session base images. Any image built and pushed in the last 36 hours probably bakes in 2.1.177. Rebuild with the explicit version pin and re-run end-to-end smoke tests for headless MCP, slash commands, and OAuth credentials.
  • Review your routing-gateway model migration plan. If you'd planned to migrate to Claude Fable 5 this week using claude -p headless workers as the migration runner, that pipeline is currently degraded on 2.1.177. The pin to 2.1.176 also keeps the Fable 5 tokenizer 30% inflation audit workflow intact.

For operators, the lesson is mundane and important: the day after a Claude Code release is the time to validate, not deploy. Build a 24-hour soak window into your fleet-rollout policy before promoting any minor-version bump from staging to production-managed installs. TheRouter's routing-layer abstractions are tier-aware for exactly this reason — let your gateway absorb the per-version risk before your developer fleet does.

Help & contact