Skip to content
AI Primer
release

Claude Code 2.1.85 releases with conditional hooks and /compact overflow fix

Claude Code 2.1.85 adds hook if filters, new MCP header env vars, transcript timestamps, and fixes for /compact overflow, remote leaks, auth flow, and terminal bugs. Upgrade if your workflow depends on hooks or long sessions, and use the new cloud auto-fix flow for unattended PR cleanup.

3 min read
Claude Code 2.1.85 releases with conditional hooks and /compact overflow fix
Claude Code 2.1.85 releases with conditional hooks and /compact overflow fix

TL;DR

  • Claude Code 2.1.85 adds hook-level if filters, MCP header env vars for multi-server helpers, and transcript timestamps for scheduled tasks, according to the 2.1.85 changelog.
  • The release also fixes several workflow breakers in long or remote sessions, including /compact failing with "context exceeded," a remote-session memory leak, and repeated ECONNRESET retries during edge churn in the release thread.
  • On the product side, Claude Code's cloud session UI now exposes an Auto fix toggle that can "fix CI failures and review comments" while a PR is being followed from web, mobile, or desktop, as shown in the auto-fix screenshot.
  • Early practitioner reaction suggests the web flow is becoming a primary surface for Claude Code usage; one user said "more than 50%" of their usage is now on web and that "permission prompts are a thing of the past" in the web usage post.

What changed in 2.1.85 for CLI and integrations

The engineering payload in 2.1.85 is mostly about making automation less brittle. Anthropic added CLAUDE_CODE_MCP_SERVER_NAME and CLAUDE_CODE_MCP_SERVER_URL to MCP headersHelper scripts so one helper can serve multiple MCP servers, and it added an if field for hooks using permission-rule syntax like Bash(git *); the changelog says that filter is meant to "reduce process spawning overhead" in hook-heavy setups changelog thread. Transcript logs now also mark when /loop and CronCreate tasks fire, which should make unattended runs easier to debug release notes.

The fixes target several failure modes engineers actually hit in long-running sessions. The biggest one is /compact, which previously could fail with "context exceeded" when the compaction request itself no longer fit; 2.1.85 also fixes a memory leak in interrupted remote streaming sessions, step-up MCP OAuth reauthorization when a refresh token exists, and a bug that left some terminals stuck in enhanced keyboard mode after exit 2.1.85 changelog. The same thread notes improved @-mention autocomplete on large repos and a switch from WASM yoga-layout to pure TypeScript for better scroll performance with large transcripts release thread.

What the new cloud Auto fix flow actually adds

Separate from the CLI patch, Claude Code's cloud session flow now has an Auto fix toggle for PR-following sessions. The UI text in the product screenshot says it can "Proactively fix CI failures and review comments" and may post comments on the user's behalf, while Auto merge remains a separate control. A supporting post says the feature is already available across web, mobile, and desktop sessions launch screenshot.

That matters because practitioners are increasingly treating the hosted surface as more than a companion app. One user wrote that "more than 50%" of their Claude Code usage is now on the web and framed the shift as a productivity gain, with thread context claiming "Permission prompts are a thing of the past" for that workflow practitioner report. Taken together, today's changes point in the same direction: less local babysitting, more background PR maintenance, and fewer session-management failures when runs get long 2.1.85 changelog.

Share on X