fix(happy-cli): pass positional prompt arguments correctly to Claude CLI#690
Open
davidrimshnick wants to merge 1 commit intoslopus:mainfrom
Open
fix(happy-cli): pass positional prompt arguments correctly to Claude CLI#690davidrimshnick wants to merge 1 commit intoslopus:mainfrom
davidrimshnick wants to merge 1 commit intoslopus:mainfrom
Conversation
Two fixes: 1. Remove incorrect arg-pairing heuristic in index.ts that consumed the next argument after any unknown flag if it didn't start with "-". This broke positional prompts like: happy "/review URL" 2. Move claudeArgs after --settings in claudeLocal.ts so positional prompts end up at the end of the argv array where Claude CLI expects them. Fixes slopus#663 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
happy "/review URL") were not being passed correctly to Claude CLIindex.tshad a heuristic that incorrectly consumed the next argument after any unknown flag if it didn't start with-. This broke positional prompts and could eat unrelated arguments.claudeLocal.ts,--settingswas added afterclaudeArgs, so positional prompts weren't at the end of the argv array where Claude CLI expects them.Fixes #663
Changes
index.ts: Removed the arg-pairing heuristic — unknown args are now passed through as-is (the shell already handles quoting/grouping)claudeLocal.ts: MovedclaudeArgsto the end of the spawn args, after--settingsTest plan
--settingsin spawn argsclaudeLocal.test.tstests passhappy "/review https://example.com/pr/123"should forward the prompt to Claude correctly🤖 Generated with Claude Code