anthropics / anthropics/claude-code-action

No error message displayed when Claude runs out of turns

Offen
#823 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
bug dev-experience p3 provider:1p
Vorherrschende Sprache
TypeScript
Sterne
8.9k
Forks
2.1k
Ø Merge
3 T. 9 Std.
Gemergte PRs (30 T.)
10

Beschreibung

**Describe the bug**
When the action hits the maximum number of turns configured by the `--max-turns` flag, the action exits with status code 1, but does not supply an associated error message. The result message contains the subtype `error_max_turns`, but the `errors` property is empty. This property is used [construct the final error message](https://github.com/anthropics/claude-code-action/blob/b6e5a9f27ac3c7d2c2b1542b8670917750e0433f/base-action/src/run-claude-sdk.ts#L215), but as it's empty nothing is displayed (see screenshots below).

**To Reproduce**
Surfacing this error is probably a little non-deterministic. The best way I can think of to reproduce it would be to test a workflow with a small number of turns.

**Expected behavior**
The error message should probably state the error subtype if the errors property is empty.

**Screenshots**
Partial screenshots below showing some information from the result message and the resulting error message upon action exit.
Image
Image

**API Provider**
[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

**Additional context**
I've only tested this with SDK mode. Not sure if this applies to Claude CLI mode.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.