Skip to content

Comments

fix: fall back to ccr code when claude CLI is unavailable #12027

Draft
0xApotheosis wants to merge 1 commit intodevelopfrom
fix/release-script-no-conversation
Draft

fix: fall back to ccr code when claude CLI is unavailable #12027
0xApotheosis wants to merge 1 commit intodevelopfrom
fix/release-script-no-conversation

Conversation

@0xApotheosis
Copy link
Member

@0xApotheosis 0xApotheosis commented Feb 25, 2026

Description

tl;dr: for people like me who use Claude Code via Claude Code Router

When the claude CLI isn't authenticated (e.g. user has no Claude subscription and uses an API key via claude-code-router), the release script's summary generation fails silently and falls back to the raw commit list.

This PR adds ccr code as a fallback for summary generation:

  • Refactors the spawn logic into a shared spawnClaude helper
  • Checks if ccr is on PATH and prefers it when available
  • Falls back to claude CLI if ccr is unavailable or fails
  • Improves error output to capture both stdout and stderr (up to 500 chars each) for easier debugging

Issue (if applicable)

N/A

Risk

Zero risk. This only affects how Claude is invoked during release summary generation - no on-chain transactions, wallets, or protocol interactions are affected.

Testing

Engineering

Run the release script with and without a Claude subscription:

  • With ccr installed: should use ccr code for summary generation
  • Without ccr: should use claude CLI directly as before
  • If both fail: falls back to raw commit list as before

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Not user-facing - internal tooling change only.

Screenshots (if applicable)

N/A

@0xApotheosis 0xApotheosis requested a review from a team as a code owner February 25, 2026 00:45
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The scripts/release.ts file is updated to add the --no-conversation CLI flag when invoking Claude, changing the command arguments to include this flag in the spawned Claude process for the release workflow.

Changes

Cohort / File(s) Summary
Claude CLI Invocation
scripts/release.ts
Added --no-conversation flag to Claude command-line arguments in the runClaude flow.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 A quiet Claude, no chatter required,
One turn only, no back-and-forth fire,
The flag --no-conversation shines bright,
Making releases run just right! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title claims to 'fall back to ccr code when claude CLI is unavailable', but the actual change only adds a --no-conversation flag to an existing Claude invocation. The title does not match the changeset. Update the title to accurately reflect the change, such as 'fix: prevent release script from polluting claude conversation history' (which matches the PR's stated objective).
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/release-script-no-conversation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@0xApotheosis 0xApotheosis marked this pull request as draft February 25, 2026 00:48
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/release.ts`:
- Line 242: The spawn invocation in generateReleaseSummary passes an invalid
Claude CLI flag '--no-conversation' which causes the Claude process to fail;
remove '--no-conversation' from the arguments (or replace it with the supported
'--no-session-persistence' if the goal is to avoid saving the session) in the
spawn call that creates the child process (the line using spawn('claude', ['-p',
'--model', 'opus', '--max-turns', '1', ...])) so the Claude CLI runs with only
valid flags.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c257772 and 60bb3b5.

📒 Files selected for processing (1)
  • scripts/release.ts

@0xApotheosis 0xApotheosis force-pushed the fix/release-script-no-conversation branch from 132b4af to c6f263b Compare February 25, 2026 01:19
@0xApotheosis 0xApotheosis changed the title fix: prevent release script from polluting claude conversation history fix: fall back to ccr code when claude CLI is unavailable Feb 25, 2026
@0xApotheosis 0xApotheosis force-pushed the fix/release-script-no-conversation branch 2 times, most recently from f940848 to d087d89 Compare February 25, 2026 04:04
When the claude CLI isn't authenticated (e.g. user has no Claude
subscription and uses an API key via claude-code-router), the release
script now falls back to `ccr code` for summary generation.

- Refactor spawn logic into shared `spawnClaude` helper
- Check if `ccr` is on PATH and prefer it when available
- Improve error output to capture both stdout and stderr

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@0xApotheosis 0xApotheosis force-pushed the fix/release-script-no-conversation branch from d087d89 to 407c115 Compare February 25, 2026 04:10
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