codex使用smart-search的问题

树枝孤鸟 2026-07-02 12:09 1

在Codex受限沙箱里运行 smart-search 会被拦网

Codex 会话里的命令沙箱不放本地 CLI 出网

这个是怎么解决的?需要给全部权限?

选择‘替我审批’并不会跳出询问审核,如果是‘请求批准’则会有询问在非沙箱环境运行

最新回复 (1)
  • Link05 07-09 23:54
    1

    在.codex目录下的rules目录下创建一个default.rules,然后填写下面的内容


    prefix_rule(
    pattern = ["smart-search"],
    decision = "allow",
    justification = "Allow smart-search CLI to access network by default",
    match = [
    "smart-search doctor --format json",
    "smart-search search \"query\" --format json",
    "smart-search fetch \"https://example.com\" --format json",
    "smart-search exa-search \"query\" --format json",
    "smart-search context7-library \"react\" --format json",
    ],
    )

    保持原有你的codex权限不动

* 帖子来源Linux.do
返回