Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Pair a High-Capability Coding Planner With a Low-Cost Executor

Overview

Run the main Codex thread on a stronger model to plan a change, and define a custom Codex agent on a lighter, lower-cost model that carries out each clearly scoped step as a subagent.

Problem or Objective

More in Coding and Code Review

AI Agents and Models

Tools and Integrations

Tools
Codex
Prerequisites
A current local Codex client (CLI or IDE) signed in with a plan that offers both a stronger and a lighter model, and a project with tests.

How It Works

In your project, create a custom agent file under .codex/agents/, for example executor.toml, with a name, a description and developer instructions: follow the plan step exactly, touch only the files named, run the tests and report what changed and anything unclear instead of guessing. Set its model to a lighter, lower-cost model; the subagents guide suggests one for fast, narrowly scoped, repeatable work. Keep your main session on a stronger model for planning. Ask Codex to write a numbered plan for the change, with the files, the expected behaviour and the test for each step, and read the plan yourself. Then ask it to spawn the executor for each step, wait for the results and check every summary against the plan. Review the combined diff and run the full test suite before you commit. If the executor keeps getting a step wrong, move that step back to the main thread or raise its reasoning effort.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Codex CLI.
  2. Connect the toolsConnect the tools this workflow relies on: Codex.
  3. Check the prerequisitesA current local Codex client (CLI or IDE) signed in with a plan that offers both a stronger and a lighter model, and a project with tests.
  4. Gather your detailsCollect what the prompt asks for: The change you want, Name of your custom executor agent, Command that runs the tests.
  5. Run the starter promptPaste the starter prompt below into Codex CLI and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at developers.openai.com before you rely on it.

Practical Starter Prompt: Plan, then delegate each step

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
Plan this change: [The change you want]. Write a numbered plan where each step names the files to edit, the expected behaviour and the test that proves it. Show me the plan and wait for my approval. Then, for each step in order, spawn the [Name of your custom executor agent] agent with only that step and the relevant files, wait for its result, and check its summary and diff against the plan. If a step fails twice, do it yourself. At the end, run [Command that runs the tests] and give me a summary of every change. Do not commit or push.

Run this in a Codex session on your stronger model, with the executor defined in .codex/agents/ on a lighter model. Approve the plan before delegation starts, and review the diff and test results yourself before you commit.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. The Codex subagents guide documents custom agents defined as TOML files that can set their own model and reasoning effort, recommends a lighter model for lower-cost work, and explains that a model set in the file takes precedence. It does not measure savings or quality for a planner and executor split, so both are untested here.

Limitations and Considerations

Subagents consume more tokens than a single-agent run because each one does its own model and tool work, so a cheaper executor saves money only when the steps are small and clear. Custom agents inherit the parent session's permissions and sandbox, so set those on the main session. Which models you can pick depends on your plan and client; check the model picker. Review the full diff and tests yourself before committing, since a summary from a subagent is not proof that the step is correct. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

AI Agent Repository

Source code of the agent that does the work.

Official Website

The official site of the main tool or project in this use case.

Visit Website (opens in a new tab)developers.openai.com

Related Videos

About openai/codex

Independent creators. Listing a video implies no endorsement, sponsorship or partnership.

Sources

  1. Subagents | ChatGPT Learn (opens in a new tab)

    Project documentation · developers.openai.com · Undated · Source checked 25 Nov 2026, 12:11 UTC

    What this source supports
    • Each file defines one custom agent.
    • If a custom agent file sets model or model_reasoning_effort , the value in the file takes precedence.
    • Use gpt-6-luna for lighter, lower-cost work.
    • Subagent workflows consume more tokens than comparable single-agent runs because each subagent does its own model and tool work.
  2. openai/codex README (opens in a new tab)

    Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC

    What this source supports
    • Codex CLI is a coding agent from OpenAI that runs locally on your computer.
Report a problem

More with Codex CLI

Planned, not done

Use Computer Control to Share a Finished Video in Slack

Use Codex Computer Use in the ChatGPT desktop app to operate the Slack desktop app: gather feedback from a thread, then post a finished video file to a channel after you approve the message.

developers.openai.comopenai/codex
Reported by source

Answer technical questions by letting async agents run experiments

Simon Willison sends research questions to cloud coding agents such as Claude Code for web and Codex Cloud, which write and run experiments in a dedicated repo and open a PR.

simonwillison.net · 6 Nov 2025anthropics/claude-code, openai/codex
Planned, not done

Publish an AI-Aided BaZi Reading Application

Use Codex to build a small web app that computes BaZi charts from a birth date and time with tested code, adds model-written readings on top, and offers the interface in more than one language.

developers.openai.comopenai/codex

View all: Codex CLI