Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Leave
textGenerationModelSelectionat its default (codex/gpt-6-luna), while having another provider enabled and selected for chat (e.g., Antigravitygemini-4-hydrogen). - Have the Codex
/responsesendpoint reject requests with403 Forbidden(for example, via a local proxy quota-protection rule when 5h Codex usage reaches threshold, or any non-retryable 403 block ongpt-6-luna/ Codex Official). - Start a new thread and send any message using the non-Codex provider (Antigravity).
Expected behavior
- Non-retryable failures such as HTTP
403 Forbidden(or quota/auth rejections) inTextGeneration.generate/ThreadTitleRegenerationService.executeshould not be retried repeatedly, and should either abort immediately or fall back to another healthy/enabled provider/model. - Users should also have a way to disable automatic background thread title generation (
textGenerationModelSelection: nullor a dedicated toggle) when they do not want background model calls triggered on every new thread.
Actual behavior
Every new thread fires up to 18 failing gpt-6-luna requests in ~30 seconds due to two stacked retry layers, even though the active chat thread isn't using Codex at all:
- Codex CLI reconnect loop (6 HTTP requests per invocation):
codexCLI (v0.172.0) receives403 Forbiddenand retriesReconnecting... 1/5through5/5before exiting with failure. - Server outer retry loop (3 invocations per initial title):
ThreadTitleRegenerationService.execute(src/orchestration-v2/ThreadTitleRegenerationService.ts) wrapstextGeneration.generateThreadTitlewith:Becauseretry({ times: input.kind.type === "initial" ? 2 : 0, schedule: exponential("2 seconds"), })
TextGeneration.generate(src/textGeneration/TextGeneration.ts) only checks pre-flight provider state (selectedDisabled,exhaustedUsageWindow, etc.) and does not treat a403 Forbiddenfailure as non-retryable or trigger runtime fallback to another enabled provider, it runs all 3 outer attempts × 6 CLI requests = 18 failing403requests per new thread.
Additionally, there is currently no setting in ServerSettings to turn off automatic initial thread title generation (pendingThreadTitleGenerationEffect), so users cannot opt out even if they don't want background title generation.
Impact
Major degradation or frequent failure
Version or commit
0.1.13 (bc0f04d)
Environment
macOS (darwin arm64), T3 Code (Beta) 0.1.13, OpenAI Codex CLI v0.172.0, active chat provider: Antigravity (gemini-4-hydrogen)
Logs or stack traces
{"type":"effect-span","name":"TextGeneration.generateThreadTitle","exit":{"_tag":"Failure","cause":"TextGenerationError: Text generation failed in generateThreadTitle: Codex CLI command failed: OpenAI Codex v0.172.0
--------
model: gpt-6-luna
provider: custom
approval: never
sandbox: read-only
reasoning effort: low
reasoning summaries: none
--------
...
ERROR: Reconnecting... 1/5
ERROR: Reconnecting... 2/5
ERROR: Reconnecting... 3/5
ERROR: Reconnecting... 4/5
ERROR: Reconnecting... 5/5
ERROR: unexpected status 403 Forbidden: ... model: gpt-6-luna ...
at runCodexJson.runCodexCommand
at runCodexJson
at CodexTextGeneration.generateThreadTitle
at ProviderInstallationGate.execute
at TextGeneration.generate"}}
Observed sequence in server.trace.ndjson for a single new thread (UTC):
- Attempt 1:
07:23:58.874Z -> 07:24:08.405Z(TextGeneration.generateThreadTitleFailure, 6 HTTP 403s) - Attempt 2:
07:24:10.410Z -> 07:24:18.744Z(TextGeneration.generateThreadTitleFailure, 6 HTTP 403s) - Attempt 3:
07:24:22.747Z -> 07:24:30.627Z(TextGeneration.generateThreadTitleFailure, 6 HTTP 403s) - Outer span:
07:23:58.864Z -> 07:24:30.637Z(ThreadTitleRegenerationService.execute)
Workaround
Change Settings → Providers → Thread titles and other generated text (textGenerationModelSelection) away from the default Codex gpt-6-luna to another enabled provider/model (e.g. Antigravity or a dedicated Text Generator API). There is currently no way to disable auto-title generation entirely.
Activity