Skip to content

Parallel subagents cause extreme token amplification and repeated compaction #33196

Description

@ctykwz

Summary

On 2026-07-14 between 20:39 and 21:00 (Asia/Shanghai), Codex consumed an unexpectedly large amount of tokens while working on a music_score task.

The task was to analyze how newly added artist-statistics fields should be connected to the data lake and application code.

Observed behavior

A parent session spawned two parallel review subagents:

  • Parent: 019f5688-69ed-7663-98ab-605632b5687c
  • 019f60a3-c2f2-7961-b739-5ed05eadc087 — standards_review
  • 019f60a3-e3ba-7202-afde-e8d88c3d89dc — spec_review

The two subagents started within seconds of each other and showed nearly identical behavior:

  • Approximately 340M cumulative tokens per subagent within about two minutes
  • More than 2,200 token-count events per subagent
  • 10 context compactions per subagent
  • 486 patch-apply events per subagent
  • Repeated context processing despite the task being a bounded review

The aggregate cumulative token count across active sessions reached approximately 1.4B.

Environment

  • Codex Desktop on macOS
  • Subagent CLI: 0.144.2
  • Parent session CLI: 0.144.0-alpha.4
  • OpenAI model provider
  • Reported subagent context window: 353,400 tokens

Expected behavior

Parallel subagents should consume tokens roughly in proportion to the actual work performed. Context compaction and patch application should not enter a replay or retry loop.

Actual behavior

Two parallel subagents appear to have repeatedly reprocessed or replayed the same large context. Their event counts and token growth were almost identical, suggesting duplicated context processing or a compaction/retry loop.

Related issues

Questions

  1. Is parent context duplicated when multiple review subagents are spawned?
  2. Why are thousands of token-count events emitted within minutes?
  3. Can repeated compaction or patch application enter a replay loop?
  4. Is this related to the mixed CLI versions 0.144.0-alpha.4 and 0.144.2?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingcontextIssues related to context management (including compaction)rate-limitsIssues related to rate limits, quotas, and token usage reportingsubagentIssues involving subagents or multi-agent features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions