plugins: http.request quota refusals bypass session.retry

オープン
#65,198 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
18/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
devtools

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
227k
フォーク
30.7k
平均マージ
3時間 57分
マージ済み PR(30日)
484

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。