← 回總覽

分享一个省 Cursor 额度的思路: Agent 只做调度,写代码的活儿丢给 Codex CLI

📅 2026-07-06 15:12 HeStudy 人工智能 6 分鐘 6822 字 評分: 78
AI 编程 Cursor Codex CLI AI Agent 提示工程
📌 一句话摘要 作者分享通过让 Cursor Fable 5 充当技术负责人、将代码编写任务外包给免费 Codex CLI 的方案,并提供可直接复用的 User Rule 配置与踩坑经验。 📝 详细摘要 文章介绍了一种节省 Cursor AI 额度的方法:利用已有的 ChatGPT 订阅调用 Codex CLI,让贵的模型(Fable 5)只做「动脑」的决策和 review 工作,将「动手」写代码的活儿外包出去。作者给出了完整的 Cursor User Rules 配置,包含非交互式调用命令、超时设置、验收流程和逃生通道。核心经验是:任务描述质量决定成功率,验收环节(git diff)不能

78

The author shares a solution of using Cursor Fable 5 as a tech lead and offloading code writing to the free Codex CLI, along with reusable User Rule configurations and lessons learned. ![Image 1: V2EXV2EX](https://www.bestblogs.dev/articles?sourceid=17e31348 "View More From This Source")

Today 836 words (about 4 min) View Source →

Sign in to highlight text and take notes as you read. Sign in now

最近用 Cursor 的 Fable 5 ,能力没得说,但额度消耗实在顶不住。

想了个办法:我本身有 ChatGPT 订阅,Codex CLI 的调用对我来说约等于免费。那就让贵的模型只做"动脑"的部分,把"动手写代码"这种最烧额度的活儿外包出去——

写代码、改代码、重构 → Agent 通过终端调 codex exec 完成,自己不直接编辑文件 解释代码、搜索、review 这类只读任务 → Agent 自己做,不浪费一次外包 相当于 Fable 5 当 tech lead ,Codex 当干活的。比较讽刺的是,这条 rule 本身也是我让 Fable 5 写的。

rule 全文如下,放在 Cursor 的 User Rules 里即可:

为节省 Cursor 模型额度,凡是涉及编写、修改、重构代码的任务,优先通过终端调用 Codex CLI 完成,而不是由 Agent 自己直接编辑文件:

  • 使用非交互模式调用:codex exec -s workspace-write -C <项目根目录> "<任务描述>"。任务描述必须包含足够上下文:目标、相关文件路径、技术约束、验收标准。若目录不是 git 仓库,加 --skip-git-repo-check 。
  • codex 可能运行数分钟,调用时设置足够长的超时(建议 10 分钟以上)。结束后阅读 codex 的输出,并通过 git diff 或读取文件核对改动是否正确,再向用户汇报。
  • 如果 codex 执行失败或改动不符合预期,把问题反馈给 codex 再次调用修正(可用 codex exec resume --last "<修正指示>" 续接上一个会话);仅当 codex 多次失败、或改动极小(一两行)时,才由 Agent 自己直接编辑。
  • 禁止调用交互式的 codex (无参数的 TUI 模式),只使用 codex exec 。
  • 只读类任务(解释代码、搜索、回答问题、review )不需要委托,Agent 直接处理。
几个实际踩过的点:

任务描述的质量决定一切。给 codex 的描述要写得像一张合格的工单(目标、文件路径、约束、验收标准),否则返工率很高,反而更费时间。 验收环节不能省。rule 里强制要求跑完 git diff 核对再汇报,不然就是把黑盒套黑盒。 留了逃生通道:codex 反复失败或者改动只有一两行时,允许 Agent 直接动手,避免为省额度把简单事情搞复杂。 用下来的体感:额度消耗明显下降,代价是单个任务的墙钟时间变长了( codex 一跑就是几分钟),适合不着急的场景。

想问问大家:

有人用类似的"贵模型调度 + 便宜模型执行"的组合吗?效果如何? 这种多级转包会不会有上下文损耗的问题?你们怎么解决的?

Key Quotes

> Think of Fable 5 as the tech lead and Codex as the worker.

> Task description quality determines everything. Descriptions for Codex should read like a proper work order (objectives, file paths, constraints, acceptance criteria), otherwise rework rates stay high and you end up spending more time.

> The verification step is non-negotiable. Rules must mandate running git diff for review before reporting, otherwise you're just nesting black boxes within black boxes.

Tags

AI Coding

Cursor

Codex CLI

AI Agent

Prompt Engineering

Related Articles

* vibe-coding-template: After Losing a Codex Conversation File, I Organized a Set of Agent Long-Term Collaboration Templates to Quickly Embed AGENTS.md, Task Prompts, Code Review, Knowledge Explanations, and Web-Search Workflows into Projects * AI R&D Automation: Wiki Knowledge Base + Skill Pack * Sharing My Multi-Project AI Terminal Codux: Unified Management of 8 CLIs like Codex/Claude Code by Project, Open Source * Harness Is Not the Goal, Knowledge Is the Moat — Knowledge Accumulation Practices of an AI Engineering Delivery Team * Understanding Hermes in One Article: How the New Top-Tier Agent Self-Evolves from Experience * Harness Engineering: How I Spent a Week Boosting AI Coding Rate to 90% in an Enterprise App * Investing 10,000 RMB in AI: A Year of Tools, Practices, and Reflections * Heart Bleeding: My 32GB 16-inch MacBook Pro 2019 Suddenly Died that bricked after a system update, ultimately diagnosed as physical damage to the iNAND inside the T2 chip, along with subsequent solutions and data recovery notes.") * Skill: Tips on How Vibe Coding Improves Code Quality and Efficiency * From OpenClaw to FastClaw: How to Design a Great Multi-Agent Architecture

查看原文 → 發佈: 2026-07-06 15:12:13 收錄: 2026-07-06 18:00:38

🤖 問 AI

針對這篇文章提問,AI 會根據文章內容回答。按 Ctrl+Enter 送出。