anthropics / anthropics/claude-code-action

SDK crash on v1.0.69: exit code 1, AJV validation failure before API call

Open
#1,013 13 comments 14 reactions 0 assignees View on GitHub
area:installation bug p1 provider:1p
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

## Summary

`claude-code-action@v1` (resolving to v1.0.69, released 2026-03-05T00:26:18Z) crashes immediately with exit code 1 before making any API calls. The OIDC auth succeeds, Claude Code initializes, but then crashes within 257ms with $0 cost.

## Environment

- **Action version:** `anthropics/claude-code-action@v1` (resolved to v1.0.69)
- **Auth method:** `anthropic_api_key` + OIDC (default GitHub App)
- **Runner:** ubuntu-latest
- **Model:** claude-sonnet-4-20250514
- **Trigger:** `pull_request` event

## Workflow

```yaml
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
use_sticky_comment: true
include_fix_links: true
prompt: |
REPO: ...
PR NUMBER: ...
Review this pull request...
claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Glob,Grep"
--model claude-sonnet-4-20250514
--max-turns 5
```

## Error Output

```json
{
"type": "result",
"subtype": "success",
"is_error": true,
"duration_ms": 257,
"num_turns": 1,
"total_cost_usd": 0,
"permission_denials_count": 0
}
```

Followed by:
```
SDK execution error: 14 | depsCount: ${X},
15 | deps: ${Y}}`};var mI={keyword:"dependencies"...
```

And:
```
error: Claude Code process exited with code 1
at Y (/home/runner/work/_actions/anthropics/claude-code-action/v1/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:19:9428)
```

## Analysis

- OIDC token exchange succeeds (this was a separate issue we fixed)
- Claude Code initializes successfully with the correct model
- Crash occurs before any API call (0 cost, 257ms)
- The stack trace references AJV schema validation (`depsCount`, `deps`, `dependencies` keyword)
- This matches the pattern from #965 and #980 but `claude_args` contain no `#` characters

## Failed Run

https://github.com/Lyssin/lyssin/actions/runs/22701259310/job/65818603563

## Likely Regression

v1.0.69 was released ~3 hours before this failure. v1.0.68 (released earlier the same day) may not have this issue. The AJV validation crash pattern has recurred across multiple versions (#965, #980).

Contributor guide

Open the contributing guide

Research direction

Reproduce the failed workflow from run 22701259310 using claude-code-action@v1, then compare the behavior of v1.0.68 and v1.0.69. Start with the AJV-related stack trace in @anthropic-ai/claude-agent-sdk/sdk.mjs and the recurring reports in #965 and #980; done means the action validates successfully and reaches an API call without exiting with code 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.