Skip to content

Release v0.18.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Nov 04:37
· 2 commits to main since this release

[0.18.0] — 2026-11-04

Added

  • Permanent-deletion commands are rejected outright. In auto mode, rm, unlink, shred, git rm, git clean -f…, find … -delete, rsync --delete*, del / rd /s / Remove-Item — including the same commands behind a wrapper (sudo, env -u …, xargs -I {} …, timeout 5 …, nohup, eval, busybox, su -c), a shell payload (sh -c, bash -lc, find -exec, npx -c), a $( … ) / backtick substitution, a heredoc piped into a shell, quote layers of any depth, or a Windows path prefix — are hard-rejected before they run, and the rejection tells the agent to use trash. This covers commands that stay inside the workspace, so an in-workspace rm -rf is no longer silent and unrecorded.
  • Sessions that inherit auto mode are now guarded. A subagent or AgentTeams worker created from an auto-mode session used to run entirely unguarded: its own permission preset is unset, so the gate treated it as "not auto mode" and did nothing. The gate now walks the parent-session chain and applies the deterministic rules (deny band, deletion guard, allow band, path trust) to those sessions as well. They do not reach the classifier — there is no approval answerer behind a child session.

Changed

  • The auto-mode guidance injected into the session now names trash as the allowed way to delete, so the agent knows the replacement before it hits a denial.
  • rm -rf node_modules is rejected too. Deleting build directories is recoverable by reinstalling, but the command itself is not recoverable, so it takes trash like everything else.
  • The guard reads the executed command text only, never the justification prose: a reason that mentions deletion no longer influences the decision, and a delete command quoted as an ordinary argument (echo "rm -rf x", git commit -m "drop rm -rf") is not treated as an action.

Notes

  • Scope of the guarantee. A deletion whose command word appears literally in an executed position is rejected: direct commands, wrappers and their option values, shell payloads (sh -c, bash -lc, find -exec, npx -c), $( … )/backtick substitutions, heredocs piped into a shell, and text piped into an interpreter. Deletions that only exist at runtime are not visible to a text scan and are out of scope: language APIs (fs.unlinkSync, os.remove, File.delete), awk 'BEGIN{system(...)}', a command word assembled by another program, and docker exec … rm.

Fixed

  • A blocked deletion now always leaves an audit record. Previously neither a rejection nor the command itself produced a decisions.jsonl entry, so an irreversible delete could leave no trace.

[0.18.0] — 2026-11-04

新增

  • 永久删除命令现在直接拒绝。 auto mode 下,rm、unlink、shred、git rm、git clean -f…、find … -delete、rsync --delete*、del / rd /s / Remove-Item,以及把它们藏在包装词(sudo、env -u …、xargs -I {} …、timeout 5 …、nohup、eval、busybox、su -c)、shell 载荷(sh -c、bash -lc、find -exec、npx -c)、$( … ) / 反引号替换、管道送进 shell 的 heredoc、任意层数引号或 Windows 路径前缀后面的写法,都会在执行前被硬拒,拒绝理由让 agent 改用 trash。发生在工作区内的命令同样适用,所以工作区里的 rm -rf 不再静默执行、也不再有记录缺口。
  • 继承 auto mode 的会话也纳入管辖。 由 auto-mode 会话派生的子代理或 AgentTeams worker 此前完全不设防:它自己的权限预设是空的,闸门据此判定「不是 auto mode」而直接放行。现在闸门会沿父会话链上溯,对这些会话同样执行确定性规则(deny 频带、删除守卫、allow 频带、路径信任)。它们不进分类器——子会话身后没有审批答复器。

变更

  • 注入会话的 auto-mode 指引现在写明 trash 是允许的删除方式,agent 在撞上拒绝之前就知道替代品。
  • rm -rf node_modules 同样被拒。重装即可恢复,但这条命令本身不可恢复,所以和其他删除一样走 trash。
  • 守卫只读会被执行的命令文本,绝不读 justification 散文:拒绝理由里提到删除不再影响判定,而把删除命令当普通参数引用(echo "rm -rf x"、git commit -m "drop rm -rf")不算动作。

说明

  • 保证的边界。 删除命令词字面出现在会被执行的位置时一定被拒:直接命令、包装词及其取值选项、shell 载荷(sh -c、bash -lc、find -exec、npx -c)、$( … )/反引号替换、管道送进 shell 的 heredoc,以及管道送进解释器的文本。只在运行期才成形的删除文本扫描看不见,不在范围内:语言 API(fs.unlinkSync、os.remove、File.delete)、awk 'BEGIN{system(...)}'、由别的程序拼出的命令词、docker exec … rm。

修复

  • 被拦下的删除现在一定留审计记录。此前既不拒绝、也不写 decisions.jsonl,不可逆删除可以零留痕。