跳到主内容
@wquguru
精选82VoxAI 产品与模型

OpenAI Codex Auto-review 免费开启与安全配置指南

OpenAI just made 𝗖𝗼𝗱𝗲𝘅'𝘀 𝗔𝘂𝘁𝗼-𝗿𝗲𝘃𝗶𝗲𝘄 𝗳𝗿𝗲𝗲. If you sign in with ChatGPT, it doesn…

原文
发到 X
推荐理由

这篇不仅介绍了新功能,还给出了极具实操价值的 CLI 配置 Prompt 和权限管理逻辑,结构清晰,对开发者有直接参考价值。

OpenAI just made 𝗖𝗼𝗱𝗲𝘅'𝘀 𝗔𝘂𝘁𝗼-𝗿𝗲𝘃𝗶𝗲𝘄 𝗳𝗿𝗲𝗲. If you sign in with ChatGPT, it doesn't touch your usage, however much it reviews.

OpenAI 刚刚让 𝗖𝗼𝗱𝗲𝘅 的 𝗔𝘂𝘁𝗼-𝗿𝗲𝘃𝗶𝗲𝘄(自动审查)功能免费了。如果你通过 ChatGPT 登录,无论它审查了多少内容,都不会影响你的使用额度。

A lot of people have it turned on in settings and 𝗶𝘁 𝗵𝗮𝘀 𝗻𝗲𝘃𝗲𝗿 𝗿𝗲𝘃𝗶𝗲𝘄𝗲𝗱 𝗮 𝘁𝗵𝗶𝗻𝗴: if you run with full access, --yolo or approval_policy = "never", almost nothing ever gets sent to it. Subagents inherit the main agent's permissions too, so if the main agent has full access, 𝗲𝘃𝗲𝗿𝘆 𝘀𝘂𝗯𝗮𝗴𝗲𝗻𝘁 𝗱𝗼𝗲𝘀 𝗯𝘆 𝗱𝗲𝗳𝗮𝘂𝗹𝘁. Every time you leave Codex on a long task, switch its permissions to Approve for me first.

很多人已经在设置中开启了该功能,但 𝗶𝘁 𝗵𝗮𝘀 𝗻𝗲𝘃𝗲𝗿 𝗿𝗲𝘃𝗶𝗲𝘄𝗲𝗱 𝗮 𝘁𝗵𝗶𝗻𝗴(它从未进行过任何审查):如果你以完全访问权限运行,使用 --yolo 模式或设置 approval_policy = "never",几乎没有任何操作会被发送给它进行审查。子代理也会继承主代理的权限,因此如果主代理拥有完全访问权限,𝗲𝘃𝗲𝗿𝘆 𝘀𝘂𝗯𝗮𝗴𝗲𝗻𝘁 𝗱𝗼𝗲𝘀 𝗯𝘆 𝗱𝗲𝗳𝗮𝘂𝗹𝘁(每个子代理默认也拥有完全权限)。每次你让 Codex 处理长时间任务时,请将其权限切换为“先让我批准”。

Simply put, when Codex needs the network, wants to edit files outside the project, or runs a command that needs elevated permissions, it stops and waits for you to click Allow. Step away and it sits there stuck, and if you sent out a few subagents, they all sit there stuck. Give it full access and you're left hoping it doesn't do anything reckless. With Auto-review on, those requests go to a separate agent: the safe ones go through, the risky ones get blocked, and Codex has to find a safer way or stop and ask you. Of the 10,000 actions in the chart, 720 went to review, and in the end just 7 were blocked.

简单来说,当 Codex 需要网络访问、想要编辑项目外的文件,或运行需要提升权限的命令时,它会停止并等待你点击“允许”。如果你离开,它就会卡在那里;如果你派出了几个子代理,它们都会卡住。给予完全访问权限意味着你只能祈祷它不会做出鲁莽的行为。开启自动审查后,这些请求会发送给一个单独的代理:安全的请求会通过,有风险的请求会被阻止,Codex 必须找到更安全的方式或停下来询问你。在图表中的 10,000 个操作中,有 720 个进入了审查流程,最终只有 7 个被阻止。

A few more things from the official docs: → A custom subagent that only reads code or does reviews can be set to read-only on its own, but launching the CLI with --yolo overrides it → It only changes who does the reviewing. It adds no permissions, so which folders it can write to and whether it can reach the network stay the same → Once blocked, it can't work around it, and 3 blocks in a row in the same turn stop the turn

官方文档中的几点补充说明: → 仅读取代码或执行审查的自定义子代理可以单独设置为只读,但使用 --yolo 启动 CLI 会覆盖此设置 → 它仅改变由谁来进行审查。它不增加任何权限,因此它可以写入哪些文件夹以及能否访问网络保持不变 → 一旦被阻止,它无法绕过限制,且在同一轮次中连续被阻止 3 次将终止该轮次

In the app, pick Approve for me in the permissions menu below the composer. On the CLI, send this prompt and the links below to GPT-6.1 Sol 👇

在应用中,请在 Composer 下方的权限菜单中选择“先让我批准”。在 CLI 中,请将以下提示词和链接发送给 GPT-6.1 Sol 👇

"Read these two docs. If you can't read them, stop and tell me. Then set up Codex's Auto-review for me: 1. Check approval_policy, the permission setting (sandbox_mode or default_permissions) and approvals_reviewer in my ~/.codex/config.toml, project config, profiles and custom agent files, and check my shell aliases for --yolo. Flag anything running with full access, --yolo or approval_policy = "never" first. 2. Change to approval_policy = "on-request" and approvals_reviewer = "auto_review", with permissions at the workspace level, written the way my config file already does it. If neither is set, use default_permissions = ":workspace" as in the docs' example. 3. Set my existing custom agents that only scan or review to read-only, and remind me if launching with --yolo would override that. 4. Look at the commands this project runs most and my recent sessions (~/.codex/sessions), and find the commands and folders that most often stop to wait for approval. For the ones that are safe and common, add narrow rules (like ["pnpm", "run", "lint"]) or writable_roots. Don't open big holes like ["python"] or ["curl"]. If you're not sure how to write a rule or writable_roots, list it first. 5. Don't change the reviewer policy itself. Show me what you'll change first, and only make the changes after I confirm."

"阅读这两份文档。如果你无法阅读,请停止并告诉我。然后为我设置 Codex 的自动审查(Auto-review): 1. 检查我 ~/.codex/config.toml、项目配置、配置文件和自定义代理文件中的 approval_policy、权限设置(sandbox_mode 或 default_permissions)以及 approvals_reviewer,并检查我的 shell 别名中是否有 --yolo。首先标记任何具有完全访问权限、使用 --yolo 或 approval_policy = "never" 运行的内容。 2. 将 approval_policy 更改为 "on-request",并将 approvals_reviewer 设置为 "auto_review",权限设置在工作区级别,按照我的配置文件已有的方式编写。如果两者均未设置,则使用文档示例中的 default_permissions = ":workspace"。 3. 将我现有的仅用于扫描或审查的自定义代理设置为只读,并在以 --yolo 启动会覆盖该设置时提醒我。 4. 查看此项目最常运行的命令和我最近的会话(~/.codex/sessions),找出最常停下来等待批准的命令和文件夹。对于安全且常见的命令,添加窄规则(例如 ["pnpm", "run", "lint"])或 writable_roots。不要打开像 ["python"] 或 ["curl"] 这样的大漏洞。如果你不确定如何编写规则或 writable_roots,请先列出它们。 5. 不要更改审查者策略本身。 先向我展示你将做出的更改,在我确认后再进行修改。"

https://learn.chatgpt.com/docs/sandboxing/auto-review https://learn.chatgpt.com/docs/agent-configuration/subagents

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件