Skip to content
This repository was archived by the owner on Jun 25, 2026. It is now read-only.

claude-code-review: add show-full-output input to surface SDK errors - #1

Merged
dem-extra1 merged 2 commits into
mainfrom
claude/upbeat-brown-bs023i
Jun 25, 2026
Merged

claude-code-review: add show-full-output input to surface SDK errors#1
dem-extra1 merged 2 commits into
mainfrom
claude/upbeat-brown-bs023i

Conversation

@dem-extra1

Copy link
Copy Markdown
Owner

Problem

When the claude-code-action model call fails inside the SDK, the action hides its output:

Running Claude Code via SDK (full output hidden for security)...
Rerun in debug mode or enable `show_full_output: true` in your workflow file for full output.

So a consumer whose claude-review check goes red sees only the opaque guard result:

{ "type": "result", "subtype": "success", "is_error": true,
  "duration_ms": ~2100, "num_turns": 1, "total_cost_usd": 0 }

(the existing "Fail the check if the review did not complete" step correctly turns this into a red check) — but no way to read the underlying API error (auth / usage-limit / credit). The reusable workflow exposed pr-number, prompt-addendum, checkout-submodules, allowed-bots — nothing for show_full_output — and it didn't pass a debug flag to the action. Diagnosing meant forking the workflow, because the action's own guards block any throwaway side-channel: it rejects push events (Unsupported event type: push) and requires the workflow file to match the default-branch copy (Workflow validation failed … must have identical content to the … default branch).

Change

  • Add an optional show-full-output input (boolean, default false — no behavior change for existing callers).
  • Wire it through to the action: show_full_output: ${{ inputs.show-full-output }}.

A consumer can then flip one input to read the real error in the job log instead of forking the workflow.

Why it matters

Surfaced on lacaedemon/sparta#207: a docs-only PR's review check failed three times in a row with exactly the signature above. The two substantive checks were green and the diff was trivial, so the failure was clearly inside the review action (most likely a Claude subscription usage-limit on the CLAUDE_CODE_OAUTH_TOKEN) — but confirming it was impossible without this toggle.

Notes

  • Default-off, single pass-through line; no change to the review behavior unless a caller opts in.
  • This repo has Issues disabled, so this PR stands in for the tracking issue.
  • The live consumer pin is d-morrison/gha@v1. If this repo is a mirror/fork of that, this change should land there (or be transferred) so it reaches consumers like sparta on the @v1 tag. Flagging for the maintainer.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DQTe2ufAdbUBj7VHRmi3o5


Generated by Claude Code

When the claude-code-action model call fails, the action hides its SDK output
("full output hidden for security"), so an auth/usage/credit rejection — which
surfaces as a 0-cost, single-turn result with is_error:true — is unreadable
from a consumer's failing review check. The reusable workflow exposed no way to
flip the action's show_full_output flag, so diagnosing it meant forking the
workflow (and the action's own guards block a throwaway side-channel: it rejects
push events and requires the workflow to match the default branch).

Add an optional show-full-output input (default false, preserving current
behavior) and wire it through to the action, so a consumer can toggle one input
to read the real error instead.

Reported from Lacaedemon/sparta#207, where a docs PR's review check failed
repeatedly with exactly this opaque signature.
@dem-extra1
dem-extra1 merged commit 773e4a5 into main Jun 25, 2026
7 of 8 checks passed
@claude

claude Bot commented Jun 25, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

d-morrison pushed a commit to Morrison-Lab/ai-config that referenced this pull request Jun 25, 2026
…212)

* ums: record the team-0-stationary scenario lesson in sparta memory

Adds the operational lesson from PR #200 to memories/repo/sparta.md: only team 1 auto-advances, so a demo scenario must order team 0 to move early, and engagement timing should be worked out on paper before spending a CI run. The mechanics reference tables (spawn layout, speeds, order-target semantics) now live with the code in sparta's demos/README.md and REPLAY.md (Lacaedemon/sparta#207), not in memory, so they don't rot silently when the game's constants change.

* ums: diagnosing opaque claude-review failures + memory-vs-docs rule

- tools.md: correct the is_error/quota note (the gha#102 'warn instead of
  fail' guard was NOT in effect on sparta#207's d-morrison/gha@v1 nor in
  dem-extra1/gha — still exits 1 red); add how to read the hidden SDK error
  via the new show-full-output input (dem-extra1/gha#1) and why a throwaway
  diagnostic workflow can't reach the action (push rejected; default-branch
  validation).
- preferences.md: code-derived reference tables belong in the repo's own docs
  next to the code, not in central ai-config memory (they rot); keep the
  lesson in memory and point at the in-repo docs.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant