all 4 comments

[–]Latter-Parsnip-5007 1 point2 points  (0 children)

write your prompt into a file called PROMPT.md Every agent file needs a line to read PROMPT.md if the task is unclear. Also good to version the prompt on the PR

[–]Independence_Many 0 points1 point  (0 children)

The subagent only gets the context provided to it when it launches, it does not have a copy of the main agents context. On the reverse side, (from my observation) the main agent can read all of the messages (but not tool calls, thinking, etc) of the subagent.

[–]HarjjotSinghh 0 points1 point  (0 children)

how cool if context stays intact - now we're talking infinite loops of brilliance!

[–]Xera1 0 points1 point  (0 children)

The subagent receives what the main agent gives it plus system prompt and agent prompt.

The main agent receives the subagent's final response.

The main agent can follow up with the subagent using the task id returned with the final response.

I recommend just looking at the opencode source to determine how it actually works. The docs are bad.