What changed
Claude Code 2.1.186 shipped on June 22, 2026. You can now authenticate MCP servers directly from the CLI, and ! bash commands now trigger Claude to respond to their output automatically. The release also clears out a batch of bugs across background agents (claude agents), permission rule enforcement, and streaming after the machine wakes from sleep.
New features
-
Log in and out of MCP servers from the CLI (
claude mcp login/claude mcp logout)Authenticating an MCP server previously required opening the interactive
/mcpmenu, which was awkward over SSH and other remote sessions. Newclaude mcp login <name>andclaude mcp logout <name>commands authenticate from the CLI without the menu, and--no-browserredirects the flow over stdin so it can be completed over SSH. -
!bash commands trigger Claude to respond to the outputOutput from
!bash commands was added to the context only — Claude did not react to it automatically. Now!bash commands trigger Claude to respond to the output automatically. To keep the previous context-only behavior, set"respondToBashCommands": falsein settings.json. -
Status filtering in the
/workflowsagent detail view (f)With many agents running, you had to scan the
/workflowsagent detail view for the ones you wanted. Pressfto filter by status. -
“Skills” section in the
/pluginInstalled tabThe
/pluginInstalled tab now has a “Skills” section that groups your installed Skills. -
teammateMode: "iterm2"settingA new
teammateMode: "iterm2"setting is available, with a warning when auto mode cannot find theit2CLI. -
“Claude Platform on AWS - refresh credentials” option in
/loginWhen
awsAuthRefreshis configured,/loginnow offers a “Claude Platform on AWS - refresh credentials” option.
Key improvements
-
Background subagents surface permission prompts in the main session
When a background subagent needed permission, there was nowhere to prompt, so the request was auto-denied. Background subagents now surface permission prompts in the main session instead of auto-denying; the dialog shows which agent is asking, and Esc denies just that tool.
-
/review <pr>uses the same review engine as/code-review medium/review <pr>and/code-reviewtook different review paths, giving inconsistent results./review <pr>now uses the same review engine as/code-review medium. -
Typo suggestions and truncation for
claude mcp getandclaude mcp removeA typo in a server name simply failed, and long server lists printed in full. These commands now suggest the closest configured server name on a typo and truncate long server lists.
-
Memory compaction reminder for
MEMORY.mdThere was no nudge when the memory index grew large. The agent is now reminded to compact its
MEMORY.mdindex when nearing the size limit. -
Skill frontmatter keys accept multiple casings
display-name,default-enabled,fallback, andmetadata.*keys recognized a single casing. They now accept kebab-case, snake_case, and camelCase. -
Better handling of malformed
SKILL.mdfrontmatterMalformed YAML frontmatter in
SKILL.mdfailed silently. It now loads the skill body with empty metadata instead of failing silently. -
CLAUDE_CODE_MAX_RETRIEScapSetting
CLAUDE_CODE_MAX_RETRIESvery high could make unattended sessions retry for an unreasonably long time. It is now capped at 15; for unattended sessions, useCLAUDE_CODE_RETRY_WATCHDOGinstead.
Bug fixes
Sessions and streaming
- Fixed streaming requests failing with “Content block not found” or JSON parse errors after the machine wakes from sleep.
- Fixed Workflow
agent({schema})subagents looping forever on repeated schema validation failures — they now abort after 5 attempts. - Fixed session cost not showing for usage-based Enterprise and Team subscribers.
Background agents (claude agents)
- Fixed subagent transcript scroll position bleeding into the main transcript on exit.
- Fixed background task previews flashing raw tool names before the agent’s plan loaded.
- Fixed background session recaps being duplicated — the agent’s own end-of-turn summary now shows as the recap line.
- Fixed opening a background session from
claude agentsleaving the previous screen painted behind it. - Fixed Esc and Ctrl+C not responding while background agents are still running after the main turn ends.
- Fixed background job status in
claude agentsshowing a stale “needs input” message after replying. - Fixed a dark-theme flash when opening a background session from
claude agentson a light terminal. - Fixed mouse-selected text staying highlighted after deleting it in
claude agents. - Fixed agent teams: teammates spawned via tmux/pane backends now inherit the leader’s
--effortlevel.
Permissions and tools
- Fixed
Agent(type)deny rules andAgent(x,y)allowed-types restrictions not being enforced for named subagent spawns. - Fixed Chrome tab-group isolation not applying when the in-product permissions gate is off for concurrent CLI sessions.
- Fixed
--toolsallowing feature-gated tools to slip through before flags loaded on a cold first launch.
Display and UI
- Fixed misaligned option numbers in permission prompts when the option text overflows.
- Fixed pressing
xon a finished subagent in the agent panel not dismissing it. - Fixed a misleading “MCP server disconnected” notice for intentionally retired tools when resuming older sessions.
- Fixed
/pluginInstalled showing a “more above” indicator when already scrolled to the top. - Fixed
~~strikethrough~~showing literal tildes in assistant messages instead of rendering as strikethrough.
Notes
!bash auto-response is now the default — Claude now responds to!command output automatically. To keep output as context only, set"respondToBashCommands": falsein settings.json.- Retry cap for unattended sessions —
CLAUDE_CODE_MAX_RETRIESis now capped at 15. For more persistent retries in unattended runs, useCLAUDE_CODE_RETRY_WATCHDOGinstead. - Background subagent permission flow changed — background subagent permission requests were previously auto-denied; they now surface a prompt in the main session so you can see which agent is asking and respond.
- MCP CLI auth over SSH — in environments where a browser cannot open,
claude mcp login <name> --no-browserredirects the flow over stdin to complete authentication.