Fixes MCPThe Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.Full definition → timeout/auth false-negatives on sleep and locked keychains, doubled HTTP tool calls on reconnect, and autocompact thrashing on large PDF/image results, all of which affect long-running AI agentAn AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.Full definition → sessions.
Key takeaways · AI-distilled
Claude Code v2.1.307 adds a claude_code.safety_event OpenTelemetry event for each tool call that a permission rule, auto mode, a safety check, a agent hookA script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.Full definition → or the sandboxAn isolated environment where AI-generated code or agent actions run without being able to touch anything real.Full definition → stopped, prompted or sent back.
Unparseable tool calls are now retried up to twice before the turn ends with an error, and fork subagents launched together are each told which launch is theirs, so they are much less likely to start each other's work.
Self-hosted runners now stop checkout hooks after 30 minutes by default and fail the session's setup; hooks that need longer must raise --checkout-hook-timeout-min or set it to 0.
Code Review gains @claude review stop (also off and pause), which ends an @claude review always subscription on a pull request without starting a new review.
Terms in this piece · Glossary
MCP — The Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.
agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.
AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
sandbox — An isolated environment where AI-generated code or agent actions run without being able to touch anything real.