Claude Code 2.1.251 adds subagent streaming and cache metrics
New hooks gate model switches, resume hooks estimate re-cache cost, file tools get symlink patches, and a --restricted flag locks down untrusted runs.

Copy markdown
Foreground subagents now stream live
A foreground subagent's tool calls and results now stream to Remote Control clients in real time, instead of only showing status while they run; background subagents stay status-only. You can finally watch a delegated agent work rather than wait for its summary.
Model switches are now hookable
New PreModelSwitch and PostModelSwitch hooks let you block, confirm, or annotate a model change — catch an accidental jump to Opus mid-session, or log every switch. SessionStart resume hooks now also receive session staleness and an estimated re-cache cost.
/cost exposes your prompt-cache economics
/cost adds a per-session prompt-cache line — hit ratio, misses, tokens re-cached, warm vs cold — and the status line gains a prompt_cache object. Cache misses are where token bills quietly balloon, so this is the number to watch on long sessions.
File tools stop trusting swapped symlinks
Read, Write, and Edit no longer follow a symlink swapped in after the permission check, plugin commands can't point outside their own directory, and Grep/Glob apply deny rules through symlinked paths. Worth updating if you run untrusted plugins or repos.
New --restricted flag and per-agent cache TTL
From v2.1.248: a --restricted flag strips command and code execution and confines file access to the working directory — a tighter sandbox for reviewing untrusted code — while agent frontmatter gains experimental.cacheTtl to set prompt-cache TTL per agent.