Model Selection Strategy in the Subagent Workflow: Tiered AI Agent Deployment

The subagent workflow employs a cost-efficient tiered strategy that assigns lightweight models like gpt-3.5-turbo to mechanical coding tasks while reserving the most capable models such as gpt-4-turbo for architecture, design, and critical reviews.

The openai/plugins repository implements an intelligent model selection strategy within its subagent-driven-development skill to optimize both performance and cost. This system categorizes subagent tasks by complexity and risk, then maps each category to an appropriate language model tier. By dynamically selecting models based on workload requirements, the workflow minimizes token expenditure without compromising code quality.

Task-Based Model Tiers in Subagent Workflows

According to plugins/superpowers/skills/subagent-driven-development/SKILL.md, the controller classifies each subagent's work into specific categories before spawning. This classification determines both the model and reasoning_effort parameters passed to the spawn_agent function.

Mechanical Implementation Tasks

For isolated functions with clear specifications affecting 1-2 files, the workflow selects fast, cheap models such as gpt-3.5-turbo. These deterministic tasks require minimal reasoning, making smaller models sufficient and cost-effective while maintaining high speed.

Integration and Judgement Tasks

When subagents handle multi-file coordination, pattern matching, or debugging, the system deploys standard mid-tier models (e.g., gpt-4-base). These operations require additional context and reasoning capabilities but do not necessitate the highest-capability tier.

Architecture and Design Decisions

High-level planning and system-wide architectural choices receive the most capable model available (e.g., gpt-4-turbo). The complex reasoning involved in these tasks benefits maximally from advanced model capabilities and broad context windows.

Review and Diff Analysis

Code reviews scale model selection to match diff size and risk. Small, mechanical diffs use cheap-to-mid tier models, while subtle, high-risk changes require stronger models for accurate detection of intricate issues. The plugins/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md template implements this scaling logic.

Whole-Branch Final Reviews

Comprehensive branch audits always utilize the most capable model, overriding any session defaults to ensure the highest quality reasoning for final validation regardless of previous subagent tiers.

Enforcing Model Selection Through spawn_agent

The workflow enforces tier compliance through explicit parameters in the spawn_agent call. As documented in plugins/superpowers/skills/using-superpowers/references/codex-tools.md, every spawn must specify both the model and reasoning_effort fields to prevent subagents from inheriting the parent's default model.

The strategy follows the explicit rule from the Model Selection section: "Use the least powerful model that can handle each role to conserve cost and increase speed."


# Example: spawning a mechanical implementation subagent

spawn_agent({
    "model": "gpt-3.5-turbo",          # cheap, fast model

    "reasoning_effort": "low",        # mechanical task tier

    "fork_turns": "none",             # clean context

    "prompt": "...implement function..."
})

# Example: spawning an architecture subagent

spawn_agent({
    "model": "gpt-4-turbo",           # most capable model

    "reasoning_effort": "high",       # architecture/design tier

    "fork_turns": "none",
    "prompt": "...design system component..."
})

# Example: spawning a review subagent for a small diff

spawn_agent({
    "model": "gpt-3.5-turbo",          # cheap model sufficient for small diff

    "reasoning_effort": "medium",
    "fork_turns": "none",
    "prompt": "...review diff..."
})

Source Code References

Key files implementing this strategy include:

Summary

  • The subagent workflow uses a tiered model selection strategy based on task complexity and risk assessment
  • Mechanical tasks use gpt-3.5-turbo while architecture and final reviews require gpt-4-turbo or the most capable available model
  • The spawn_agent function requires explicit model and reasoning_effort parameters to enforce tier compliance
  • Review tasks dynamically scale model capability to match diff size and potential risk
  • This approach follows the core principle: "Use the least powerful model that can handle each role to conserve cost and increase speed"

Frequently Asked Questions

What determines which model tier is selected for a subagent?

The controller classifies the upcoming subagent's work into categories—mechanical, integration, architecture, or review—then selects the appropriate tier based on the complexity, scope, and risk associated with the task. This classification happens before the spawn_agent call is executed.

How does spawn_agent enforce model tiers?

Each spawn_agent call must include explicit model and reasoning_effort fields, ensuring the child subagent uses the designated tier rather than defaulting to the parent agent's configuration. This requirement prevents costly model upgrades from accidental inheritance.

Why not use the most capable model for all subagent tasks?

Using cheaper models for deterministic mechanical work significantly reduces token costs and increases execution speed while reserving expensive high-capability models only for tasks requiring complex reasoning. The tiered approach optimizes the cost-quality ratio across the entire workflow.

What is the reasoning_effort parameter?

The reasoning_effort field accompanies the model parameter in spawn_agent calls to indicate the complexity tier (low, medium, high) and ensure the subagent operates at the appropriate cognitive level for its assigned task, as defined in the codex-tools reference documentation.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →