[FEATURE]: CLI option --max-turns #7099

Open
opened 2026-02-16 18:06:11 -05:00 by yindo · 1 comment
Owner

Originally created by @0kenx on GitHub (Jan 21, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

--max-turns
Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default
opencode run --max-turns 3 "query"

Originally created by @0kenx on GitHub (Jan 21, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request `--max-turns` Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default `opencode run --max-turns 3 "query"`
yindo added the discussion label 2026-02-16 18:06:11 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #2906: Limit Subagent Tree Depth - directly addresses limiting agentic recursion/turns
  • #7296: Allow configurable subagent-to-subagent task delegation with call limits - requests configurable task/call limits for agents
  • #3583: opencode run --timeout=60s - related feature for execution control in CLI mode

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of existing issues. Please check: - #2906: Limit Subagent Tree Depth - directly addresses limiting agentic recursion/turns - #7296: Allow configurable subagent-to-subagent task delegation with call limits - requests configurable task/call limits for agents - #3583: opencode run --timeout=60s - related feature for execution control in CLI mode Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7099