Claude Code:沙盒内 Bash 命令默认走常规权限流程

沙盒内的 Bash 命令默认遵循常规权限流程;设置 sandbox.autoAllowBashIfSandboxed: true 可继续免提示运行。

Claude Code
事件类型
功能更新
版本
v2.1.325
官方发布
本站整理
本页目录

关键变化

沙盒内的 Bash 命令现在默认遵循常规权限流程。若要继续免提示运行,可设置 sandbox.autoAllowBashIfSandboxed: true。

官方原文

本次变化

共 9 条要点

  1. 沙盒内的 Bash 命令现在默认遵循常规权限流程。若要继续免提示运行,可设置 sandbox.autoAllowBashIfSandboxed: true。

    官方原文 · c1

    Changed sandboxed Bash commands to follow the normal permission flow by default; set sandbox.autoAllowBashIfSandboxed: true to keep running them without prompts

    官方原文 · c1
  2. 如果沙盒由托管设置开启,要保留免提示运行,需要在最高优先级的托管来源中设置 sandbox.autoAllowBashIfSandboxed: true。

    官方原文 · c2

    Changed managed settings that turn the sandbox on: to keep commands running without prompts, set sandbox.autoAllowBashIfSandboxed: true in your highest-ranking managed source

    官方原文 · c2
  3. 定时任务和 /loop 在运行声明了 allowed-tools 或钩子的技能前,会先询问。将 Skill(name) 加入 permissions.allow 后,该技能可以无人值守运行。

    官方原文 · c3

    Changed scheduled tasks and /loop to ask before running a skill that declares allowed-tools or hooks; add Skill(name) to permissions.allow to run it unattended

    官方原文 · c3
  4. 在不属于当前项目、也未受信任的仓库中,只读 git 命令会先询问。要让它们免提示运行,需用 --add-dir 指定该仓库,additionalDirectories 设置不适用于这里。

    官方原文 · c4

    Changed read-only git commands to ask first in a repository that isn't the project's or one you trusted; name it with --add-dir, not the additionalDirectories setting, to run them without prompts

    官方原文 · c4
  5. 本次修复还包括 zstd 压缩响应解码方式中的一个安全问题。

    官方原文 · c5

    Fixed a security issue in how zstd-compressed responses are decoded

    官方原文 · c5
  6. Bash 权限检查此前存在缺口:部分复合命令可以未经询问直接运行。这个缺口已修复,这些命令现在会请求权限。

    官方原文 · c6

    Fixed a gap in Bash permission checks where some compound commands could run without asking; these now ask for permission

    官方原文 · c6
  7. VSCode 现在也提供终端里的提示建议。按 Tab 可接受建议的下一条提示;在 Claude Code 的 settings.json 中设置 promptSuggestionEnabled: false 可关闭这些建议。

    官方原文 · c7

    [VSCode] Added prompt suggestions wherever the terminal shows them: Tab accepts the suggested next prompt; promptSuggestionEnabled: false in Claude Code's settings.json turns them off

    官方原文 · c7
  8. 市场的 ref 现在接受分支或标签上任意提交的完整 ID。旧版客户端无法克隆按这种方式固定的版本,因此通过完整提交 ID 固定版本的市场,在这些客户端上会停止加载。

    官方原文 · c8

    Changed marketplace ref to accept the full ID of any commit on a branch or tag; clients before this version can't clone such a pin, so a marketplace pinned this way stops loading there

    官方原文 · c8
  9. Claude Code on the web 的新云会话此前会将工具搜索加载的 MCP 工具描述截断在 4,096 个字符。本次修复后,上限为 16,384,与其他 Claude Code 会话一致。

    官方原文 · c9

    [Claude Code on the web] Fixed new cloud sessions cutting MCP tool descriptions loaded through tool search at 4,096 characters; the limit is now 16,384, as in other Claude Code sessions

    官方原文 · c9

变化明细

下表按已审核事实整理,保留原语言;原文见各要点的引用。

编号主体动作对象范围数值
c1sandboxed Bash commandschanged to follownormal permission flow by default
c2managed settings that turn the sandbox onrequire settingsandbox.autoAllowBashIfSandboxed: true to keep commands running without promptshighest-ranking managed source
c3scheduled tasks and /loopask before runninga skill that declares allowed-tools or hooks
c4read-only git commandsask firstin a repository that isn't the project's or one you trusted
c5Claude Codefixeda security issue in how zstd-compressed responses are decoded
c6Bash permission checksfixed a gapsome compound commands could run without asking
c7VSCodeaddedprompt suggestionsVSCode
c8marketplace refchanged to acceptthe full ID of any commit on a branch or tag
c9Claude Code on the webfixedMCP tool descriptions cut at 4,096 characters; limit now 16,384new cloud sessions; MCP tool descriptions loaded through tool search精确 16384 characters

版本时间线

同一工具在本站已发布的快讯,按官方发布日期由新到旧。

  1. 开启 agent teams 时可启用 Code Mode
  2. 当前沙盒内 Bash 命令默认走常规权限流程
  3. Anthropic托管环境的云会话可不选仓库启动
  4. Claude apps 网关管理 API 新增费用报告
  5. 新增设置:Linux沙箱命令可创建用户命名空间
  6. api_request 事件新增缓存写入拆分字段

关于这个工具

Claude Code

Claude Code 是 Anthropic 的编程 Agent,可围绕代码库读取上下文、修改文件、运行命令并协助开发任务。

分类AI编程工具

查看 Claude Code 详情

相关教程

来源与说明

官方原文 · github.com/anthropics/claude-code/releases/tag/v2.1.325

AI 整理说明

本条由 AI 依据官方来源整理并经自动核对;发现错误请 反馈。