[PR #300] [MERGED] fix: combine stdout and stderr in bash tool output #9574

Closed
opened 2026-02-16 18:13:47 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/300
Author: @monotykamary
Created: 6/21/2025
Status: Merged
Merged: 6/22/2025
Merged by: @thdxr

Base: devHead: fix/bash-tool-stderr-output


📝 Commits (3)

  • 6f77576 fix: combine stdout and stderr in bash tool output
  • 3cdbec8 feat: add exitCode to bash tool metadata
  • 7fa5e8f tweaks

📊 Changes

1 file changed (+9 additions, -1 deletions)

View changed files

📝 packages/opencode/src/tool/bash.ts (+9 -1)

📄 Description

Summary

  • Fix bash tool to combine stdout and stderr in output, ensuring commands like bun test that output to stderr are visible to users
  • Stderr is still preserved separately in metadata for backward compatibility

Test plan

  • Test with commands that output to stderr (e.g., echo "test" >&2)
  • Verify stderr is still available in metadata
  • Confirm existing functionality remains intact

Fixes #291

🤖 Generated with opencode


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/300 **Author:** [@monotykamary](https://github.com/monotykamary) **Created:** 6/21/2025 **Status:** ✅ Merged **Merged:** 6/22/2025 **Merged by:** [@thdxr](https://github.com/thdxr) **Base:** `dev` ← **Head:** `fix/bash-tool-stderr-output` --- ### 📝 Commits (3) - [`6f77576`](https://github.com/anomalyco/opencode/commit/6f7757614c3dbca925cdc08e940f56cb3dd0986a) fix: combine stdout and stderr in bash tool output - [`3cdbec8`](https://github.com/anomalyco/opencode/commit/3cdbec81e84baabed6fa63a2dd468bf2cc209beb) feat: add exitCode to bash tool metadata - [`7fa5e8f`](https://github.com/anomalyco/opencode/commit/7fa5e8fe518b703548d7b5798889545324eb76db) tweaks ### 📊 Changes **1 file changed** (+9 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/tool/bash.ts` (+9 -1) </details> ### 📄 Description ## Summary - Fix bash tool to combine stdout and stderr in output, ensuring commands like `bun test` that output to stderr are visible to users - Stderr is still preserved separately in metadata for backward compatibility ## Test plan - [x] Test with commands that output to stderr (e.g., `echo "test" >&2`) - [x] Verify stderr is still available in metadata - [x] Confirm existing functionality remains intact Fixes #291 🤖 Generated with [opencode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:47 -05:00
yindo closed this issue 2026-02-16 18:13:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9574