plugins: http.request quota refusals bypass session.retry

Abierto
#65,198 1 comentario 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
18/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
devtools

Línea de trabajo

Start with the session hook wrapper in packages/plugin/src/promise/adapter.ts, where the callback is wrapped in Effect.promise, and check how a thrown NativeVaultQuotaPolicyError escapes it. The expected change is a supported way for a hook to return a local provider error so session.retry can fall back. Done means a quota refusal reaches session.retry and the turn continues on the fallback provider. The issue is a maintainer-level design question about the plugin API, so it is not a good first contribution.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area/plugins platform/linux type/feature version/v2
Description

When the Claude OAuth pool is already out of quota, anthropic-auth throws NativeVaultQuotaPolicyError from http.request before sending the model request. OpenCode logs Failed to drain Session, records an unknown error, and never calls session.retry. I reproduced this twice in the main session and once in a subagent. Both had a working non-Anthropic fallback.

Failed to drain Session
NativeVaultQuotaPolicyError: No Claude account has room for this request (weekly limit or your quota floor).

OpenCode wraps the session hook callback in Effect.promise. The anthropic-auth diagnosis confirms that the plugin has no supported way to refuse the request locally as a provider error.

Expected: let the hook return a local error response without sending the request. Pass it through the normal provider error handling so session.retry can switch providers and continue the same turn.

Plugins

@cortexkit/opencode-anthropic-auth 2.16.2, oh-my-opencode-slim 3.0.7 (a052f07a).

OpenCode version

2.3.2

Steps to reproduce
  1. Configure the Anthropic OAuth pool and a non-Anthropic fallback.
  2. With all eligible Claude accounts already out of quota, send a new prompt using Claude.
  3. The turn stops without trying the fallback. The same happens when a subagent starts on Claude.
Operating System

Ubuntu 24.04.5 LTS, arm64.

Terminal

OpenCode TUI in tmux.

Lenguaje dominante
TypeScript
Estrellas
227k
Forks
30.7k
Merge medio
3 h 57 min
PR fusionados (30 d)
484

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de anomalyco/opencode

Todos los issues de anomalyco/opencode

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.