Claude Code 2.1.299 更新:新增空闲压缩与多项修复
原标题:2.1.299
AI 摘要
Claude Code 发布 2.1.299 版本更新,新增 CLAUDE_CODE_DISABLE_FILE_MENTIONS 环境变量、终端空闲压缩机制(200K+ token 会话闲置约 54 分钟后自动压缩)及 CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS 配置项,并扩展了 mod 钩子能力(如 $.prompt.media、$.session.identity()、skill.prompt 信息)。同时修复了大量问题,包括云会话错误组织提示、网关模型名下的自动压缩失败、mod 在关闭后仍运行、沙箱命令写入 --plugin-dir 目录、调试日志内存增长、WSL2 沙箱失败等。
正文节选
- Added `CLAUDE_CODE_DISABLE_FILE_MENTIONS` environment variable: Claude gets the paths of `@` file mentions to read with its file tools, not the files' contents - Added idle compaction in the terminal: a 200K+ token conversation left idle for about 54 minutes is compacted before its one-hour prompt cache expires, so your next message doesn't reprocess it all - Added `CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS` to change idle compaction's 200K-token minimum; `"idleCompaction": false` in settings.json t