[BUG] Claude Code SDK crashes with exit code 1 in GitHub Actions (v2.1.31)

Resolved 💬 12 comments Opened Feb 4, 2026 by ChrisWiles Closed Mar 24, 2026

Description

Claude Code crashes during SDK initialization when running via GitHub Actions with the claude-code-action@v1. The process exits with code 1 before any actual work can be performed, outputting minified JavaScript code in the error message.

Error Output

SDK execution error: 14 |     depsCount: ${Q},
15 |     deps: ${$}}`};var Zj={keyword:"dependencies",type:"object",schemaType:"object",error:EB.error,code(X){let[Q,$]=Cj(X);RB(X,Q),IB(X,$)}};function Cj({schema:X}){let Q={},$={};for(let Y in X){if(Y==="__proto__")continue;let W=Array.isArray(X[Y])?Q:$;W[Y]=X[Y]}return[Q,$]}function RB(X,Q=X.schema){let{gen:$,data:Y,it:W}=X;if(Object.keys(Q).length===0)return;let J=$.let("missing");for(let G in Q){let H=Q[G];if(H.length===0)continue;let B=(0,W4.propertyInData)($,Y,G,W.opts.ownProperties);if(X.setParams({property:G,depsCount:H.length,deps:H.join(", ")}),W.allErrors)$.if(B,()=>{for(let z of H)(0,W4.checkReportMissingProp)(X,z)});else $.if(fY._\`${B} && (${(0,W4.checkMissingProp)(X,H,J)})\`),(0,W4.reportMissingProp)(X,J),$.else()}}EB.validatePropertyDeps=RB;function IB(X,Q=X.schema){let{gen:$,data:Y,keyword:W,it:J}=X,G=$.name("valid");for(let H in Q){if((0,Sj.alwaysValidSchema)(J,Q[H]))continue;$.if((0,W4.propertyInData)($,Y,H,J.opts.ownProperties),()=>{let B=X.subschema({keyword:W,schemaProp:H},G);X.mergeValidEvalu
[... more minified code ...]

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:7785)
      at emit (node:events:98:22)
      at #handleOnExit (node:child_process:520:14)

Environment

  • Claude Code Version: 2.1.31
  • SDK Version: @anthropic-ai/claude-agent-sdk@0.2.31
  • Runner: ubuntu-latest (GitHub Actions)
  • Model: claude-sonnet-4-5-20250929
  • Max Turns: 30
  • Duration Before Crash: ~468ms

Workflow Configuration

<details>
<summary>Click to expand workflow YAML</summary>

name: Scheduled - Dependency Audit (Claude)
on:
  schedule:
    - cron: '0 17 * * 0'
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

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

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

      - name: Setup Node.js & install deps
        uses: ./.github/actions/common-node-setup
        with:
          github_token: ${{ secrets.BOT_PAT }}
          skip_documentation_site: 'true'

      - name: Claude Dependency Analysis & Update
        uses: anthropics/claude-code-action@v1
        env:
          GH_TOKEN: ${{ secrets.BOT_PAT }}
        with:
          anthropic_api_key: ${{ secrets.MOBILE_DEPENDENCY_AUDIT_ANTHROPIC_API_KEY }}
          claude_args: |
            --model claude-sonnet-4-5-20250929
            --max-turns 30
          prompt: |
            # Weekly Dependency Audit - React Native Project
            [... large prompt for dependency updates ...]

</details>

Reproduction

This occurred in a scheduled workflow run:

The crash happens very early during SDK initialization, before Claude can process any prompts or execute any tools.

Expected Behavior

Claude Code should initialize successfully and begin processing the provided prompt.

Actual Behavior

The process crashes immediately with exit code 1, outputting what appears to be minified JSON schema validator code in the error message.

Additional Context

The minified code in the error message suggests the crash is happening in a JSON schema validation library (possibly ajv based on the patterns visible). The crash occurs in the SDK's bundled dependencies before reaching the main Claude Code logic.

Impact

This completely blocks the GitHub Actions workflow from running automated dependency audits. The workflow cannot complete any work when Claude Code crashes during initialization.

View original on GitHub ↗

This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗