Skip to main content
ClaudeREF.com
← All news
29 August 2026claude-code#claude-code#release#security#workflow

Claude Code v2.1.245–2.1.251: restricted mode, model hooks, and safer sessions

The latest releases add a restricted execution mode, model-switch hooks, richer session controls, and hardening for plugins, paths, symlinks, and remote work.

Claude Code moved from v2.1.241 to v2.1.251 between August 25 and August 28, 2026. The most useful changes are a safer execution profile, more control over model changes and background sessions, and several fixes that close permission and path-handling edges.

Changes worth noticing

  • Restricted execution: --restricted (or CLAUDE_CODE_RESTRICTED=1) removes command/code tools and WebFetch unless explicitly allowed, keeps file tools inside the working directory, ignores project settings, and refuses bypassPermissions.
  • Model-change automation: PreModelSwitch and PostModelSwitch hooks can block, confirm, or annotate a model switch. /effort now remembers a default per model, and status exposes prompt-cache hit and re-cache information.
  • Permission editing: /permissions now has an Auto mode tab for reviewing and editing classifier allow, soft_deny, and hard_deny rules instead of changing JSON by hand.
  • Better session operations: claude attach, logs, stop, respawn, and rm are now in the help surface. Remote Control can stream foreground subagent tool activity, while background and cloud sessions recover more clearly after disconnects or restarts.
  • Move between surfaces: /resume lets Claude Code desktop reopen a terminal transcript, and Remote Control lets the Claude mobile app start or continue work on a connected machine. /color and /rename keep several parallel sessions distinguishable across resume and Remote Control.
  • Persistent context and cost visibility: subagents can keep memory: project|user|local across sessions. /usage now shows scheduled-task usage, promptCacheTtl can keep API/cloud prompt caches warm for an hour, and /loop usage is easier to audit. v2.1.243 also reduced the native CLI download and memory footprint through compression and on-demand loading.
  • Safer boundaries: file tools, Grep, Glob, plugin commands, workflow scripts, and marketplace content now reject more symlink, traversal, control-character, and out-of-directory paths. v2.1.248 also adds diagnostics when server-managed settings fail to load.
  • Operational workflow: /claude-api cost-optimize, /usage-credits, the SendFeedback tool, and self-hosted-runner --client-label make cost, support, enterprise usage, and runner operations easier to manage.

What to do

Upgrade Claude Code and review any automation that changes models or runs background work:

claude update

If you run untrusted repositories or want a deliberately narrow tool surface, test --restricted in a disposable checkout before making it a team default. If you use hooks, add model-switch events to the same approval and audit policy as tool hooks. The release notes include many platform-specific fixes; verify behavior on your provider and operating system.

Official Claude Code v2.1.248 release notes · v2.1.251 release notes Desktop sessions · Remote Control · Session resume