<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/from-one-agent-to-a-team-understanding-codex-subagents-80uoydfag" -->

---
title: From One Agent to a Team: Understanding Codex Subagents
description: A hands-on walkthrough of Codex's subagent feature, where the CLI tool delegates parts of a complex task to specialist agents defined via TOML files under...
canonical: https://daily.dev/posts/from-one-agent-to-a-team-understanding-codex-subagents-80uoydfag
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: From One Agent to a Team: Understanding Codex Subagents | daily.dev
og:description: A hands-on walkthrough of Codex's subagent feature, where the CLI tool delegates parts of a complex task to specialist agents defined via TOML files under...
og:url: https://daily.dev/posts/from-one-agent-to-a-team-understanding-codex-subagents-80uoydfag
og:image: https://api.daily.dev/og/posts/80UoYdfAg.png
og:image:alt: From One Agent to a Team: Understanding Codex Subagents
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# From One Agent to a Team: Understanding Codex Subagents

**[Towards Data Science](https://daily.dev/sources/tds)** · 5 min read · 0 upvotes · 0 comments

## Summary

A hands-on walkthrough of Codex's subagent feature, where the CLI tool delegates parts of a complex task to specialist agents defined via TOML files under .codex/agents/. Using a trip-planning case study with a travel logistics agent, budget analyst, and experience researcher, the piece shows how to configure agents, run them concurrently, inspect individual agent threads, and let a main agent synthesize their differing recommendations into one final answer. It also covers when the subagent pattern is useful and how to invoke it via prompts, AGENTS.md, or SKILL.md files.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://towardsdatascience.com/from-one-agent-to-a-team-understanding-codex-subagents>

## Questions this post answers

### How do I define a custom subagent in Codex CLI?

Add a TOML file under the .codex/agents/ directory with three required fields: name, which is how Codex identifies the agent; description, which explains what the agent is; and developer_instructions, which defines how it should behave. A custom agent can also override its own model, reasoning effort, sandbox configuration, tools, and skills, otherwise inheriting these from the main Codex session.

_daily.dev surfaces practical walkthroughs for developers wiring up multi-agent workflows in Codex._

### How many subagent threads can run concurrently in Codex?

The number of concurrent subagent threads is controlled by a project-level setting in .codex/config.toml, and in a typical setup this can be configured to allow up to three subagent threads to run in parallel at once. Each subagent runs in its own thread with independent context and tool activity.

_Developers tuning agent concurrency settings can find configuration walkthroughs like this on daily.dev._

### When should I use the subagent pattern instead of a single AI agent for a task?

The subagent pattern is useful when a task contains several distinct types of work that can be completed independently and then combined, such as researching logistics, budget, and experience for a trip separately. A main agent orchestrates the workflow, collects each specialist's findings, compares tradeoffs, and produces a synthesized final answer rather than repeating or concatenating individual reports.

_daily.dev helps developers weighing single-agent versus multi-agent designs compare real implementation patterns._

## Similar posts on daily.dev

- [How and when to use subagents in Claude Code](https://daily.dev/posts/how-and-when-to-use-subagents-in-claude-code-j8ovmxhum) · Claude · 1 upvotes · 0 comments
- [Subagents have arrived in Gemini CLI](https://daily.dev/posts/subagents-have-arrived-in-gemini-cli-ikiacfqwj) · Google Developers · 0 upvotes · 0 comments
- [Subagents in Gemini CLI Enable Task Delegation and Parallel Agent Workflows](https://daily.dev/posts/subagents-in-gemini-cli-enable-task-delegation-and-parallel-agent-workflows-6vgsv2yyz) · InfoQ · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#cli](https://daily.dev/tags/cli), [#agentic-ai](https://daily.dev/tags/agentic-ai), [#openai-codex](https://daily.dev/tags/openai-codex)

[View this post on daily.dev](https://daily.dev/posts/from-one-agent-to-a-team-understanding-codex-subagents-80uoydfag)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"From One Agent to a Team: Understanding Codex Subagents","url":"https://daily.dev/posts/from-one-agent-to-a-team-understanding-codex-subagents-80uoydfag","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/from-one-agent-to-a-team-understanding-codex-subagents-80uoydfag"},"datePublished":"2026-08-28T17:37:09.092Z","dateModified":"2026-08-28T17:37:32.917Z","description":"A hands-on walkthrough of Codex's subagent feature, where the CLI tool delegates parts of a complex task to specialist agents defined via TOML files under...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e574e9a2dfac8777e7741026ced60cf5?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e574e9a2dfac8777e7741026ced60cf5?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Towards Data Science","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Towards Data Science","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/tds","url":"https://daily.dev/sources/tds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/from-one-agent-to-a-team-understanding-codex-subagents-80uoydfag","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,cli,agentic-ai,openai-codex","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Towards Data Science","item":"https://daily.dev/sources/tds"},{"@type":"ListItem","position":3,"name":"From One Agent to a Team: Understanding Codex Subagents"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/from-one-agent-to-a-team-understanding-codex-subagents-80uoydfag#faq","mainEntity":[{"@type":"Question","name":"How do I define a custom subagent in Codex CLI?","acceptedAnswer":{"@type":"Answer","text":"Add a TOML file under the .codex/agents/ directory with three required fields: name, which is how Codex identifies the agent; description, which explains what the agent is; and developer_instructions, which defines how it should behave. A custom agent can also override its own model, reasoning effort, sandbox configuration, tools, and skills, otherwise inheriting these from the main Codex session. daily.dev surfaces practical walkthroughs for developers wiring up multi-agent workflows in Codex."}},{"@type":"Question","name":"How many subagent threads can run concurrently in Codex?","acceptedAnswer":{"@type":"Answer","text":"The number of concurrent subagent threads is controlled by a project-level setting in .codex/config.toml, and in a typical setup this can be configured to allow up to three subagent threads to run in parallel at once. Each subagent runs in its own thread with independent context and tool activity. Developers tuning agent concurrency settings can find configuration walkthroughs like this on daily.dev."}},{"@type":"Question","name":"When should I use the subagent pattern instead of a single AI agent for a task?","acceptedAnswer":{"@type":"Answer","text":"The subagent pattern is useful when a task contains several distinct types of work that can be completed independently and then combined, such as researching logistics, budget, and experience for a trip separately. A main agent orchestrates the workflow, collects each specialist's findings, compares tradeoffs, and produces a synthesized final answer rather than repeating or concatenating individual reports. daily.dev helps developers weighing single-agent versus multi-agent designs compare real implementation patterns."}}]}
```

