Skip to content

In CLI mode (run command) subagents output is not printed #19278

Closed as not planned

Description

@krzyk

Description

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

  1. 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

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 26, 2026
  2. added a commit that references this issue on Mar 27, 2026
    14144e4
  3. krzyk commented on Mar 30, 2026

    @krzyk
    Author

    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).

  4. lee-b commented on Apr 30, 2026

    @lee-b

    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.

  5. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. RoelsL commented on May 7, 2026

    @RoelsL

    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.

  7. raisbecka commented on May 7, 2026

    @raisbecka

    Agreed - I have this same requirement.

  8. github-actions commented on Jul 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  9. lee-b commented on Jul 7, 2026

    @lee-b

    Still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions