summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/content/docs
diff options
context:
space:
mode:
authorNathan Thomas <[email protected]>2025-12-05 10:26:44 -0800
committerGitHub <[email protected]>2025-12-05 12:26:44 -0600
commit40eb8b93e132daac1dff63e260cb61a880a2ba4d (patch)
tree47a56961d3ac0dfc8249d50997d3e66611704fef /packages/web/src/content/docs
parent6e6bd1e1710be0d1daa481c0005ddd8e6cc093c4 (diff)
downloadopencode-40eb8b93e132daac1dff63e260cb61a880a2ba4d.tar.gz
opencode-40eb8b93e132daac1dff63e260cb61a880a2ba4d.zip
feat: add max steps for supervisor and sub-agents (#4062)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]>
Diffstat (limited to 'packages/web/src/content/docs')
-rw-r--r--packages/web/src/content/docs/agents.mdx22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/agents.mdx b/packages/web/src/content/docs/agents.mdx
index 557f0ccf5..a2997515b 100644
--- a/packages/web/src/content/docs/agents.mdx
+++ b/packages/web/src/content/docs/agents.mdx
@@ -257,6 +257,28 @@ If no temperature is specified, OpenCode uses model-specific defaults; typically
---
+### Max steps
+
+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.
+
+If this is not set, the agent will continue to iterate until the model chooses to stop or the user interrupts the session.
+
+```json title="opencode.json"
+{
+ "agent": {
+ "quick-thinker": {
+ "description": "Fast reasoning with limited iterations",
+ "prompt": "You are a quick thinker. Solve problems with minimal steps.",
+ "maxSteps": 5
+ }
+ }
+}
+```
+
+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.
+
+---
+
### Disable
Set to `true` to disable the agent.