Skip to content

Commit 6534665

Browse files
docs
1 parent 6aa7285 commit 6534665

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

packages/web/src/content/docs/commands.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,39 @@ This is an **optional** config option.
312312

313313
---
314314

315+
### Return Prompt
316+
317+
Use the `returnPrompt` option to provide instructions that are appended to the subagent's response when it returns to the parent session. This is useful for guiding what the parent agent should do next after the subtask completes.
318+
319+
```json title="opencode.json"
320+
{
321+
"command": {
322+
"research": {
323+
"agent": "general",
324+
"subtask": true,
325+
"returnPrompt": "Challenge, verify and validate the plan before implementing it."
326+
}
327+
}
328+
}
329+
```
330+
331+
Or in markdown format:
332+
333+
```md title=".opencode/command/research.md"
334+
---
335+
description: Research and implement
336+
agent: general
337+
subtask: true
338+
returnPrompt: Challenge, verify and validate the plan before implementing it.
339+
---
340+
341+
Research how to implement $ARGUMENTS and provide a detailed plan.
342+
```
343+
344+
This is an **optional** config option. Only applies when the command runs as a subtask.
345+
346+
---
347+
315348
## Built-in
316349

317350
opencode includes several built-in commands like `/init`, `/undo`, `/redo`, `/share`, `/help`; [learn more](/docs/tui#commands).

0 commit comments

Comments
 (0)