跪拜 Guibai
← All articles
JavaScript

Codex Sub-Agents Slash Task Costs to $0.61 by Separating Planning from Execution

By 小棉花的ai跨境之旅 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

API costs are the silent killer of LLM-powered development workflows. Routing high-token, low-judgment tasks to cheap models while reserving expensive reasoning for planning decisions cuts bills by an order of magnitude without sacrificing output quality — and the pattern generalizes to any LLM pipeline, not just Codex.

Summary

The DeepSWE leaderboard shows gpt-5.6-luna topping the chart at $0.61 per task, outperforming models that cost several times more. The pattern behind this is a division of labor: a main Agent handles high-judgment planning while sub-Agents run exploration, testing, and small fixes in parallel using cheaper models. Configuration takes a single TOML file and a one-line invocation — no code required.

Long conversations degrade model performance through Context Rot, where useful information gets buried under noisy intermediate output. Breaking work into short, independent contexts per sub-Agent keeps each thread clean and prevents the cognitive decay that plagues single-threaded chats. Multiple sub-Agents can run simultaneously with separate sandboxes, forming a review team that explores code, checks correctness, and verifies API behavior in parallel.

The same routing logic — expensive models for planning, cheap models for execution — applies beyond Codex to content pipelines and multi-platform workflows. High-judgment stages like headline writing stay on strong models; structured grunt work like YAML assembly and format conversion shifts to lightweight models.

Takeaways
gpt-5.6-luna reaches the top of the DeepSWE leaderboard at $0.61 per task, beating Claude Opus 5 and GPT-5.6 on both cost and score.
Sub-Agent configuration requires only a TOML file specifying name, model, reasoning effort, and developer instructions — no code.
Context Rot degrades model performance as conversations fill with irrelevant details; splitting work into independent short-context tasks prevents this.
Multiple sub-Agents can run in parallel with separate sandboxes — a code explorer, reviewer, and docs researcher all operate simultaneously and report back to the main Agent.
Most execution sub-Agents need only luna + medium reasoning effort; high or max reasoning is reserved for code review and final decision-making.
Sub-Agents suit read-heavy tasks like exploration and testing; multiple Agents writing code simultaneously risks conflicts.
The expensive-model-plans, cheap-model-executes pattern transfers directly to content pipelines — strong models for headlines and hooks, lightweight models for YAML assembly and format conversion.
Conclusions

The DeepSWE data inverts the default assumption that better models produce better results — Luna's cost-effectiveness suggests execution tasks benefit more from parallel throughput than from deep reasoning.

Context Rot is a structural cost of long-running agent conversations that most developers treat as a model failure rather than an architecture failure; splitting contexts is a fix, not a workaround.

The TOML-based sub-Agent configuration mirrors the Skill encapsulation pattern emerging across agent frameworks — define responsibility boundaries first, then execution discipline, then bind the model.

OpenAI's own documentation frames Context Rot as two distinct problems (pollution and rot), but the practical remedy is the same for both: shorter, cleaner contexts.

Concepts & terms
Context Rot
The degradation of LLM performance as a conversation accumulates irrelevant details, causing the model to forget earlier agreements, repeat mistakes, and hallucinate more. OpenAI distinguishes between context pollution (useful information buried under noisy output) and context rot (overall performance decline from overloaded context).
Sub-Agent
A secondary LLM instance configured with a specific model, reasoning effort, and narrow instructions, invoked by a main Agent to handle bounded tasks like code exploration or testing. Each sub-Agent runs with independent context and sandbox permissions.
DeepSWE
A software engineering capability benchmark that evaluates LLMs on development tasks, ranking models by both score and cost per task.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗