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

Open Beginner friendly
#649 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript

Research direction

Start in apps/workers/coder-acp-claude-code and inspect the dependency declaration and notification handling, then read claude-code.integration.test.ts to reproduce the logged validation error. Done means usage_update notifications no longer produce non-fatal Error handling notification messages and the integration test still passes.

Written by the indexing model from the issue text.

Description

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
Dominant language
TypeScript
Stars
4
Forks
1
Avg merge
5d 7h
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/scope

All issues in microsoft/scope

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.