Repository navigation
fix(exec): preserve stderr in node command results - #123602
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 6:29 AM ET / 10:29 UTC. ClawSweeper reviewWhat this changesThe PR makes node-host exec results expose the same combined stdout, stderr, and error text to the agent as they retain in diagnostic details. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessNo blocking correctness findings. The PR repairs a source-proven loss of node stderr/error diagnostics; retain it for normal maintainer merge once exact-head checks complete. Priority: P1 Review scores
Verification
How this fits togetherNode-host exec sends a command through the Gateway to a paired node, then converts its structured stdout, stderr, and error response into an agent tool result. The formatter feeds both the model-visible result and execution diagnostics. flowchart LR
A[Agent exec request] --> B[Gateway node command]
B --> C[Node stdout stderr and error]
C --> D[Node result formatter]
D --> E[Model tool result]
D --> F[Execution diagnostics]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +27. Total +28 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the single shared aggregate at the node result-formatting boundary after exact-head validation; no change to node capture, approval, or execution policy is needed. Do we have a high-confidence way to reproduce the issue? Yes—source reproducible: current main selects Is this the best way to solve the issue? Yes—the shared formatter is the correct owner boundary because both direct and approval-complete node runs already converge there; reusing one aggregate eliminates the divergence without a second execution path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c6fc12dc6745. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Closes #123600
What Problem This Solves
Fixes an issue where
exec host=nodehid stderr, truncation notices, and node error text whenever the command also emitted non-empty stdout. Agents could receive a completed-looking stdout fragment without the diagnostics explaining failure or incomplete output.Why This Change Was Made
The node result formatter now builds one combined stdout/stderr/error rendering and uses it for both provider-visible content and
details.aggregated. Node execution, stream caps, status/exit metadata, timeout/cancel behavior, custody, and warning rendering remain unchanged.User Impact
Agents and operators now see the complete node command result, including stderr and the explicit truncation marker, even when stdout is present. Diagnostic details no longer disappear at the provider boundary.
Evidence
small stdout\nwhile stderr's... (truncated)marker andnode command failedtext were absent.tbx_01kzzvseq3exagr9jx42651z6z).36696a6ad16467cc1a6a40e1aea144681d75fa6f.Production delta: +3/-2, net +1. Tests: +28/-1, net +27.
AI-assisted: yes. The repair was reviewed against node system.run capture/truncation, direct invoke failure classification, exec result rendering, provider tool-result projection, local/background sibling formatters, and existing status/custody behavior.