You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/web/src/content/docs/agents.mdx
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,6 +257,28 @@ If no temperature is specified, OpenCode uses model-specific defaults; typically
257
257
258
258
---
259
259
260
+
### Max steps
261
+
262
+
Control the maximum number of agentic iterations an agent can perform before being forced to respond with text only. This allows users who wish to control costs to set a limit on agentic actions.
263
+
264
+
If this is not set, the agent will continue to iterate until the model chooses to stop or the user interrupts the session.
265
+
266
+
```json title="opencode.json"
267
+
{
268
+
"agent": {
269
+
"quick-thinker": {
270
+
"description": "Fast reasoning with limited iterations",
271
+
"prompt": "You are a quick thinker. Solve problems with minimal steps.",
272
+
"maxSteps": 5
273
+
}
274
+
}
275
+
}
276
+
```
277
+
278
+
When the limit is reached, the agent receives a special system prompt instructing it to respond with a summarization of its work and recommended remaining tasks.
0 commit comments