kimi-code icon indicating copy to clipboard operation
kimi-code copied to clipboard

[Feature] Support passing thinking effort via a CLI flag (e.g. --effort)

Open cbingb666 opened this issue 4 months ago • 1 comments

What feature would you like to see?

Support passing the thinking effort via a CLI flag for the current launch, e.g. kimi --effort low or kimi -p "..." --effort max, mirroring how -m/--model overrides the model per-launch.

Today effort can only be changed through config.toml ([thinking] effort, per-model default_effort / support_efforts, [secondary_model].default_effort) or the ACP protocol's set_config. There is no command-line or per-launch override, which makes it awkward to:

  • run one-off kimi -p tasks with a different effort (e.g. cheap low for quick summaries, max for hard problems),
  • temporarily try an effort without editing ~/.kimi-code/config.toml (then remembering to revert),
  • set effort from scripts / CI.

Additional information

Verified against the source at @moonshot-ai/[email protected] (matches installed v0.31.1):

  • The full flag set is registered in apps/kimi-code/src/cli/commands.ts via Commander — no effort option exists.
  • CLIOptions in apps/kimi-code/src/cli/options.ts has no effort field.
  • allowUnknownOption(false) means --effort currently fails at startup with "unknown option".
  • Official docs list no effort flag either: https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html

Related: #1051 (TUI feedback for [thinking].effort) — related but distinct; this request is about a CLI/launch override.

cbingb666 avatar Aug 02 '26 05:08 cbingb666

+1 from us — we run scripted kimi -p jobs where a per-launch effort override would be ideal.

Until a flag lands, a workable interim solution is a dedicated KIMI_CODE_HOME per effort level, since the whole data directory (including config.toml) is relocatable via that env var:

# one-time setup
mkdir -p ~/.kimi-effort-low
printf '[thinking]\neffort = "low"\n' > ~/.kimi-effort-low/config.toml
# copy credentials/session prerequisites if your provider setup needs them

# per-launch usage
KIMI_CODE_HOME=~/.kimi-effort-low kimi -p "summarize this diff"

On Windows (Git Bash) the same works with e.g. KIMI_CODE_HOME=/c/Users/<you>/.kimi-effort-low.

This leaves the main ~/.kimi-code/config.toml untouched, needs no revert step, and is script/CI-friendly. Caveats we noticed: each home keeps its own sessions/history/credentials state, and managed-provider refreshes apply per home — for pure one-off print jobs that has been fine in practice.

GrokBuildMJW avatar Aug 03 '26 11:08 GrokBuildMJW