Repository navigation
fix(proxy): proxy run prints only "The CLI command failed." when the command cannot be started - #197254
fix(proxy): proxy run prints only "The CLI command failed." when the command cannot be started#197254yxshee wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR identifies missing or non-executable child commands in proxy run errors while preserving exit handling and cleanup. Example: Run
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a current CLI diagnostic defect with a focused change, relevant regression coverage, and supplied before/after CLI evidence; no actionable introduced bug was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe proxy CLI starts a local capture proxy, launches the requested child through the shared process owner, finalizes capture resources, and passes failures to the root CLI renderer. flowchart TD
A[Proxy CLI arguments] --> B[Proxy runtime]
B --> C[Capture owner and local proxy]
B --> D[Shared process launcher]
D --> E[Launch result classification]
E --> F[Capture cleanup]
F --> G[Root CLI error renderer]
Technical reviewBest possible solution: Merge the focused launch-error classification through the existing ExpectedCliError owner while retaining child exit semantics and capture cleanup. Do we have a high-confidence way to reproduce the issue? Current-main source traces launch failures to an unclassified error and generic root output; the contributor supplies matching CLI reproductions, but this read-only review ran no target code. Is this the best way to solve the issue? The patch fixes diagnostic classification at the proxy command owner, reuses existing errno and rendering contracts, and leaves successful execution, other failures, and cleanup unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8ae6b3852f97. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +20, Tests +20, Docs +1, Other +2. Total +43 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 11, 2026, 10:04 AM ET / 15:04 UTC. |
|
Thanks for the work here. We're closing this along with the author's other open PRs: the series splits one kind of change across many commands or call sites, and much of it is backed only by issues filed by the same author. Please open one issue per root cause with a reproduction from a real affected setup; maintainers will decide scope and fix it once at the shared owner. |
What Problem This Solves
Fixes:
openclaw proxy run -- COMMANDprints onlyThe CLI command failed.when the command cannot be started, for example a mistyped command name or a file that is not executable. The proxy starts and stops cleanly, but the user is not told that the child command never ran or why.User Impact
User impact: the CLI now says which command could not be started and why (
command not foundorpermission denied) and still exits with status 1. A child that starts and then fails keeps its own exit code and output, and a successful run is unchanged.Why This Change Was Made
runDebugProxyRunCommandalready detects a child that failed during launch (no exit code and no signal) and throws the raw spawn error. The root renderer hides the reason of an unclassified error unless--debugis passed, so only the generic line was shown. Launch failures withENOENTorEACCESare now raised asExpectedCliErrorwith a specific message, the same way #191295 handledproxy runwithout a command andproxy blobwith an unknown id. The original spawn error is kept as the cause, other launch failures still throw as before, and the proxy server and capture session are still closed (the new test asserts the server stop).Evidence
From source on
mainat f5d0c19, Linux, Node 24.22.2, fresh state directory.Before:
After:
Unchanged controls with the fix:
Tests:
pnpm test src/cli/proxy-cli.runtime.test.ts --maxWorkers=1: 27 passed.main(the rawCommand failed with ENOENTerror is thrown) and pass with the fix.config/test-lines-allocations/proxy-run-launch-failure.txt;pnpm check:test-lines-ratchet --stagedpasses.pnpm tsgo:core,oxfmt --checkandoxlint --type-awareon the changed files: clean.docs/cli/proxy.mdmentions the new reason next to the existing note from fix(cli): preserve existing proxy and transcript error reasons #191295.