Skip to content

Title: claude-sonnet-4-6 silent-fails with repeated empty turns (stop_reason: null, output_tokens: 8) — reproduces on v1.0.100 and v1.0.101 #1243

@GDSan

Description

@GDSan

On claude-sonnet-4-6, claude-code-action reproducibly returns empty assistant turns in a tight loop (stop_reason: null, output_tokens: 8, rate ~2–3/sec). The action keeps retrying for ~20 minutes, then the workflow step exits as success with no artifacts produced — no commits, no branch, no result payload. The workflow cannot distinguish this failure mode from a normal completion.

Switching to claude-opus-4-7 on the same prompt, same tool scaffold, same repository state produces a clean run in ~12 minutes that commits and pushes the expected files. So the issue is Sonnet-specific (or at least Sonnet-sensitive), not a prompt or scaffold issue.

Pinning to v1.0.100 (claude-code 2.1.113 / Agent SDK 0.2.113) reproduces the same signature as v1.0.101 (claude-code 2.1.114), so the 2.1.114 internal bump is not the cause.

Reproduction

Versions tested (identical signature on both):

  • anthropics/claude-code-action@v1.0.101 (currently @v1)
  • anthropics/claude-code-action@0d2971c794049856e777f4e8bb5a81623ec632d3 (v1.0.100, pinned manually)

Model: claude-sonnet-4-6

Invocation: claude-code-action in a GitHub Actions workflow, triggered by @developer in an issue comment. Prompt is a ~60-line agent brief instructing Claude to read a skill file, load a linked implementation plan, and execute it (code edits, test updates, commit, push). claude_args includes --model claude-sonnet-4-6 --allowedTools "Bash(...),Read,Write,Edit,Edit(**),Write(**)".

Three runs, same signature, repo <your-repo>:

Run ID | Version | Outcome -- | -- | -- 24679711304 | v1.0.101 / 2.1.114 | silent-fail 24681760292 | v1.0.101 / 2.1.114 | silent-fail 24685076712 | v1.0.100 / 2.1.113 | silent-fail, same signature

Log signature (excerpt from run 24685076712, developer job):

2026-04-20T19:07:08.8289Z     "stop_reason": null,
2026-04-20T19:07:08.8293Z       "output_tokens": 8,
2026-04-20T19:07:09.2510Z     "stop_reason": null,
2026-04-20T19:07:09.2513Z       "output_tokens": 8,
2026-04-20T19:07:09.7397Z     "stop_reason": null,
2026-04-20T19:07:09.7414Z       "output_tokens": 8,
... (continues for ~20 min at ~2–3 empty turns/sec)

Control run (same workflow, same issue, claude-opus-4-7): developer-rescue job in the same run (24685076712) — completed successfully in 12 minutes, pushed 2 commits (e937bc9a, 74314772) to a feature branch, posted the expected follow-up comment on the issue.

Impact

  • Step conclusion is success in the GitHub Actions API despite no artifacts produced — downstream steps and assertions (ACC-style contracts) cannot distinguish "completed cleanly" from "returned empty".
  • The ~20-minute empty-retry loop consumes API quota with no user value.
  • In our setup, this is routinely burning the Claude Max weekly budget on runs that produce nothing.

What would help

  • Emit a distinguishable exit status (or populate result with an error marker) when output_tokens <= N and stop_reason: null persists across >K turns. Today the action succeeds loudly with nothing to show.
  • Surface the underlying model response to the workflow log at a higher level than the raw stream so users can see the empty-turn pattern without grepping raw JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2Non-showstopper bug or popular feature requestprovider:1pAnthropic First-Party API

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions