fix(claude): use --effort instead of deprecated --thinking flag

Claude Code CLI v2.x renamed the flag; passing --thinking low causes
all rollout calls to fail on CLI 2.1.87+.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
lvbaocheng
2026-05-30 11:24:13 +08:00
parent 75b5c7f31c
commit 2532043d25

View File

@@ -254,7 +254,7 @@ def _run_claude_print(*, system: str, prompt: str, model: str, tools: list[dict[
if system:
cmd.extend(["--append-system-prompt", system])
if effort:
cmd.extend(["--thinking", effort])
cmd.extend(["--effort", effort])
structured_output = bool(return_message)
if structured_output:
cmd.extend(["--schema", _assistant_message_schema_wrapper()])