chore: ACP SDK rejects usage_update notifications from claude-agent-acp

オープン 初心者向け
#649 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript

調査の方向性

apps/workers/coder-acp-claude-code から始めて、依存関係の宣言と通知処理を調べ、次に claude-code.integration.test.ts を読んで記録された検証エラーを再現します。usage_update 通知によって非致命的な Error 処理の通知メッセージが生成されなくなり、統合テストが引き続き成功すれば完了です。

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

説明

author: cedricvidal

Original author: @cedricvidal

Summary

The Claude Code ACP worker (and its integration test) logs noisy Error handling notification messages for usage_update session notifications. The test still passes — these are non-fatal — but the errors clutter logs and may mask real issues.

Error

Error handling notification {
  jsonrpc: '2.0',
  method: 'session/update',
  params: {
    sessionId: '...',
    update: { sessionUpdate: 'usage_update', used: 16690, size: 200000 }
  }
} {
  code: -32602,
  message: 'Invalid params',
  data: {
    _errors: [
      'Invalid input: expected object, received undefined',
      ...
    ]
  }
}

Root Cause

The usage_update notification is a newer ACP protocol feature sent by claude-agent-acp@0.29.1. The pinned @agentclientprotocol/sdk@0.13.1 doesn't have a schema for this notification type, so its JSON-RPC validation layer rejects the shape before it reaches the sessionUpdate handler's default: break; case.

Affected Components

  • apps/workers/coder-acp-claude-code (production worker)
  • Integration test (claude-code.integration.test.ts)

Fix Options

  1. Bump @agentclientprotocol/sdk to a version that includes the usage_update schema (preferred)
  2. Suppress the error by adding a try/catch or custom notification handler at the SDK level (workaround)

Environment

  • @agentclientprotocol/claude-agent-acp: 0.29.1
  • @agentclientprotocol/sdk: 0.13.1
主要言語
TypeScript
スター
4
フォーク
1
平均マージ
5日 7時間
マージ済み PR(30日)
10

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

microsoft/scope のほかの issue

microsoft/scope の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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