feat: auto-continue after server overload - #16
Conversation
|
Thanks for your pr, I'll check this later. |
2f7e649 to
149a3f5
Compare
|
The staged Continue is submitted immediately after the failing turn ends. If the model stays overloaded, this becomes an infinite immediate-retry loop that hammers the API and floods the transcript with error / Continue pairs. Suggested fix (fine as a follow-up): add a delay and a retry budget — e.g. wait 30s before the first retry and increase the delay on each subsequent attempt (30s, 60s, 120s, …), then stop after ~5 attempts and leave the error on screen for the user. Reset the counter once a turn completes successfully. |
|
@Loongphy I chose 15 seconds for the first retry because transient overloads often clear quickly, and an immediate retry frequently succeeds. Waiting the full 30 seconds before the first attempt would add unnecessary latency in those cases. |
What changed
Continueafter aServerOverloadederror.ServerOverloadedis kept separate fromUsageLimitExceeded, preserving the existing usage-limit behavior.Continueentries are prevented by deduplicating the locally rendered prompt and its app-server echo using bothturn_idand message content.Why
When the selected model is overloaded, the current turn ends with
Selected model is at capacity. Previously, the user had to submit a continuation manually. Codext now starts the next turn automatically so work can continue without manual intervention.Configuration
Auto-continuation is enabled by default. To disable it, add the following to
config.toml:Validation
cargo build -p codex-clicargo build --release -p codex-cligit diff --checkTests and snapshot files were not changed, in accordance with the temporary
rust-v0.145.0reapply guardrails.