Codex is unable to clean persisted / dated subgents

Open 💬 2 comments Opened Jun 3, 2026 by samuelalake
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.519.81530 (3178)

What subscription do you have?

Pro Max (or highest plan)

What platform is your computer?

Mac Mini, Apple M4

What issue are you seeing?

Already submitted as feedback (id: 019e0ee1-7a60-7db1-9a12-4714e0500ea1) but posting here so it's easier to track.

Codex is unable to close persisted subagents because there's no tool to expose them.

From Codex: "It looks like persisted app subagent/session records, and I don’t currently have a “list all sidebar subagents and close them” tool exposed, only close-by-agent-id."

I have greater than 69+ subagents due to this.

What steps can reproduce the bug?

Feedback ID: 019e0ee1-7a60-7db1-9a12-4714e0500ea1

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #25179
  • #25563
  • #24756

Powered by Codex Action

PurpleDevX · 1 month ago

Compaction purges the subagents IDs from the context, and there's no tool that can be used to get those IDs back, so Codex has no way of closing the subagents.

In a long orchestration agent session, eventually the subagent limit is reached due to the leak and then all further subagents fail to be created.