We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Max Steps

Sometimes you know a task really just shouldn't take that long.

You can limit your agent's ability to spin its wheels with the steps setting. Each step is one model response, which can include multiple tool calls. The results of those calls feed into the next step.

If you set steps: 5, the agent gets at most five model steps. On the final step, OpenCode disables tool calls and asks the model to summarize. A new user prompt will reset the allowance.

{
  "$schema": "https://opencode.ai/config.json",
  "agents": {
    "quick-thinker": {
      "description": "Fast reasoning with limited iterations",
      "system": "Solve problems with minimal steps.",
      "steps": 5,
    },
  },
}

Agents can be specified in either Markdown or JSON.

Frankly, you probably won't use this setting very often in day-to-day coding, but it can be very useful when you're building an automated pipeline that uses an agent, with something like opencode run.

Assignment

Limit the review agent's steps in one run.

Tell OpenCode to run and submit the CLI tests from the project root.