[FEATURE]: Claude Agent: per-session cap on provider requests

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

The payload names no source files, so start by locating where OpenCode's Claude Agent transport issues provider requests and how its retry hook interacts with the Claude Code subprocess. The issue asks for an opt-in per-session cap that blocks any second model request, including retries, continuation and fallback, before it is sent, and that returns a redacted attempt count. Done means a local fake-provider test showing zero requests during setup and exactly one request for success, a retryable error, an empty reply, and a disconnect after receipt, with default behavior unchanged.

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

説明

area/providers type/feature version/v2
Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

Please add an opt-in per-session provider-request cap for Claude Agent. With a cap of one, the transport must stop a second model request before it is sent, including retries, continuation calls, and model or account fallback. If it cannot enforce the cap, reject the session request before sending anything. Return a redacted count of actual attempts and preserve the normal assistant result and existing connection. Leave default behavior unchanged.

In OpenCode 2.4.2 with Claude Code 2.1.330, OpenCode's retry hook can veto host retries, but its HTTP hooks do not see requests from the Claude Code subprocess. The Claude Agent library's maxTurns option limits conversation turns, not provider attempts. A hard cap would let test and quota-sensitive automation make a single model request without risking a hidden retry.

Suggested test: with a local fake provider, verify zero requests during setup and one per case for success, a retryable error, an empty reply, and a disconnect after receipt. Related: #64749 covers rate-limit waiting, not a transport-level cap.

主要言語
TypeScript
スター
230k
フォーク
31.3k
平均マージ
5時間 32分
マージ済み PR(30日)
453

環境構築

はじめの一歩

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

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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