High-level SDK cannot authenticate current ACP adapters with dynamic auth methods
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- api, authentication
調査の方向性
Start at LiveAcpConnection.create and its private autoAuthenticate helper, then compare initialization capabilities and authenticate support in the low-level acp-http-client. Reproduce the Codex flow with the advertised api-key method and the Claude gateway capability. Done means clients can handle adapter-advertised methods and authentication failures are diagnosable.
索引モデルが issue の本文から書いたものです。
説明
Summary
The high-level TypeScript SDK cannot authenticate ACP adapters whose advertised authentication methods differ from the three method IDs hard-coded in autoAuthenticate. It also does not expose a public way to send an arbitrary ACP authenticate request or advertise authentication-related client capabilities.
This currently breaks the official Codex adapter 1.x API-key flow and prevents clients from using the official Claude/Codex custom gateway authentication flow through the high-level SDK.
Versions tested
- sandbox-agent: 0.4.2
- acp-http-client: 0.4.2
- @agentclientprotocol/sdk: 0.16.1
- @agentclientprotocol/codex-acp: 1.10.0
The same hard-coded authentication logic is still present on main at the time of filing.
Current behavior
LiveAcpConnection.create() initializes the ACP connection and calls a private autoAuthenticate() helper. That helper only considers:
codex-api-key
openai-api-key
anthropic-api-key
Current Codex ACP 1.x advertises:
[
{ "id": "api-key" },
{ "id": "chat-gpt" }
]
As a result, the high-level SDK does not call authenticate, and session creation fails with Authentication required (or an equivalent wrapped ACP error), even when CODEX_API_KEY or OPENAI_API_KEY is available to the adapter process.
The high-level SDK also does not expose its AcpHttpClient, a generic authenticate(request) method, or an authentication callback. Consumers therefore cannot recover by selecting the advertised method themselves.
The authentication call is also best-effort and its error is swallowed, which makes diagnostics difficult.
Claude/custom gateway case
The maintained Claude ACP adapter advertises its gateway auth method only when the client sends the corresponding capability during initialize:
{
"clientCapabilities": {
"auth": {
"_meta": {
"gateway": true
}
}
}
}
The client must then send an explicit request such as:
{
"methodId": "gateway",
"_meta": {
"gateway": {
"baseUrl": "https://gateway.example.com",
"headers": {
"Authorization": "Bearer <redacted>"
}
}
}
}
The low-level acp-http-client supports both operations. The high-level SDK currently supplies no authentication-related clientCapabilities during initialization and provides no way to issue the explicit authentication request.
Minimal reproduction
- Start an official sandbox-agent 0.4.2 server.
- Install or use @agentclientprotocol/codex-acp 1.10.0.
- Make CODEX_API_KEY available to the adapter process.
- Connect with the high-level sandbox-agent TypeScript SDK.
- Create a Codex session.
Observed initialize response:
{
"authMethods": [
{ "id": "api-key", "name": "API Key" },
{ "id": "chat-gpt", "name": "ChatGPT" }
]
}
Observed result: session creation fails because no authentication method is selected.
Using the official low-level acp-http-client against the same server succeeds when calling:
await client.authenticate({ methodId: "api-key" });
Expected behavior
The high-level SDK should allow applications to handle the authentication methods advertised by the active adapter, without depending on a fixed list of adapter-specific method IDs.
Possible API shapes include:
- Expose a public authenticate(agent, request) or connection-level authenticate(request) method.
- Accept clientCapabilities and an authentication selector or callback in the connection options.
- Optionally retain automatic authentication for known environment-backed methods, but derive it from advertised method metadata and keep aliases for older adapters.
- Surface authentication failures instead of silently swallowing them, or expose them through a diagnostic callback.
Compatibility concern
sandbox-agent install-agent normally resolves adapters from the live ACP registry. Adapter versions therefore evolve independently of the high-level SDK release. A hard-coded method-ID list can become incompatible even when both components are installed through their documented, official paths.
Related
- #187 requested an explicit SDK or session option to force the Codex auth method.
- #154 reported Codex credentials being detected while prompt authentication still failed.
- 主要言語
- TypeScript
- スター
- 1.6k
- フォーク
- 131
- 平均マージ
- 7時間 40分
- マージ済み PR(30日)
- 29
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rivet-dev/agents のほかの issue
-
skills add rivet-dev/skills -s sandbox-agent fails: the skill was removed from rivet-dev/skillsオープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
rivet-dev/agents#319 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
bug: codex model variants are out of order対応中かも @c7ozkan が 204 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
rivet-dev/agents の issue をすべて見る
似ている issue
-
Bayern feature:Application ready web
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
digitalfabrik/entitlementcard#3176 ·
メンテナーはふだん 7 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NanmiCoder/cc-haha#1533 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
🐛 Bug: Calendar work items cannot be opened on mobile対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100