Skip to content

fix(claude-assistant): prevent startup_failure by making secret optional - #11

Merged
twistedmelonman merged 1 commit into
mainfrom
claude/fix-startup-failure-required-secret-20260307
Mar 8, 2026
Merged

fix(claude-assistant): prevent startup_failure by making secret optional#11
twistedmelonman merged 1 commit into
mainfrom
claude/fix-startup-failure-required-secret-20260307

Conversation

@twistedmelonman

Copy link
Copy Markdown
Member

Root Cause

claude-assistant.yml declared claude_oauth_token as required: true. GitHub validates required: true secrets at workflow dispatch time — before any jobs run. This means every run that triggers the claude.yml workflow (even when @claude isn't mentioned) hits this validation gate and gets reported as startup_failure, with zero jobs started (jobs: []).

This was traced by examining kebab-tax run history:

  • Runs Add Claude Code GitHub Workflow #1–1847: skipped (inline claude.yml, no required: constraint)
  • Run #1848+: startup_failure (switched to claude-assistant.yml@v1 with required: true)

The gate-job pattern (PR kebab-tax#908) didn't help because the secret is validated at dispatch time, before job conditions are evaluated.

Fix

required: false — GitHub skips dispatch-time secret validation. If @claude is triggered and the secret is genuinely missing, the Claude Code action fails at runtime with a clear authentication error. For non-@claude runs, the calling job is properly skipped.

Test Plan

  • After merging and moving v1 tag: verify kebab-tax runs for non-@claude events show skipped (not startup_failure)
  • Verify kebab-tax runs for @claude events still work correctly

🤖 Generated with Claude Code

When a reusable workflow declares a secret as required: true, GitHub
validates it at workflow dispatch time — before any jobs run. This means
even runs where the calling job would be skipped (e.g. because @claude
was not mentioned) cause startup_failure for the entire workflow, not
just that job.

Root cause: required: true triggers dispatch-level validation. The calling
job passes the secret conditionally, but GitHub can't satisfy the required
constraint before job conditions are evaluated.

Fix: required: false prevents dispatch-time validation. If Claude is
triggered and the secret is genuinely missing, the Claude Code action
will fail at runtime with a clear authentication error, which is
actionable. The no-op case (no @claude mention) now correctly shows as
skipped rather than startup_failure.

Investigated by tracing kebab-tax run history: startup_failure began at
run #1848, coinciding exactly with the adoption of claude-assistant.yml.
All runs showed jobs: [] (zero jobs started), confirming workflow dispatch
failure rather than a job-level issue.

Closes startup_failure regression in consumers using claude-assistant.yml@v1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@twistedmelonman
twistedmelonman merged commit d7c8341 into main Mar 8, 2026
4 checks passed
@twistedmelonman
twistedmelonman deleted the claude/fix-startup-failure-required-secret-20260307 branch August 8, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant