Skip to content

claude-agent-sdk execution error: JSON Parse error at withSlowLogging #806

@EurFelux

Description

@EurFelux

Describe the bug
I encountered a log error within the SDK, but I have no idea what’s going on.

SDK execution error: 7270 |   return typeof value;
7271 | }
7272 | function withSlowLogging(operation, fn) {
7273 |   const startTime = performance.now();
7274 |   try {
7275 |     return fn();
                  ^
SyntaxError: JSON Parse error: Unexpected identifier "Usage"
      at withSlowLogging (/home/runner/work/_actions/anthropics/claude-code-action/main/base-action/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:7275:12)
      at readMessages (/home/runner/work/_actions/anthropics/claude-code-action/main/base-action/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:7919:27)

Error: Process completed with exit code 1.

Run: https://github.com/CherryHQ/cherry-studio/actions/runs/20840638256/job/59874222002

To Reproduce
Sorry, I’m completely baffled by this. The Claude action settings in this workflow don’t seem to differ significantly from our other workflow settings, yet it keeps failing while the other workflows are working fine.

Expected behavior
Just don't throw an error.

Workflow yml file
https://github.com/CherryHQ/cherry-studio/blob/61aae7376af8a61ccbff5bf2b232657d4d8903b4/.github/workflows/github-issue-tracker.yml#L81

API Provider

BigModel with Anthropic API (GLM 4.7)

Additional context
I made some minor changes to the prompt and args yesterday, and since then every workflow has failed. You can see the diff here: CherryHQ/cherry-studio@43a48a4

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingp1Showstopper bug preventing substantial subset of users from using the product, or incorrect docs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions