all 'opencode run' output going to stderr #266

Closed
opened 2026-02-16 17:25:59 -05:00 by yindo · 8 comments
Owner

Originally created by @Dadzemovic on GitHub (Jun 24, 2025).

Originally assigned to: @thdxr on GitHub.

Thoughts on sending final 'opencode run' output to stdout? Would be nice to be able to differentiate from the rest of the output (see claude code behavior for reference, e.g. claude 'write a poem' > out.txt)

Originally created by @Dadzemovic on GitHub (Jun 24, 2025). Originally assigned to: @thdxr on GitHub. Thoughts on sending final 'opencode run' output to stdout? Would be nice to be able to differentiate from the rest of the output (see claude code behavior for reference, e.g. `claude 'write a poem' > out.txt`)
yindo closed this issue 2026-02-16 17:25:59 -05:00
Author
Owner

@thdxr commented on GitHub (Jun 24, 2025):

i thought we did do this but i'll check

@thdxr commented on GitHub (Jun 24, 2025): i thought we did do this but i'll check
Author
Owner

@sudo-tee commented on GitHub (Jun 26, 2025):

I also have this issue. I want to write a wrapper for neovim and can only see output in stderr.

@sudo-tee commented on GitHub (Jun 26, 2025): I also have this issue. I want to write a wrapper for neovim and can only see output in stderr.
Author
Owner

@danriedl commented on GitHub (Aug 5, 2025):

another usecase is to send stdout to glow to pretty print markdown responses.

@danriedl commented on GitHub (Aug 5, 2025): another usecase is to send stdout to `glow` to pretty print markdown responses.
Author
Owner

@thdxr commented on GitHub (Aug 5, 2025):

the final output should be going to stdout

@thdxr commented on GitHub (Aug 5, 2025): the final output should be going to stdout
Author
Owner

@imaurer commented on GitHub (Oct 21, 2025):

This still happens for me.

❯ opencode --model openrouter/x-ai/grok-code-fast-1 run "hello" 2> /dev/null
❯ opencode --model openrouter/x-ai/grok-code-fast-1 run "hello" > /dev/null
Hello! How can I help with your software engineering tasks today?
❯ echo $?
0
❯ opencode --version
0.15.8
@imaurer commented on GitHub (Oct 21, 2025): This still happens for me. ```bash ❯ opencode --model openrouter/x-ai/grok-code-fast-1 run "hello" 2> /dev/null ❯ opencode --model openrouter/x-ai/grok-code-fast-1 run "hello" > /dev/null Hello! How can I help with your software engineering tasks today? ❯ echo $? 0 ❯ opencode --version 0.15.8 ```
Author
Owner

@rekram1-node commented on GitHub (Oct 21, 2025):

@imaurer will fix

@rekram1-node commented on GitHub (Oct 21, 2025): @imaurer will fix
Author
Owner

@rekram1-node commented on GitHub (Oct 21, 2025):

fix merged, will be in next release

@rekram1-node commented on GitHub (Oct 21, 2025): fix merged, will be in next release
Author
Owner

@imaurer commented on GitHub (Oct 22, 2025):

thanks @rekram1-node !!

@imaurer commented on GitHub (Oct 22, 2025): thanks @rekram1-node !!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#266