

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Agents
incomplete
2: Temperature
incomplete
3: Custom Agents
incomplete
4: Max Steps
incomplete
5: Subagents
incomplete
6: Task Permissions
incomplete
This lesson's interactive features are locked, please to keep using them
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.
Limit the review agent's steps in one run.
Tell OpenCode to run and submit the CLI tests from the project root.