Working Notes on Agent Systems/Brad Zhang

@teach_fireworks / X longform

What is the difference and connection between Main Agent, SubAgent and Goal in Codex? T...

What is the difference and connection between Main Agent, SubAgent and Goal in Codex? The Main agent is the one who is currently talking to you. It is responsible for understand...

May 16, 2026 · 2 min read

What is the difference and connection between Main Agent, SubAgent and Goal in Codex? T...
Figure 1 / source image

What is the difference and connection between Main Agent, SubAgent and Goal in Codex?

The Main agent is the one who is currently talking to you.

It is responsible for understanding the objectives, operating documents, running commands, communicating with you, and finally integrating the results.

By default all tasks are done by the main agent.

Subagent is a subagent explicitly dispatched by the main agent.

It is suitable for doing side tasks in parallel, such as: - A subagent checking code structure - A subagent running tests/positioning errors - A subagent implementing a certain independent module - The main agent is also doing mainline integration.

However, in the current Codex rules, you can not open subagent automatically.

It will only be enabled if you explicitly say “do it with subagent/parallel proxies/a few agents”.

Goal goal is more like a "task goal recorder/long-term task status".

It records: - whether to complete - optional token budget - the current progress status Goal itself will not perform the work, or the main agent execution, if necessary, the main agent then adjusts the subagent.

Relationship can be simplified to: Goal = Goal to be completed Main agent = Project leader/General controller Subagent = Parallel performer dispatched by main agent A typical usage is: Goal: Fix flyer Codex bridge Main agent: - Read logs - Develop protocols - Modify core code - Integration results - Reply to you Subagent A: - Dedicated analysis Codex provider Subagent B: - Dedicated analysis Feishu CardKit Subagent C: - Dedicated run test and check logs and Claude Code The biggest difference: Claude Code You may often use Task/subagent to explore; Codex here is more restrained, the default main agent single line execution, only you explicitly require "open subagent parallel" will be used.

Visual summary

Article argument map

Generated from the post's content graph

FORMATTOPICCAPABILITYMARKETcoverssignalsFORMATarticle featureTOPICagentsCAPABILITYagent workflow
Mermaid outline
flowchart LR
  format-article["article feature"]
  topic-agents["agents"]
  capability-agent-workflow["agent workflow"]
  format-article -->|covers| topic-agents
  format-article -->|signals| capability-agent-workflow

Visual structure

Essay structure map

Built from summary and key paragraph positions

What is the difference and connection between Main Agent, SubAgent and Goal in Codex?...THESISWhat is the differenceand connection betweenMain Agent, SubAgentand Goal in Codex? TheSIGNALWhat is the differenceand connection betweenMain Agent, SubAgentand Goal in Codex?OPERATORIt is suitable fordoing side tasks inparallel, such as: - Asubagent checking codeIMPLICATIONRelationship can besimplified to: Goal =Goal to be completedMain agent = Project
Mermaid outline
flowchart LR
  thesis["What is the difference and connection between Main Agent, SubAgent and Goal in Codex? The Main agent is the..."]
  signal["What is the difference and connection between Main Agent, SubAgent and Goal in Codex?"]
  operator["It is suitable for doing side tasks in parallel, such as: - A subagent checking code structure - A subagent..."]
  implication["Relationship can be simplified to: Goal = Goal to be completed Main agent = Project leader/General controll..."]
  thesis -->|frames| signal
  signal -->|develops| operator
  operator -->|lands in| implication

Source: View the original post