fix(agents): handle find subprocess stream failures - #101158
Merged
Merged
Conversation
Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com>
Contributor
Author
|
Land-ready at What I reviewed and improved:
Evidence:
No known proof gaps remain for this changed-file set. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 7, 2026
Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #101020
What Problem This Solves
Fixes an issue where agent runs using the
findtool could crash and leavefdrunning when its stdout or stderr stream failed.The contributor PR carrying this fix was automatically closed only because its author exceeded the repository's open-PR limit. This maintainer-owned replacement preserves the contributor's authorship and reviewed implementation.
Why This Change Was Made
The
fdsubprocess now has one idempotent stream-failure path shared by readline, stdout, and stderr. That path stops the child, closes readline, removes abort handling through the existing settle owner, and rejects exactly once even though Node forwards an input error through both readline and the raw stream.User Impact
The
findtool now fails the individual tool call cleanly on an OS-level pipe/read failure instead of risking an agent-process crash or orphaned search process. Successful searches, cancellation, result limits, and existingfdexit handling are unchanged.Evidence
oxlint: passed.oxfmt --check: passed.git diff --check: passed.OPENCLAW_TESTBOX=1 scripts/pr prepare-run 101158: passed atcf5000f1de7042a9a0aa8cc7a9344b840aeaa0f6.AI-assisted maintainer repair. I reviewed the full
findsubprocess lifecycle, its registration callers, the siblinggrepimplementation, adjacent tests, and Node's readline error contract.