G
YouTube TikTok Games
Skip to content

mobile: quota errors show generic "run stopped with an error" instead of the provider error message #64079

Open

Description

@peiliangkrausse-oss

Summary

When a session run fails because of a provider quota error, the mobile app shows a generic toast ("the run stopped with an error") instead of the human-readable error the server already delivers (type provider.free-limit, message "Free usage limit reached. Connect a provider or subscribe to OpenCode Go to keep going, or switch models.", including retryAfterMs). The user has no way to troubleshoot from the phone.

Environment

  • opencode version: 2.2.6
  • OS: macOS (Darwin 27.0.0, arm64) — server; client is the OpenCode mobile app paired via opencode pair --remote
  • Terminal: unavailable (server-side only)
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: usage-band, skillspector, side-chat

Reproduction

  1. Pair the mobile app with the desktop server (opencode pair --remote).
  2. Use a chat whose model is a free OpenCode model (e.g. opencode/glm-5.3-flash-free) until the free usage limit is hit (HTTP 429).
  3. Send a message from the phone app.

Expected Behavior

The app shows the actual cause, e.g. "Free usage limit reached. Connect a provider or subscribe to OpenCode Go to keep going, or switch models." — ideally with the retry time (retryAfterMs ≈ 10.4 h in my case) or a link to the suggested action (switch model / subscribe).

Actual Behavior

The app shows only: "the run stopped with an error". No reason, no retry time, no action.

The structured error is available server-side and to clients; GET /api/session/{id}/message returns an idle message with:

{
  "type": "idle",
  "outcome": "failed",
  "error": {
    "type": "provider.free-limit",
    "message": "Free usage limit reached. Connect a provider or subscribe to OpenCode Go to keep going, or switch models.",
    "status": 429,
    "retryAfterMs": 37603000
  }
}

The assistant message in the same session carries the same error object, and the server log records it ("Failed to drain Session", cause AI.Error.QuotaExceeded). So the data needed for a good error message is already being persisted/streamed; the mobile client just does not surface it.

Additional Context

  • Reproduces consistently for any run that ends with this quota error.
  • Workaround on the user side: pick a non-free model (or wait out the limit reset); the generic toast still appears for any future failure regardless.
  • Screenshot of the toast available on request; logs redacted of tokens/URLs.

Activity

  1. opencodejr commented on Nov 15, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report, and for including the error payload the server returns. That makes it clear the cause is available but the app shows only a generic toast.

    The mobile apps are handled by a person on the team. To help them look into it, could you add:

    • The mobile app's own version (it's separate from the server's 2.2.6)
    • Whether it's the Android app or the iOS (TestFlight) app
    • The device model and its Android or iOS version
    • If you can, the screenshot of the toast you mentioned

    You can reply here with the details or edit the issue. If you edit it, please also leave a short comment saying you've updated it, so we know you're done.

    I didn't find an existing report of this display problem. Closely related, ordered by likelihood:

  2. peiliangkrausse-oss commented on Nov 15, 2026

    @peiliangkrausse-oss
    Author

    Replying with the requested details:

    • Platform: iOS app (installed from TestFlight)
    • Device: iPhone 15 Pro
    • iOS version: 27.2.1
    • App version: I couldn't find a version string in the app's settings UI; happy to add it if you tell me where to look.

    Screenshot of the toast: I don't have one captured at the moment — the toast text reads exactly "the run stopped with an error". If a specific capture helps, tell me how to trigger it and I'll attach one.

  3. peiliangkrausse-oss commented on Nov 15, 2026

    @peiliangkrausse-oss
    Author

    App version is 2.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions