anthropics / anthropics/claude-code-action

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

Open
#806 1 comment 0 reactions 1 assignee Claimed by @ashwin-ant View on GitHub
bug p1
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

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

```log
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: https://github.com/CherryHQ/cherry-studio/commit/43a48a4a38f1ae970d32c466ea9e60013f517841

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.