Claude Code has received several updates, introducing new functionalities for developers and enhanced control over operations. These changes include new hook events for managing model switches, live streaming capabilities for subagent interactions, and features designed to help users monitor and control spending.
Key Points
- PreModelSwitch and PostModelSwitch hook events have been added, allowing users to block, confirm, or annotate a model switch.
- SessionStart resume hooks now provide information on session staleness and estimated re-cache costs.
- Live streaming of a foreground subagent's tool calls and results is now available to Remote Control clients.
- A Spend limit bar has been added to /usage, alongside a
rate_limits.spend_limitstatus line field for developers using a Claude apps gateway with spend limits. - A per-session prompt-cache line has been added to /cost, detailing hit ratio, misses, tokens re-cached, and warm/cold status, with a matching
prompt_cacheobject for status line scripts. - New commands—
attach,logs,stop,respawn, andrm—have been added toclaude --help. - File tools (Read, Write, Edit) have been fixed to prevent reading or writing outside approved locations when following symlinks.
- Plugin commands declared in a marketplace entry can no longer point outside the plugin directory, with such paths now rejected due to path-traversal errors.
Context
According to the Claude Code changelog, these updates aim to provide developers with more granular control over model behavior, better visibility into subagent operations, and improved cost management tools. The fixes address potential security vulnerabilities related to file tool operations and plugin command declarations.
Why It Matters
These updates offer developers enhanced capabilities for managing model interactions, monitoring operational costs, and ensuring secure execution environments within Claude Code. The introduction of hooks and detailed cost metrics can inform development practices and resource allocation.
What To Do
- Review the PreModelSwitch and PostModelSwitch hook events to understand how they can be used to manage model switching behavior.
- Explore the new /usage and /cost endpoints to monitor spend limits and prompt-cache performance.
- Familiarize yourself with the expanded
claude --helpcommands, includingattach,logs,stop,respawn, andrm. - Note the security fixes for file tools and plugin commands, ensuring that development practices align with these updated safeguards.
