Claude Code v2.1.248: Restricted Mode, Cache TTL, and Session Fixes
Claude Code v2.1.248 shipped with a new restricted execution mode, per-agent cache TTL configuration, and a batch of stability fixes for prompt caching and session management.
Restricted Mode
You can now run Claude Code with --restricted (or set CLAUDE_CODE_RESTRICTED=1). This removes all built-in tools that execute commands or code, plus WebFetch unless explicitly named in --tools. File operations stay inside the working directory, bypassPermissions is refused, and user/project/local settings files are ignored. This is useful for untrusted code reviews or CI environments.
Cache TTL Per Agent
You can now set a prompt-cache TTL in agent frontmatter via experimental.cacheTtl: "5m" or "1h". This applies when no subagent TTL is configured, giving you finer control over cache expiration for specific agents.
Self-Hosted Runner and Settings Diagnostics
The claude self-hosted-runner command gains a --client-label flag (or SELF_HOSTED_RUNNER_CLIENT_LABEL) to override the default label (hostname). Startup now warns if server-managed settings fail to load, and /doctor and /status explain the failure reason. Also, /usage-credits lets Enterprise members request higher limits from admins (AWS Marketplace, self-serve, trials).
Cross-Session Messaging
Added SendMessage and ListAgents for cross-session messaging on the same machine, now supported on Bedrock, Vertex, Foundry, and when telemetry is disabled.
Key Fixes
- Prompt-cache misses in long sessions (roughly hourly) caused by tool re-rendering after OAuth refresh — fixed.
- ScheduleWakeup tool definition changing on overage, causing cache misses on
--resume— fixed. - Desktop/Cowork sessions disappearing after 30 days — fixed; new
desktopSessionCleanupPeriodDayssetting caps the exemption. - Login loop when another process held the token refresh lock — now returns a retryable error.
- Windows: agents list now responds to keyboard after detaching or in win32-input-mode.
- /login with
ANTHROPIC_API_KEYset falls back to API-key sign-in instead of failing with OAuth. - Model names in
/modelrender as code (e.g.,[1m]literal). - Agents skip workspace trust prompt when
CIis set — fixed to show it. - Agent view no longer resurrects stale background sessions; stopped sessions show as stopped.
- Duplicate processes on resumed sessions — prevented.
- Deletion of sessions with merged-but-unpushed branches — allowed.
- Invalid hook answers now show hook name and schema error.
- Invalid JSON from hooks reported as errors, not silently treated as text.
/mcplists connector entries under actual scope, and MCP servers withheadersHelperre-run helper on 401 instead of OAuth fallback.
📖 Read the full source: GitHub Claude-Code
👀 See Also

Developer Prefers Qwen3.5-27B Over Proprietary Models for Its Failure Mode
A developer on r/LocalLLaMA reports preferring Qwen3.5-27B over Gemini 3.1 Pro and GPT-5.3 Codex because it gives up on problematic tasks rather than generating potentially dangerous code like unrestricted Perl or NodeJS scripts.

Kimi K2.6 vs Claude Opus 4.7: A Practical Coding Showdown on a Minetest Mod + Google Sheets Integration
A developer tested Kimi K2.6 and Claude Opus 4.7 on building a Minetest bounty board mod with a TypeScript backend and Google Sheets logging. Opus succeeded in both tasks; Kimi passed the local task but failed the integration. Costs: Opus ~$3.59 local, $16.03 integrated; Kimi $0.39 local, $5.03 failed.

Claude App Tops U.S. App Store Charts, AI Assistants Dominate Top 10
Claude by Anthropic is currently the #1 app on the U.S. App Store's top apps chart, with ChatGPT at #2 and Google Gemini at #4. The top 10 includes three AI assistants among shopping, social media, and utility apps.
Meta's Project OT: Planned 60% Team Cuts via AI, Called Off at Last Minute
Reuters details Meta's Project OT, a plan to cut teams by 60% through AI, called off after employee revolt. Teams still faced 30-40% cuts and key engineers reassigned to data labeling.