Skip to content

SDK crash with AJV error using claude_code_oauth_token - same as #852/#853 #872

@tjarko

Description

@tjarko

Description

Claude Code Review workflow crashes immediately with AJV validation error when using claude_code_oauth_token. This appears to be the same issue as #852 and #853.

Error Output

{
  "type": "result",
  "subtype": "success",
  "is_error": true,
  "duration_ms": 261,
  "num_turns": 1,
  "total_cost_usd": 0,
  "permission_denials": []
}

SDK execution error: 14 |     depsCount: ${Q},
15 |     deps: ${$}}`};var Pj={keyword:"dependencies",type:"object",schemaType:"object"...

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

Key Observations

  • duration_ms: ~261ms - crashes almost instantly
  • total_cost_usd: 0 - no API calls made
  • Consistent failure - re-running produces same error
  • Error is from AJV (JSON Schema validator) in the SDK

Failed Run

https://github.com/tjarko/ReelMoments/actions/runs/21442022109/job/61747809187

Workflow Configuration

name: Claude PR Review

on:
  pull_request:
    types: [opened, synchronize, reopened]

permissions:
  contents: read
  pull-requests: write
  id-token: write

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Claude Code Review
        uses: anthropics/claude-code-action@v1
        with:
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
          claude_args: '--model claude-sonnet-4-20250514 --timeout 900000'
          prompt: |
            Review this PR against our CLAUDE.md standards...

Environment

  • Runner: ubuntu-latest
  • Action: anthropics/claude-code-action@v1
  • Auth method: claude_code_oauth_token

Related Issues

Notes

Per #852 comments, one user resolved this by switching from claude_code_oauth_token to anthropic_api_key. This suggests the underlying issue is authentication failing, but the SDK crashes with a confusing AJV error instead of surfacing the auth error properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:installationbugSomething isn't workingduplicateThis issue or pull request already existsp1Showstopper bug preventing substantial subset of users from using the product, or incorrect docsprovider:1pAnthropic First-Party API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions