Repository navigation
fix: keep chat usable after removing an unavailable tool server - #171397
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. |
|
@clawsweeper re-review Proof on head The PR body records the blocked Companion retest and release-package validation. Please review the cleanup ownership change and regression coverage. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThe PR preserves the process-group anchor identity after failed tool-server startup and joins authoritative cleanup before returning the launch error. Example: Remove blender-mcp after /mnt/c/openclaw-issue-1717-missing/uvx.exe fails with ENOENT.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review This PR fixes a concrete cleanup failure still present on current main, with sufficient final-head behavior and upgrade proof; no actionable introduced bugs were found. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared process supervisor launches and retires stdio children for MCP and other consumers; startup receipts and lifecycle observations determine whether callers receive an ordinary launch error or uncertain cleanup. flowchart LR
A[Conversation turn] --> B[Session MCP runtime]
B --> C[Owned stdio process]
C --> D[Relay host]
D --> E[Process group anchor]
E --> F[Tool server executable]
E --> G[Startup and closing receipts]
G --> D
Technical reviewBest possible solution: Land the focused shared-supervisor repair and retain the broader Companion report for its separate setup and restart symptoms. Do we have a high-confidence way to reproduce the issue? Source traces failed startup without a ready receipt to missing anchor identity and retained cleanup uncertainty; the linked report supplies an observed same-conversation failure, and contributor negative controls cover that path. Is this the best way to solve the issue? The fix repairs the shared producer and cleanup settlement rather than suppressing MCP errors, while retaining the existing authoritative extinction checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9940ac5fca34. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +6, Tests +153. Total +159 across 6 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel 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 HistoryReview history (3 earlier review cycles)
Reviewed October 13, 2026, 7:22 PM ET / 23:22 UTC (Revision 4). |
|
Current-head Companion recovery proof is now PASS at Actual Store Companion The unavailable stdio server was The screenshot shows the unavailable response and both later successful replies in the same conversation, with Connected visible. Required CI remains green. Latest-stable transition and retained-host helper compatibility proof are still in progress. The original setup readiness error and repeated restart loop remain unverified; this is the cleanup follow-on fix. |
Failed POSIX command startup never emits ready. Include the live anchor identity in its startup failure receipt and join bounded authoritative cleanup before returning the original launch error. Add producer, readiness-ordering, and same-session removal regressions. Preserve receipt, lineage, relay-exit, and process-group extinction checks.
e7fb9f4 to
b882bbf
Compare
|
Final-head live proof is PASS at The supported updater transitioned official stable The old host exited cleanly when its published installation identity changed, as required by that release. This is not a claim that an older host gains the fix without activation. After activation, a controlled stdio worker replacement retained the candidate Gateway PID, used a fresh worker generation, passed real discovery/invocation, and confirmed closure on removal. Actual Store Companion Correlated Gateway diagnostic: The screenshot directly shows the unavailable response, both successful later replies, and Connected in the same conversation after the stable-to-candidate transition. The rebased runtime build, nine-file lifecycle suite (97 passed, 2 Windows-only skipped), SDK declarations, canonical package integrity, core type check, six-file type-aware lint, formatting, independent/structured reviews, and final commit-coherence review passed. The optional repository-wide changed check flags an inherited max-lines suppression in ClawSweeper is already reviewing this head; this evidence addresses its previous proof request. |
) Failed POSIX command startup never emits ready. Include the live anchor identity in its startup failure receipt and join bounded authoritative cleanup before returning the original launch error. Add producer, readiness-ordering, and same-session removal regressions. Preserve receipt, lineage, relay-exit, and process-group extinction checks. Co-authored-by: Joel Fernandes <[email protected]> (cherry picked from commit 3ab06f3)
…claw#171397) Failed POSIX command startup never emits ready. Include the live anchor identity in its startup failure receipt and join bounded authoritative cleanup before returning the original launch error. Add producer, readiness-ordering, and same-session removal regressions. Preserve receipt, lineage, relay-exit, and process-group extinction checks. Co-authored-by: Joel Fernandes <[email protected]>
) Failed POSIX command startup never emits ready. Include the live anchor identity in its startup failure receipt and join bounded authoritative cleanup before returning the original launch error. Add producer, readiness-ordering, and same-session removal regressions. Preserve receipt, lineage, relay-exit, and process-group extinction checks. Co-authored-by: Joel Fernandes <[email protected]> (cherry picked from commit 3ab06f3)


Related: openclaw/openclaw-windows-node#1717
What Problem This Solves
Fixes later chat turns failing after an unavailable stdio tool server is removed on POSIX process-group runtimes.
User Impact
Users can remove a server whose executable cannot start and continue the same conversation. The original launch error and retry diagnostic remain visible.
Why This Change Was Made
Failed command startup never sends
ready, so the cleanup owner lost the process-group anchor identity. Include that identity in the failure receipt and join bounded, authoritative cleanup before returning the launch error. Receipt, lineage, relay-exit, and kernel extinction checks remain required; genuine cleanup failures still reject.Evidence
Regression negative controls on base
8197f6f8cf4failed for missing anchor identity, premature failed-start readiness, and same-session removal (cleanup could not confirm closure). The production owner files in the rebased parent are unchanged from that baseline. With this fix, the real-process session regression removes the unavailable server and prepares the next turn successfully.Required proof pools
Gateway-only change. Windows integration evidence covers
windows-11-arm64andwindows-winui-interactivefrom the Companion proof pools. The real Gateway path was exercised on Linux with Bun;windows-wsl-gateway-e2eis not qualified by this proof.Validation
Final source tree at
b882bbf627b410599fe231e2a917b4d6a80e76d3:pnpm build:runtime: passed, 45.9s.node scripts/run-vitest.mjswith the nine affected lifecycle test files: 97 passed, 2 Windows-only skipped, 44.61s.pnpm build:plugin-sdk:dtsand canonicalscripts/package-openclaw-for-docker.mjs --allow-unreleased-changelog --skip-build: passed. The package identifies the exact final commit and passed inventory/import integrity validation.git diff --check: passed.src/commands/doctor-database-port.ts. That file and its baseline are byte-identical to the PR parent, outside this fix. Additional broad test type graphs are covered by PR CI.Real behavior proof
Final-head live proof, correlated Gateway diagnostic, and screenshot.
The test used actual Store Companion
2026.9.803.0, Windows 11 ARM64, localqwen3.6-35b-a3b-mtp-ud-q4-k-s(32,768 context), and an isolated Linux Gateway on official Bun1.4.3. Configuration:tools.profile=minimal,tools.alsoAllow=["bundle-mcp"]; stdio serverblender-mcp, command/mnt/c/openclaw-issue-1717-missing/uvx.exe, argumentblender-mcp. Live changes usedconfig.get/config.patchwith revision and destructive-array acknowledgements.The supported package updater transitioned official stable
2026.10.3(59cb44796b0f) to the exact validated candidate (also manifest2026.10.3) and reportedstatus: ok. Settings, workspace, model, tools, the Companion Gateway record, stored device credential, and conversation survived. The old host exited cleanly on replaced installation identity; the candidate was then activated. No older-host recovery or mixed-version host retention is claimed.The activated candidate retained its Gateway PID through real stdio worker replacement, discovery, invocation, removal, and confirmed closure. In the same conversation, missing-executable startup then produced ENOENT/unavailable diagnostics; removal succeeded without restart, and
UPGRADE_RECOVERY_1717plusUPGRADE_FOLLOWUP_1717completed while Connected. Neither cleanup warning appeared.Not verified: WSL packaging, the original installer readiness contradiction, and the originally reported repeated restart loop. This PR addresses the reproduced cleanup follow-on failure; the broader related issue remains open. Bun exercises the repaired POSIX owner; existing native Node/Linux cleanup repairs are prior work.