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
{{ message }}
Repository navigation
In CLI mode (run command) subagents output is not printed #19278
When running opencode with run command it outputs only the main agents text, subagents are not visible at all (neither in logs nor on stdout/stderr).
I run opencode from crontab and I would like to be able to look into what agents/subagents are doing and why - sometimes I see errors how they execute commands, but without seeing their text I can't debug it.
Plugins
none
OpenCode version
1.3.2
Steps to reproduce
opencode run --model github-copilot/gpt-4.1 "Use @explore subagent to list files in current directory (based on name suggest what they do) and return just the list to the main agent"
What I would expect is to get that list at least twice (explore subagent executes ls - I don't see that as output in run command, but I do see it in TUI when I go into subagent), but I see only what main agent writes.
Screenshot and/or share link
No response
Operating System
Ubuntu 22.04
Terminal
st
Reacted by U Cirello, Romain Giacalone, pdejong-sieval, Ming Fang, Quang Nguyễn, Willy Tarreau and Eugene Kamenev
This is important for copilot, where subagents are used frequently to do more work on a given premium requests, and also to avoid overflowing and compaction of context (where there is most of the time just 128k tokens available).
Agree. For me, opencode run --thinking is a good level of detail for the main agent on a command line/batch view, but it can go completely silent and appear to hang when running subagents. I would much prefer if these subagents would output in the same way, or ideally slightly indented and and/or prefixed with the subagent name.
I totally agree on the comment above! I am running this in a gitlab pipeline and don't see the subagents which means that most of the time I am waiting on the initial output while the agent is performing a repo intake.
It would be better to see what the subagents are doing in the background.
Activity
fix(cli): print subagent output in run command mode
krzyk commentedon Mar 30, 2026
This is important for copilot, where subagents are used frequently to do more work on a given premium requests, and also to avoid overflowing and compaction of context (where there is most of the time just 128k tokens available).
lee-b commentedon Apr 30, 2026
Agree. For me,
opencode run --thinkingis a good level of detail for the main agent on a command line/batch view, but it can go completely silent and appear to hang when running subagents. I would much prefer if these subagents would output in the same way, or ideally slightly indented and and/or prefixed with the subagent name.RoelsL commentedon May 7, 2026
I totally agree on the comment above! I am running this in a gitlab pipeline and don't see the subagents which means that most of the time I am waiting on the initial output while the agent is performing a repo intake.
It would be better to see what the subagents are doing in the background.
raisbecka commentedon May 7, 2026
Agreed - I have this same requirement.
github-actions commentedon Jul 7, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
lee-b commentedon Jul 7, 2026
Still needed.