Skip to content

ci review: claude-code agent fails silently in GitHub Actions (works in local daemon) #715

@khurchla

Description

@khurchla

Environment

  • roborev: v0.54.1 (downloaded by roborev init gh-action generated workflow)
  • claude-code: tried v2.1.128 (native stable channel), v2.1.139 (npm), v2.1.140 (native latest) — all fail identically in CI
  • Runner: GitHub Actions ubuntu-latest (24.04)
  • Local (working): macOS arm64, claude-code v2.1.139 native install, same roborev v0.54.1

Symptom

roborev ci review --comment running inside a pull_request Actions workflow fails for every review job in <2 seconds with no surfaced stderr:

2026/05/12 22:19:13 ci review: running agent=claude-code type=security ref=...
2026/05/12 22:19:13 ci review: running agent=claude-code type=default ref=...
## roborev: Review Failed (`...`)
All review jobs in this batch failed.
- **claude-code** (default): failed
- **claude-code** (security): failed

Both jobs die before claude could plausibly produce output. roborev --verbose doesn't change anything. There are no per-job log files in /tmp/roborev, ~/.roborev, $RUNNER_TEMP/roborev, $GITHUB_WORKSPACE/.roborev, or /var/lib/roborev — verified by post-failure dump step.

What works in CI (sanity-checked in the same workflow run)

  • claude --version → emits version
  • echo "hi" | claude --print --output-format=text --dangerously-skip-permissions → returns Hi! What would you like to work on? (real API response)
  • echo "review this: console.log('hi')" | claude --print --output-format=json --dangerously-skip-permissions → returns a valid JSON result block in 4s

So claude-code is installed correctly, ANTHROPIC_API_KEY is valid, network reaches Anthropic.

What fails identically in CI AND locally

  • echo "..." | claude --print --output-format=stream-json --dangerously-skip-permissions → exits 1 with stderr:
    Error: When using --print, --output-format=stream-json requires --verbose
    

This is a claude-code v2.1.x behavior across multiple versions tried.

What works locally

roborev ci review --ref <base>..<head> --gh-repo ... --pr ... runs to completion and emits a real multi-finding review. Same roborev v0.54.1 binary, same .roborev.toml, same claude-code (v2.1.139 native). The local run takes ~25 seconds vs <2 seconds in CI.

So roborev does pass --verbose to claude in the daemon-less ci review path locally (otherwise local would fail with the same error). But something differs in CI — most likely path-of-execution, Linux vs macOS code path, or non-TTY handling — and the --verbose flag is not reaching claude in CI, OR something else fails before that point.

Confirmed NOT the cause

  • CLAUDECODE env var (forced empty via unset CLAUDECODE — same failure)
  • claude-code version: tried v2.1.128 (stable), v2.1.139 (npm), v2.1.140 (latest native); all same
  • Install method: tried npm install -g @anthropic-ai/claude-code AND curl claude.ai/install.sh | bash; all same
  • ANTHROPIC_API_KEY validity (sanity check confirms it works)
  • App token issues (actions/create-github-app-token mints successfully; GH_TOKEN is well-formed)

What would unblock this

Surfacing the captured claude stderr in the failure-case output (the binary contains claude exited: %w (stderr: %s) per strings, but the message doesn't reach Actions stdout or any log file we can find).

If ci review is supposed to pass --verbose to claude when using --output-format=stream-json, that flag isn't making it through on Linux/Actions.

Repro workflow

Generated by roborev init gh-action --agent claude-code and lightly customized for org-level App-token auth:

https://github.com/Fantasy-Interactive/ix-myagent2webmcp/blob/chore/roborev-gh-actions-setup/.github/workflows/roborev.yml

Workaround request

Is there a roborev config option to pass extra agent flags through (--verbose), or a way to force ci review to use --output-format=json (non-streaming) which works in this CI environment?


Issue generated with Claude Code interactively. Don't hate me if it sucks please! --Kathy (I am not a bot)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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