Skip to content

Ask a Codex title again when gpt-6-luna refuses it for rate limits - #3449

Merged
max-sixty merged 2 commits into
mainfrom
codex-title-retry
Oct 21, 2026
Merged

max-sixty merged 2 commits into
mainfrom
codex-title-retry

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A Codex thread title that gpt-6-luna refuses with a 429 is now asked again every 5 s, on a new thread, until it is answered or 120 s have passed since its first ask. The retry lives in _name_thread, which both Codex title paths run through: the page server's codex_title and the website host's app_server_title. It stops early once the agent has named the thread. Before this change, a refused title was logged as thread_title_failed. On App Server turns and the website, nothing else names the thread, so it stayed untitled until the user's next message in it. This implements Max's decision #39 on the overnight report (option A, retry on the same model), which also settles #38.

The decision asked to wait out the delay the 429 names. Codex's backend does name one, as a Retry-After that counts down to a free slot: one refused title was told 33, 30, 28 … 4, 1 s and was answered 39 s after its first refusal. The App Server forwards only responseTooManyFailedAttempts with httpStatusCode 429, and Codex doesn't retry it, so Leaf cannot read that delay. A fixed 5 s interval writes a refused title within 5 s of a slot freeing. The 120 s cap covers two of the roughly one-minute windows the countdown showed. The module header records these numbers and the cap.

Measured against luna on this account (codex-cli 0.160):

  • Before: 12 titles asked back to back. Titles 10 and 11 failed with a 429 after 1.5–1.8 s and stayed untitled.
  • After, back to back: all 12 were written. One was refused three times and was written 20 s late; the others had no refusal.
  • After, all 12 at once (a burst of comments): six were refused, as in the decision's reading, and each was written 41–48 s after its first ask. All 12 were written in 53 s.

thread_title_generated records now carry refusals and refusedMs, the time from the first ask to the ask that was answered. thread_title_failed records carry refusals. The Codex journey waits RETRY_FOR + TIMEOUT for a title instead of 60 s, so a title that had to wait out a refusal still counts.

A new test covers both paths through the retry with an App Server stand-in. A title refused twice is written on its third ask, and a title refused past the cap fails as RateLimited. With the retry removed, the test fails.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 20, 2026 23:58
A Codex thread title that gpt-6-luna refuses with a 429 is now asked again every 5 s, on a new thread, until it is answered or 120 s have passed since its first ask. The retry lives in `_name_thread`, which both Codex title paths run through: the page server's `codex_title` and the website host's `app_server_title`. It stops early once the agent has named the thread. Before this change, a refused title was logged as `thread_title_failed`. On App Server turns and the website, nothing else names the thread, so it stayed untitled until the user's next message in it. This implements Max's decision #39 on the overnight report (option A, retry on the same model), which also settles #38.

The decision asked to wait out the delay the 429 names. Codex's backend does name one, as a `Retry-After` that counts down to a free slot: one refused title was told 33, 30, 28 … 4, 1 s and was answered 39 s after its first refusal. The App Server forwards only `responseTooManyFailedAttempts` with `httpStatusCode` 429, and Codex doesn't retry it, so Leaf cannot read that delay. A fixed 5 s interval writes a refused title within 5 s of a slot freeing. The 120 s cap covers two of the roughly one-minute windows the countdown showed. The module header records these numbers and the cap.

Measured against luna on this account (codex-cli 0.160):

- **Before:** 12 titles asked back to back. Titles 10 and 11 failed with a 429 after 1.5–1.8 s and stayed untitled.
- **After, back to back:** all 12 were written. One was refused three times and was written 20 s late; the others had no refusal.
- **After, all 12 at once (a burst of comments):** six were refused, as in the decision's reading, and each was written 41–48 s after its first ask. All 12 were written in 53 s.

`thread_title_generated` records now carry `refusals` and `refusedMs`, the time from the first ask to the ask that was answered. `thread_title_failed` records carry `refusals`. The Codex journey waits `RETRY_FOR + TIMEOUT` for a title instead of 60 s, so a title that had to wait out a refusal still counts.

A new test covers both paths through the retry with an App Server stand-in. A title refused twice is written on its third ask, and a title refused past the cap fails as `RateLimited`. With the retry removed, the test fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 8bc8be3 into main Oct 21, 2026
3 checks passed
@max-sixty
max-sixty deleted the codex-title-retry branch October 21, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants