What Changed — The Specific Update
Claude Code v2.1.85, released this week, delivers 25+ improvements focused on stability, performance, and enterprise integration. This follows a week where Claude Code appeared in 162 articles across our coverage, showing intense developer interest in the tool's evolution.
The most significant changes include:
- Fixed
/compactfailures when conversations grow too large for the compact request itself - Conditional
iffields for hooks using permission rule syntax (e.g.,Bash(git *)) - PreToolUse hooks can now satisfy
AskUserQuestionby returningupdatedInputalongsidepermissionDecision: "allow" - MCP server environment variables (
CLAUDE_CODE_MCP_SERVER_NAME,CLAUDE_CODE_MCP_SERVER_URL) forheadersHelperscripts - Deep link query support extended to 5,000 characters with scroll warnings
What It Means For Your Daily Workflow
/compact Now Works on Massive Conversations
Previously, /compact could fail with "context exceeded" when the conversation had grown so large that even the compact request couldn't fit in the context window. This was particularly frustrating for long-running sessions where compaction is most needed. Now, Claude Code handles this edge case gracefully, ensuring your longest sessions remain manageable.
Conditional Hooks Reduce Process Overhead
The new conditional if field for hooks lets you filter when they run using permission rule syntax. Instead of spawning processes for every hook invocation, you can now write:
{
"hooks": [
{
"type": "PreToolUse",
"if": "Bash(git commit *)",
"script": "./scripts/validate-commit.sh"
}
]
}
This hook only runs for git commit commands, not every Bash command. For teams using complex hook systems, this can significantly reduce system load.
Headless Integrations Get Superpowers
PreToolUse hooks can now programmatically answer AskUserQuestion prompts by returning:
{
"permissionDecision": "allow",
"updatedInput": "user's answer here"
}
This enables headless CI/CD pipelines and automation systems to interact with Claude Code without manual intervention. Your integration can now:
- Detect when Claude asks a question
- Programmatically determine the answer
- Continue execution automatically
One headersHelper Script, Multiple MCP Servers
If you manage multiple MCP servers requiring similar authentication headers, you can now use environment variables in your headersHelper script:
#!/bin/bash
# Use CLAUDE_CODE_MCP_SERVER_NAME to differentiate servers
echo "Authorization: Bearer $(get_token_for_server $CLAUDE_CODE_MCP_SERVER_NAME)"
This aligns with our recent coverage of MCP security in "Audit Your MCP Servers Now: 66% Have Critical Vulnerabilities" — simplifying server management while maintaining security.
Try It Now — Commands and Config Updates
Update Your Claude Code Installation
# Check your current version
claude code --version
# Update via your package manager
# For npm/yarn users:
npm update -g @anthropic-ai/claude-code
Implement Conditional Hooks
Add this to your claude_code_config.json:
{
"hooks": [
{
"type": "PreToolUse",
"if": "Bash(rm -rf *)",
"script": "./scripts/confirm-destructive.sh",
"description": "Confirm destructive deletions"
},
{
"type": "PreToolUse",
"if": "Http(*api*)",
"script": "./scripts/log-api-calls.sh",
"description": "Log all API calls"
}
]
}
Test the Fixed /compact Command
Start a long session with Claude Code, let it run through multiple complex tasks, then try:
/compact
Even if your transcript is massive, it should now compact successfully.
Enable OTEL Tool Details (If Needed)
If you're debugging OpenTelemetry integration and need tool parameters in events:
export OTEL_LOG_TOOL_DETAILS=1
claude code
Performance and Stability Wins
Beyond the headline features, v2.1.85 delivers subtle but important improvements:
- Scroll performance with large transcripts improved by replacing WASM yoga-layout with pure TypeScript
- UI stutter reduced when compaction triggers on large sessions
- @-mention file autocomplete now faster on large repositories
- Memory leak fixed in remote sessions when streaming responses are interrupted
- Terminal keyboard fixes for Ghostty, Kitty, WezTerm users (Ctrl+C/Ctrl+D now work after quitting)
These changes collectively make Claude Code feel snappier during intensive development sessions, especially when working with large codebases.
Enterprise and Security Updates
For organizations using managed settings:
- Plugins blocked by
managed-settings.jsonare now properly hidden from marketplace views - The
deniedMcpServerssetting now correctly blocks claude.ai MCP servers - MCP OAuth follows RFC 9728 Protected Resource Metadata discovery
This continues Claude Code's trend toward enterprise readiness, following last week's Auto Mode preview release and critical bug fixes for production environments.





