Skip to content

fix(harness): drain local shell output while process runs - #2936

Open
CryoThrust wants to merge 2 commits into
agentscope-ai:mainfrom
CryoThrust:fix/local-filesystem-shell-output
Open

fix(harness): drain local shell output while process runs#2936
CryoThrust wants to merge 2 commits into
agentscope-ai:mainfrom
CryoThrust:fix/local-filesystem-shell-output

Conversation

@CryoThrust

Copy link
Copy Markdown

Fixes #2838.

LocalFilesystemWithShell.execute waited for the process before consuming stdout and stderr. Commands producing more than the OS pipe buffer could deadlock and be reported as timeouts.

This change starts daemon stream readers immediately after process startup, waits for the process with the existing timeout, and then collects both outputs. It preserves output truncation and timeout response behavior and adds a regression test covering approximately 108 KB of stdout.

Signed-off-by: Yohanes CryoThrust@users.noreply.github.com

Signed-off-by: Yohanes <CryoThrust@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Signed-off-by: Yohanes <CryoThrust@users.noreply.github.com>
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ent/filesystem/local/LocalFilesystemWithShell.java 60.00% 8 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

[Bug]: LocalFilesystemWithShell.execute deadlocks when child process output exceeds pipe buffer (waitFor before draining stdout/stderr)

2 participants