Skip to content

fix(tool): capture stderr separately in bash tool output#21064

Open
YumaKakuya wants to merge 1 commit intoanomalyco:devfrom
sorted-ai:fix/bash-stderr-hook
Open

fix(tool): capture stderr separately in bash tool output#21064
YumaKakuya wants to merge 1 commit intoanomalyco:devfrom
sorted-ai:fix/bash-stderr-hook

Conversation

@YumaKakuya
Copy link
Copy Markdown

@YumaKakuya YumaKakuya commented Apr 5, 2026

Issue for this PR

Closes #20907

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The bash tool captures output using handle.all (merged stdout+stderr) but
doesn't expose stderr individually. Plugins that need to inspect error output
receive only the combined stream with no way to tell what came from stderr.

This forks handle.stderr in parallel with the existing handle.all stream
and adds a stderr field to the return object. The merged output field is
unchanged — this is purely additive.

How did you verify your code works?

  • Full test suite: 1826 pass / 17 skip / 0 fail (1 pre-existing flaky in plugin-add.test.ts, unrelated)
  • Typecheck: all 13 packages pass

Screenshots / recordings

N/A — no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The bash tool captures output using handle.all (merged stdout+stderr)
but does not expose stderr individually. Plugins and consumers that
need to inspect error output have no way to distinguish stderr from
the combined stream.

This change captures stderr in parallel with the existing merged
stream. The combined output field stays unchanged for AI agent
consumption — this is purely additive.

Closes anomalyco#20907
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: expose stderr separately in bash tool output for plugin consumption

1 participant