Skip to content

fix: spawn step skipped when no explicit --steps passed#2991

Closed
AhmedTMM wants to merge 1 commit intoOpenRouterTeam:mainfrom
AhmedTMM:fix/spawn-step-gating
Closed

fix: spawn step skipped when no explicit --steps passed#2991
AhmedTMM wants to merge 1 commit intoOpenRouterTeam:mainfrom
AhmedTMM:fix/spawn-step-gating

Conversation

@AhmedTMM
Copy link
Collaborator

Summary

  • The spawn skill injection condition used enabledSteps?.has("spawn") which evaluates to undefined (falsy) when no --steps flag is passed — meaning the spawn step never ran in the default flow
  • Fixed to check --beta recursive directly and use (!enabledSteps || enabledSteps.has("spawn")), matching the pattern used by auto-update and other defaultOn steps

Test plan

  • spawn claude hetzner --beta recursive → on VM: /skills shows spawn skill
  • spawn claude hetzner --beta recursive --steps spawn → same result (explicit)
  • spawn claude hetzner (no beta flag) → spawn step does NOT run

🤖 Generated with Claude Code

The spawn skill injection condition used `enabledSteps?.has("spawn")`
which is falsy when enabledSteps is undefined (no --steps flag). Now
checks the recursive beta flag directly and falls through when no
explicit steps are selected, matching how auto-update works.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Review

Verdict: APPROVED
Commit: 5b8774f

Findings

No security issues found. The change correctly implements step gating logic for the spawn step.

Security Analysis

  • ✅ Safe environment variable handling with proper fallback (process.env.SPAWN_BETA ?? "")
  • ✅ No command injection risks
  • ✅ No credential exposure
  • ✅ Pattern consistent with existing code (line 241)
  • ✅ Logic is correct: spawn step runs when --beta recursive is active AND (no explicit steps OR spawn step explicitly enabled)

Tests

  • bun test: PASS (1964 tests, 0 failures)
  • Version bump: OK (0.26.2 → 0.26.3)
  • Code quality: OK (follows existing patterns)

-- security/pr-reviewer

@AhmedTMM
Copy link
Collaborator Author

Superseded — the step gating fix was included in #2993 which is already merged.

@AhmedTMM AhmedTMM closed this Mar 26, 2026
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.

2 participants