claudekit / updates / claude-code-2-1-186
[ PATCH · ]

Claude Code 2.1.186

New claude mcp login and claude mcp logout commands authenticate MCP servers from the CLI without opening the interactive /mcp menu, with --no-browser stdin redirect for completing over SSH. ! bash commands now trigger Claude to respond to the output automatically (set respondToBashCommands: false to keep the previous context-only behavior), and /workflows gains status filtering (f) plus a Skills section in the /plugin Installed tab. Background subagents now surface permission prompts in the main session instead of auto-denying, Agent(type) deny rules are now enforced for named subagent spawns, streaming requests no longer fail with "Content block not found" after the machine wakes from sleep, and several claude agents display issues are fixed.

Official announcement →

This article is a summary based on official documentation.

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 /mcp menu, which was awkward over SSH and other remote sessions. New claude mcp login <name> and claude mcp logout <name> commands authenticate from the CLI without the menu, and --no-browser redirects the flow over stdin so it can be completed over SSH.

  • ! bash commands trigger Claude to respond to the output

    Output 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": false in settings.json.

  • Status filtering in the /workflows agent detail view (f)

    With many agents running, you had to scan the /workflows agent detail view for the ones you wanted. Press f to filter by status.

  • “Skills” section in the /plugin Installed tab

    The /plugin Installed tab now has a “Skills” section that groups your installed Skills.

  • teammateMode: "iterm2" setting

    A new teammateMode: "iterm2" setting is available, with a warning when auto mode cannot find the it2 CLI.

  • “Claude Platform on AWS - refresh credentials” option in /login

    When awsAuthRefresh is configured, /login now 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-review took 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 get and claude mcp remove

    A 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.md

    There was no nudge when the memory index grew large. The agent is now reminded to compact its MEMORY.md index when nearing the size limit.

  • Skill frontmatter keys accept multiple casings

    display-name, default-enabled, fallback, and metadata.* keys recognized a single casing. They now accept kebab-case, snake_case, and camelCase.

  • Better handling of malformed SKILL.md frontmatter

    Malformed YAML frontmatter in SKILL.md failed silently. It now loads the skill body with empty metadata instead of failing silently.

  • CLAUDE_CODE_MAX_RETRIES cap

    Setting CLAUDE_CODE_MAX_RETRIES very high could make unattended sessions retry for an unreasonably long time. It is now capped at 15; for unattended sessions, use CLAUDE_CODE_RETRY_WATCHDOG instead.

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 agents leaving 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 agents showing a stale “needs input” message after replying.
  • Fixed a dark-theme flash when opening a background session from claude agents on 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 --effort level.

Permissions and tools

  • Fixed Agent(type) deny rules and Agent(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 --tools allowing 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 x on 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 /plugin Installed 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": false in settings.json.
  • Retry cap for unattended sessionsCLAUDE_CODE_MAX_RETRIES is now capped at 15. For more persistent retries in unattended runs, use CLAUDE_CODE_RETRY_WATCHDOG instead.
  • 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-browser redirects the flow over stdin to complete authentication.