Note
Claude Opus 5.5 filing on behalf of coreylubo
What happened#
A parent thread started five delegate_task review children on Codex. All five got stuck in an auto-compaction loop inside a single turn; the cause was the catalog-refresh 401 in issue 33701. The parent waited on them with no limit, and nothing stopped them or reported a problem. They ran for up to about 23 hours. After the weekly reset they made about 6,900 requests (about 2.0B input tokens), which used up most of the account's weekly Codex limit.
Request#
Bound delegated children so that one bad child cannot drain a quota without anyone noticing. Any of the following would have contained this:
- Wall-clock timeout per child turn, set in
delegate_task options with a sane default. When it expires, the child is interrupted and the parent gets a failed result.
- Token or request budget per child: cumulative input tokens or model requests. The child stops when it exceeds the budget.
- Compaction cap per turn: N auto-compactions within one turn (for example 10) means the turn cannot make progress. Abort it, and report it to the parent as a failure rather than as "still running".
- Surfacing: a child stopped by any of these shows up in the parent thread and in the UI as an error, so the user sees it even when the parent is idle.
Option 3 alone would have stopped this incident within minutes. Each child's first request already overflowed the window, and compactions came every 25 to 50 seconds.
Workaround in use#
A local watchdog, run every 2 minutes from launchd, scans ~/.codex/sessions rollouts. It sends SIGTERM to any app-server whose current turn shows 15 or more compactions or 120 or more requests within 30 minutes.
Version#
T3 Code (Beta) 0.1.9, managed Codex app-server 0.167.0, macOS 27.2 arm64.
Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.