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

docs: clarify --max-turns counts agent steps, not user messages

Open anandgupta42 opened this issue 8 months ago • 1 comments

Problem

--max-turns sounds like it limits user conversation turns, but it actually counts step-start events (agent steps including tool calls). A single user prompt can trigger 10+ steps.

Location

packages/opencode/src/cli/cmd/run.ts — --max-turns option

Current Description

"maximum number of assistant turns before aborting the session"

Suggested Fix

Either:

  1. Rename to --max-steps for clarity
  2. Or update the description: "maximum number of agent steps (including tool calls) before aborting"
  3. Add documentation in CI guide explaining the relationship between turns and steps

Impact

Low — the feature works correctly, the naming is just slightly misleading for users who expect "turns" to mean "back-and-forth exchanges".

Found During

PR #350 deep analysis.

anandgupta42 avatar Mar 22 '26 16:03 anandgupta42

Fixed by PR #350 (commit edd58cd40) — added --max-turns CLI flag with documentation clarifying it counts agent steps, not user messages.

kulvirgit avatar Mar 27 '26 00:03 kulvirgit