Claude Code v2.1.186: MCP CLI Authentication and Smarter Bash Command Handling
Claude Code v2.1.186 adds claude mcp login/logout commands, automatic responses to ! bash output, better background subagent permission prompts, and a long list of stability fixes.
The Claude Code development team has released version 2.1.186, introducing CLI-based MCP server authentication, a new default behavior for ! bash commands, and improved permission handling for background subagents. The release also ships an extensive batch of fixes covering background sessions, agent teams, the plugin UI, and skill loading.
What’s New
MCP Authentication from the CLI
You can now authenticate MCP servers directly from the command line with claude mcp login <name> and claude mcp logout <name>, without opening the interactive /mcp menu. A --no-browser option with stdin redirect support makes it possible to complete authentication over SSH. In addition, claude mcp get and claude mcp remove now suggest the closest configured server name when you make a typo and truncate long server lists for readability.
Bash Commands Now Get Responses
! bash commands now trigger Claude to respond to the output automatically. If you prefer the previous behavior where output was only added to context, set "respondToBashCommands": false in your settings.json.
Background Subagent Permission Prompts
Background subagents no longer auto-deny permission requests. Prompts are now surfaced in the main session with a dialog showing which agent is asking, and pressing Esc denies just that tool. Related fixes ensure Agent(type) deny rules and Agent(x,y) allowed-types restrictions are enforced for named subagent spawns, and Esc and Ctrl+C respond correctly while background agents are still running after the main turn ends.
Workflow, Plugin, and Settings Additions
The /workflows agent detail view gains status filtering (press f), and the /plugin Installed tab now includes a “Skills” section. A new teammateMode: "iterm2" setting is available, with a warning when auto mode cannot find the it2 CLI. Users with awsAuthRefresh configured will also see a “Claude Platform on AWS - refresh credentials” option in /login.
Skills and Memory Improvements
Skill frontmatter keys display-name, default-enabled, fallback, and metadata.* now accept kebab-case, snake_case, and camelCase. Malformed SKILL.md YAML frontmatter no longer fails silently — the skill body loads with empty metadata instead. The memory system also reminds the agent to compact its MEMORY.md index when nearing the size limit.
Background Session and Agent Fixes
This release fixes a range of issues around claude agents and background work, including duplicated session recaps (the agent’s own end-of-turn summary now shows as the recap line), stale “needs input” status after replying, a dark-theme flash when opening a background session on a light terminal, mouse-selected text staying highlighted after deletion, the previous screen being left painted behind an opened session, and background task previews flashing raw tool names before the agent’s plan loaded. Agent teams teammates spawned via tmux/pane backends now inherit the leader’s --effort level, and Workflow agent({schema}) subagents now abort after 5 repeated schema validation failures instead of looping forever.
Stability and UI Fixes
Other notable fixes include streaming requests failing with “Content block not found” or JSON parse errors after waking from sleep, subagent transcript scroll position bleeding into the main transcript, Chrome tab-group isolation not applying for concurrent CLI sessions when the in-product permissions gate is off, misaligned option numbers in overflowing permission prompts, ~~strikethrough~~ rendering as literal tildes, --tools letting feature-gated tools slip through on a cold first launch, session cost not showing for usage-based Enterprise and Team subscribers, and a misleading “MCP server disconnected” notice for intentionally retired tools when resuming older sessions.
Behavior Changes
CLAUDE_CODE_MAX_RETRIES now caps at 15 — for unattended sessions, use CLAUDE_CODE_RETRY_WATCHDOG instead. /review <pr> now uses the same review engine as /code-review medium.
How to Update
To update to Claude Code v2.1.186:
- Check your current version:
claude --version - Update using your preferred method:
- Package manager: Follow your distribution’s update process
- Direct download: Visit the release page for platform-specific binaries
- Try
claude mcp login <name>if you manage MCP servers over SSH or in scripts - Set
"respondToBashCommands": falsein settings.json if you prefer the previous!bash command behavior