Repository navigation
fix(source-control): drop Kimi flags Kimi Code rejects (--quiet, --thinking) - #33285
Merged
Merged
Conversation
kimi-code 0.36–0.40 reject --quiet, --thinking, and --no-thinking as unknown options, so Source Control AI fails before the prompt is read. Keep --prompt and optional --model, and stop advertising thinking levels that regenerate those flags.
Collapse the Kimi flag assertions into one exact-argv regression and cite Kimi Code (not legacy kimi-cli) as the reason the flags are gone. Co-authored-by: BingZ <[email protected]>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
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. Comment |
8 of 9 tasks
This was referenced Oct 25, 2026
Closed
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.
ELI5
When Kimi is the Source Control AI agent, Orca launches
kimiwith flags the current Kimi CLI doesn't have (--quiet, and--thinking/--no-thinkingwhen the Kimi K2.6 model is picked). The CLI stops witherror: unknown option '--quiet'before it reads the prompt, so generating branch names and commit messages always fails. This PR passes only the flags Kimi accepts.Root cause (upstream refs)
There have been two different CLIs that install a binary called
kimi:--quietas an alias for--print --output-format text --final-message-only(src/kimi_cli/cli/__init__.py:277-283,:417-430) and--thinking/--no-thinking(:181-187).--promptalone opened the interactive shell, so--quietwas required there. Since 1.51/1.52, every entry point is short-circuited to a deprecation notice that exits 0 (src/kimi_cli/__main__.py:28-46,src/kimi_cli/deprecation.py). With any of our argv, legacy kimi-cli can no longer generate anything.kimi/kimi-code). Its commander program setsallowUnknownOption(false)(apps/kimi-code/src/cli/commands.ts:35), and the only headless flags it has are-p, --prompt <prompt>("Run one prompt non-interactively and print the response",:62-67),-m, --model(:56-61) and--output-format text|stream-json(:68-74). Its CLI source has never contained--quiet,--thinkingor--print(git log -Soverapps/kimi-code/src/clireturns nothing for each).#11674 switched the recipe to
--prompt, but it kept the legacy--quietand--thinking/--no-thinking.What changed
--prompt <prompt> [--model <id>].resolveThinkingLevelalready returnsundefinedfor models without levels, so a savedon/offchoice is ignored rather than rejected.This adopts #14790 by @bbingz. Their commit is cherry-picked unchanged onto current
mainwith authorship kept. On top of it, I narrowed the tests to one exact-argv check and corrected the comment: it now says Kimi Code has never had these flags, instead of saying "0.36–0.40 reject" them. Supersedes #14790.Verification
mainwith the real CLI.@moonshot-ai/[email protected]installed into an isolated npm prefix and HOME. Runningkimi --prompt "say hi" --quietprintserror: unknown option '--quiet'and exits 1.--thinkingand--no-thinkingprint the same error, and--printgivesunknown option '--print' (Did you mean --prompt?).COMMIT_MESSAGE_AGENT_SPECS.kimi.buildArgs(thinkingLevelon) and ran the real Kimi Code 2.3.1 against an env-configured model (KIMI_MODEL_*)."• login-page\n\n"; the model's thinking went to stderr.cleanGeneratedCommitMessagegave"login-page".main's spec and passes here:pnpm test src/shared/commit-message-agent-spec.test.ts src/shared/commit-message-plan.test.ts src/shared/commit-message-generation.test.tspasses 100/100.pnpm tc:nodeandpnpm run check:code-quality:changedboth pass.Risk
--quiet,--promptwould open the legacy interactive shell instead of running headless. Upstream archived that CLI and says existing installs "will stop working", and the current kimi-cli release is a deprecation stub anyway. We don't add version gating for a dead CLI.thinkingLevel: onfor Kimi K2.6 to a newer server now gets "does not support a thinking effort level". Before this change that pairing failed anyway (Kimi rejected--thinking), and theConfig defaultmodel, which has no thinking levels, is unaffected.apps/kimi-code/src/cli/prompt-render.ts:269-310). Multi-line commit bodies therefore keep that indent on lines after the first. Branch names and subjects are clean.Platform/mobile: shared argv only. It is the same on macOS, Linux and Windows, local and SSH, and for folder workspaces. Nothing changes on mobile.
Fixes #14771
Co-authored-by: BingZ [email protected]