Claude Code v2.1.300 Arrives with Mod Extensions and OpenTelemetry Upgrades!
Hi, it's Shii-chan! Today we're looking at the new Claude Code release v2.1.300. It has a lot of changes, so I'll pick out the highlights!
Claude Code ReleaseWhat was announced?
The Claude Code Release on GitHub published v2.1.300. It is a large release with many additions, fixes, and behavior changes.
The story so far
Here are the changes where the before and after are clear.
- The agent.spawn mod hook could only refuse workflow agents before. Now it can rewrite the agent's prompt and model
- Large requests to api.anthropic.com now use gzip compression even when telemetry is disabled. Set
CLAUDE_CODE_GZIP_REQUEST_BODIES=0to turn it off - On exit, background commands still running 1.5 seconds after being asked to stop are force-killed. In fullscreen mode they could previously be left running
What changes
Added features
- Added
virtualTextto a mod's prompt decorations: text drawn in the prompt box that never enters the draft or the submitted prompt - Added
$.ui.view({ agentId })for mods to show an agent's transcript in the main view, and$.ui.view({})goes back - Added a
dirprop on a mod'sTextfor right-to-left text - Added the
prompt.changemod hook, raised when the prompt box's text changes without a typed edit (a recalled history entry, a clear, an undo, or a plugin's fill) - Added
/advisoron Claude Platform on AWS. No advisor runs until you pick one with/advisor,advisorModel, or--advisor, andCLAUDE_CODE_DISABLE_ADVISOR_TOOL=1turns it off - Added
cache_creation_5m_tokensandcache_creation_1h_tokensto the OpenTelemetryapi_requestevent, splitting cache writes by lifetime - Added OpenTelemetry GenAI semantic-convention attributes to trace spans, such as
gen_ai.provider.name,gen_ai.conversation.id,gen_ai.tool.name, anderror.type - In VS Code, added the
claudeCode.attachSelectionsetting to stop selected editor text from being added to your messages
Dive Deep
Here are some fixes and changes that may matter for operations.
- Hook
updatedInput: from PreToolUse and PermissionRequest hooks, it is now validated like Claude's own input. Unknown keys are dropped, and input the tool rejects denies the call - Fixed agent hooks ignoring their
model: aliases likehaikunow resolve, and an unavailable model falls back to the caller's - Around
--worktree: fixed sessions sometimes starting from the wrong commit when a tag or branch was named like a commit ID, among other fixes. Also fixed the branch showing as.invalidin repositories using reftable ref storage - Fixed automatic tool search (
ENABLE_TOOL_SEARCH=auto) turning off part-way through a conversation, for example while MCP servers reconnect - Fixed a conversation failing on every turn with a 400 error when the API rejected an MCP tool's input schema. Claude Code now sends that tool without parameters for the rest of the conversation
- Fixed a login refused by
forceLoginOrgUUIDleaving the refused organization's token stored - Removed the
--sandboxand--no-sandboxflags fromclaude remote-control, which had no effect. Passing either now exits with an error. Setsandbox.enabledin settings to sandbox sessions - The
/sandboxmode option now reads "Sandbox commands" instead of "Sandbox BashTool" - Local session transcripts now also record each API request's system prompt, tools, and parameters
There are also Claude Tag changes such as Slack Connect channel support and Slack voice clips, and a Code Review fix for @claude review comments from people whose GitHub organization membership is private.
Wrap-up
- Mod APIs and hooks were extended (
virtualText,$.ui.view,dir,prompt.change, rewriting inagent.spawn) - OpenTelemetry gains cache-write tokens by lifetime and GenAI convention attributes
- Many behavior fixes, including hook
updatedInputvalidation, agent hookmodel, and--worktree --sandboxand--no-sandboxwere removed fromclaude remote-control
This release is for mod authors, people collecting telemetry, and heavy users of hooks and worktrees!