Skip to content

retry state cannot be explicitly stopped, making revert/reset ineffective and preventing context cleanup after quota recovery #25803

@sch246

Description

@sch246

Description

Description

When a session enters retry state after quota/capacity exhaustion, I can lose control of the session even after I recover the quota and want to clean up the failed/retry noise from the conversation.

A typical sequence looks like this:

  1. The model/provider hits a quota/capacity exhaustion condition.
  2. OpenCode enters retry behavior and keeps trying to continue the run.
  3. I recover the quota / top up credits.
  4. I try to use Desktop UI actions such as "Reset to this point" (or equivalent revert/reset flow) to roll back the repeated quota-failure / unknown-error messages and clean the context.
  5. The reset/revert appears to take effect briefly, but then the session immediately continues again, appends another follow-up message, and the rollback is effectively undone.
  6. No matter how many times I interrupt/cancel, it can keep re-entering the same loop and stay stuck on "Thinking".
  7. The only reliable way I have found to stop it is to close the entire application.

This makes it practically impossible to recover control of the session and clean the context after quota recovery.

Why this is a real usability problem

Even if the upstream/provider error is transient or quota-related, once the session is in retry state there appears to be no reliable way to:

  • explicitly stop the retry
  • stabilize the session
  • clean up the repeated failure messages
  • regain control without closing the whole app

In practice, the retry loop can block recovery actions instead of helping recovery.

Additional notes

There may also be a secondary issue where the repeated "request failed / unknown error" messages are themselves making the context worse, and the retry path might still be performing real calls while degrading the session further.

However, the main problem in this report is not the original provider error itself — it is that once retry is active, I cannot reliably stop it and perform cleanup/revert actions.

Expected behavior

At minimum, users should be able to explicitly stop/cancel the current retry state and regain control of the session without quitting the app.

A retrying session should not keep overriding or invalidating user recovery actions.

Actual behavior

The session can continue retrying indefinitely / repeatedly, re-append messages after a revert/reset attempt, stay stuck on "Thinking", and force a full app shutdown to stop the loop.

Suggested directions

I think there are two related improvements that would help:

  1. Retry should support an explicit termination path

    • users should be able to stop/cancel the current retry state
    • retry should not require closing the whole app to stop
  2. Retry policy should be configurable

    • max attempts
    • exponential backoff strategy
    • max delay / retry budget
    • or similar bounded retry controls

Even if the default remains "retry aggressively", users need a reliable explicit stop path.

Plugins

DCP, oh my opencode

OpenCode version

1.14.33

Steps to reproduce

  1. Run OpenCode Desktop on Windows x64.
  2. Use a provider/model until it hits quota/capacity exhaustion and enters retry behavior.
  3. Restore quota / top up credits.
  4. Attempt to use Reset to this point / revert-like recovery to remove the repeated failure messages and clean the context.
  5. Observe that the session can resume appending messages, effectively undoing the rollback, and remain stuck in a retry/thinking loop.
  6. Try interrupt/cancel repeatedly.
  7. Observe that the loop may continue until the entire app is closed.

Screenshot and/or share link

Image

Operating System

Windows 10 (x64)

Terminal

not a terminal,, that dosen't matter

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions