anomalyco / anomalyco/opencode
ACP silently waits on Go quota limits without reporting the provider error
@fwang is already working on this.
Since Sep 7, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When OpenCode Go rejects a model request because the account's 5-hour quota is exhausted, an ACP client receives neither the quota error nor retry status. session/prompt stays pending until the client cancels or times out.
Observed with OpenCode 1.18.29, opencode-go/glm-5.3, and LouiseLM on Linux. After a completed tool call, OpenCode's native log recorded:
2026-09-07T13:34:59.574Z
AI_APICallError: 5-hour usage limit reached. Resets in 4hr 10min.
The ACP trace then contained no further agent frames before LouiseLM's inactivity watchdog terminated the process 325 seconds after the last update. The watchdog is client behavior, not an OpenCode crash.
Steps to reproduce
- Connect an ACP client to
opencode acpand select an exhausted Go account with balance fallback disabled. - Send a prompt requiring another model request.
- Observe the quota rejection in OpenCode's native log, but no corresponding prompt error or retry information in ACP.
The accompanying regression uses an isolated local HTTP provider, with no credentials: complete a tool, then return HTTP 429 with Retry-After: 15000 and a GoUsageLimitError. The HTTP envelope/header are reconstructed from OpenCode's Go handler; the message and event order were observed live.
Expected behavior
Report the quota/reset reason promptly. Prefer returning a prompt error so the client can leave its busy state; do not silently wait hours.
Suspected cause
Still present in dev at 57ef382: session/retry.ts treats Go quota errors as actionable retries and honors long Retry-After values, while acp/event.ts discards retry status. The attempt cap does not bound the first delay.
Related: #33055, automatically closed for inactivity with an invitation to open a fresh report.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.