fix(agents): preserve fd find failures - #99446
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 6:54 AM ET / 10:54 UTC. Summary PR surface: Source -2, Tests +37. Total +35 across 2 files. Reproducibility: yes. Source inspection of current main and the latest release shows the non-zero Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Merge the fd close-handler fix after normal maintainer and CI gates, keeping the behavior scoped to the fd-backed find path and the regression test isolated from custom-operation coverage. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection of current main and the latest release shows the non-zero Is this the best way to solve the issue? Yes. Rejecting non-zero AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 05de72c4cd7d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -2, Tests +37. Total +35 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Maintainer proof update for exact head
Fresh hosted checks are running for this rebased exact head. |
af32f55 to
840d109
Compare
840d109 to
e071905
Compare
|
Merged via squash.
|
* fix(agents): preserve fd find failures * test(agents): use tracked temp dirs in find test * test(scripts): update temp-dir routing expectation * test(agents): make fd failure fixture deterministic * test(agents): isolate fd process failure fixture --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
Related: problem-mode user report; no public issue number
What Problem This Solves
The
findsession tool could treat incompletefdoutput as a complete search result. Iffdwrote one or more stdout lines, then exited non-zero with a stderr failure, the tool returned the partial stdout as a successful result and dropped the failure reason.Why This Change Was Made
fdexit as a failed search, even when stdout already contains partial results.fdstderr or the fallback exit code in the thrown error.fdprocess producing stdout, stderr, and exit code 2.FindOperations.globbehavior, glob pattern rewriting, result limiting, or output truncation.User Impact
Users no longer receive incomplete file-search results as if the search finished normally. If
fdfails while walking a subtree after emitting partial matches, the session tool now surfaces the failure instead of silently hiding it.Evidence
main@adafb56b2eb9207d93896ebf6c5faa9205875833. No final rebase was performed.partial.tsinstead of rejecting after fakefdwrote stderr and exited 2.fdpartial stdout plus non-zero exit was incorrectly returned as a completefindresult.16b4542.fdstderr and did not return the partial stdout line as a successful result.Regression Test Plan
src/agents/sessions/tools/find.test.tsfdemits one stdout result, emits stderr, exits with code 2, and the find tool rejects with the stderr message.fdchild-process path without starting unrelated runtime services.Root Cause
find.tscomputed thefderror message for non-zero exits but only rejected when stdout was empty.fdexit and stderr.