Description
Before submitting
- I searched existing issues and did not find a duplicate. (Related: [Bug]: OpenCode Go usage limit fails threads as a generic provider error: no reset time, no auto-resume, not exposed to orchestrator MCP tools #16366 was closed by fix(opencode): OpenCode Go quota stops show as usage limits #18315, which noted "OpenCode doesn't send a reset time in these events, so none is shown yet". [Bug]: Orchestrator V2 Usage Reset Tracker Broken #14169 / fix(server): Codex usage-limit stops keep their reset time #18721 cover the Codex provider, not OpenCode.)
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Connect the OpenCode provider (OpenCode 2.x) to a ChatGPT subscription through OpenAI OAuth.
- Run a thread on a ChatGPT-backed OpenAI model, such as
openai/gpt-6-astra, until the Codex usage window is exhausted. - Look at the failed thread.
Expected behavior
The usage-limit failure carries the reset time ChatGPT reports. The thread shows "Resets …" with the resume-at-reset and snooze actions, and auto-resume arms for that time.
Actual behavior
The thread fails as usage_limit with no resetAt. It shows "Reset time unavailable; retry manually", hides the resume and snooze actions, and never auto-resumes.
Stored failure:
{"class":"usage_limit","message":"The usage limit has been reached","code":"provider.quota","retryable":null}ChatGPT does report the reset. Its 429 body is:
{"error":{"type":"usage_limit_reached","message":"The usage limit has been reached","plan_type":"plus","resets_at":1788753614,"resets_in_seconds":57361}}OpenCode 2 forwards this as error.response.body on session.execution.failed, but the OpenCode 2 adapter (packages/provider-opencode/src/server/v2/adapter.ts) only reads type, message, and status.
Impact
Major degradation or frequent failure
Version or commit
main @ 67661cf
Environment
Linux (Omarchy), T3 Code, OpenCode 2.1.3, ChatGPT Plus via OpenAI OAuth, openai/gpt-6-astra
Workaround
Check the reset time manually (ChatGPT/Codex usage settings) and resend after it passes.
Proposed fix: #26264
Activity