Claude Code v2.1.198 (July 2026) introduced a wave of agentic improvements: automatic shell command analysis, better session navigation, background subagent permission handling, and expanded automation for Git workflows. The release also made Chrome integration generally available and increased context window to 1M tokens with the default Sonnet 5 model.
Key Points
Shell mode auto‑analysis: Running a command with ! now automatically prompts the model to interpret the output (e.g., ! npm test yields an explanation without a second prompt).
/rewind after clear: /rewind can resume a conversation even after /clear erases the visible chat.
Background subagent permissions: Permission prompts from subagents appear directly in the main session instead of being silently denied.
/cd command: Change the working directory mid‑session without rebuilding the prompt cache.
Parameterized permission rules: Rules can match specific tool parameters, e.g., Agent(model:opus).
/config key=value settable from -p (prompt) mode.
Auto‑mode Git safety: Destructive Git commands are blocked when the user did not explicitly ask to discard work.
Chrome integration GA: Browser bridging for testing/debugging.
Background agents auto‑Git: On completion, agents can auto‑commit, push, and draft PRs.
Notification hooks: agent_needs_input and agent_completed hooks for external integrations.
Deeper subagent spawning: Sub‑agents can spawn further sub‑agents up to 5 levels (previously 3).
Sonnet 5 default with 1M token context window.
Concepts
Shell mode (!): Execute shell commands from the chat. With v2.1.198, the model automatically analyzes the output.
/rewind: Roll back the conversation to a previous state. Now works after /clear.
Background subagent: An auxiliary agent spawned by the primary session to perform a task. Its permission requests now surface in the main chat.
MCP (Model Context Protocol): A protocol for authentication and tool access. claude mcp login/logout manages credentials.
/cd: Session‑level directory change that does not invalidate the prompt cache.
Permission rule: Pattern‑based authorization for tools; supports parameter matching like Tool(param:value).
Chrome integration: A browser bridge (GA in this release) that allows Claude Code to interact with web pages.
Notification hooks: Event callbacks for agent lifecycle events (agent_needs_input, agent_completed).
Details
Shell Mode Auto‑Analysis (Week 26)
Previously, running ! npm test required a second prompt asking about the output. Now after the command exits, Claude Code automatically includes the output in context and offers an explanation. This closes the feedback loop without extra turns.
/rewind After /clear (Week 26)
/clear removes chat history from display but does not discard the underlying session. /rewind can now step back to earlier states, making it possible to recover from an accidental clear.
Background Subagent Permissions (Week 26)
When a background agent needs user approval (e.g., to access a file or run a command), the prompt is forwarded to the main session instead of being auto‑denied. This prevents silent failures and allows the user to grant or refine permissions interactively.
MCP Authentication (Week 26)
The new claude mcp login and claude mcp logout commands let users authenticate with MCP servers directly from the shell, streamlining credential management.
/cd – Mid‑Session Directory Change (Week 25)
Changing directories previously required a fresh session, which forced a full rebuild of the prompt cache. /cd updates the working directory without losing cached context, preserving conversation state.
Parameterized Permission Rules (Week 25)
Permission rules can now specify both the tool and its parameters, e.g., Agent(model:opus) allows the Agent tool only when using the Opus model. This enables fine‑grained access control.
/config in -p Mode (Week 25)
Configuration keys can be set or shown from prompt mode (-p) using /config key=value, making headless usage more flexible.
Auto‑Mode Git Safety (Week 25)
In auto‑mode, Claude Code previously could execute destructive Git commands (e.g., git reset --hard) even when the user only asked for a code change. Now it checks whether the user explicitly requested discarding work before allowing such operations.
v2.1.198 Highlights (July 1)
Chrome integration GA: The browser bridge, previously experimental, is now generally available. Claude Code can open, inspect, and interact with web pages.
Background agents auto‑commit/push/PR: When a background agent completes a task, it can automatically commit changes, push to remote, and create a draft pull request without further prompting.
Notification hooks: Applications can subscribe to agent_needs_input and agent_completed events. This enables custom notification workflows (e.g., Slack pings, logging).
Sub‑agent spawning depth: The cap on nested sub‑agents increased from 3 to 5, enabling more complex delegation patterns (e.g., a research agent spawning an API tester and a docs writer).
Default Model and Context
Sonnet 5 became the default model with a 1M token context window, providing significantly more capacity for large codebases and extended sessions.