Skip to content

fix(doctor): reclaim runtimes despite unrelated Node processes - #177407

Merged
steipete merged 4 commits into
mainfrom
upd/upd-l1701
Oct 19, 2026
Merged

steipete merged 4 commits into
mainfrom
upd/upd-l1701

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #173082

What Problem This Solves

Post-update Doctor indefinitely retains abandoned updater runtimes when an unrelated Node process has no ancestor package.json, including LM Studio's long-lived node -e helper.

User Impact

A process with readable cwd, no package manifest through the filesystem root, and no OpenClaw or retained-runtime evidence no longer prevents cleanup. Unavailable cwd still means unknown custody for every process unless main's existing foreign-owner or standard systemd/PAM exemption applies. Unknown custody retains all candidates it cannot exclude, emits one warning naming the PID and reason, and does not abort the census.

Thanks @DonnieFi, @angeliti999, and @woshicby for the Debian, Ubuntu, and macOS reports.

Why This Change Was Made

The package-identity owner (src/infra/gateway-process-argv.ts, also bundled into service-child anchoring) distinguishes a completed search with no manifest from unreadable or malformed metadata. The census keeps explicit holder, not-holder, and unknown outcomes; Doctor consumes them per candidate runtime. Known resolved runtime paths preserve their candidates, while unscoped uncertainty preserves all candidates. Incomplete process enumeration or ancestry still prevents cleanup. Strict identity admission and update-repair handoff contracts remain conservative.

All three accepted autoreview P1s are addressed. The second correction restores main's unavailable-cwd gate and its exact exemption predicates for all processes, including non-Node commands and scriptless Node. The parent command again verifies the systemd PAM exemption. Redundant holder-path construction and runtime-syntax warning reset bookkeeping were removed without dropping unresolved artifact evidence. A missing process command is now explicitly unknown; only the reader-admitted unavailable/empty-argv shapes retain their previous exemption. Unrelated missing-command rows reach per-PID classification instead of aborting the census preflight; missing inspector identity and incomplete ancestry still fail conservatively.

Evidence

Head: 519941cca53a086d9109ca7d55fb12983de8b198.

  • Earlier regression proof on 91405918: /bin/sh worker.sh and scriptless /usr/bin/node -e with unavailable cwd were omitted from retention and emitted no warning; an absolute foreign Node script was also incorrectly excluded after a partial Darwin cwd scan. The corrected census retains them with warnings and continues inspecting later holders. Tests also preserve systemd/PAM and foreign-owner exemptions, no-manifest cleanup, and per-runtime decisions.
  • The missing-command regression is red on 9a1d12aa: the census aborts with OpenClaw process census is incomplete. With the correction it retains the unknown PID, reports process command is unavailable, and continues to the later known holder. The existing empty-argv, foreign-owner, and systemd/PAM tests still pass.
  • Cross-caller proof: 249 tests passed, with one Windows-native test skipped on macOS, across three shards in 53.95s wall time. No slow test bodies were encountered; the first shard spent 74% of its 31.37s duration in compiler transformation. Command: node scripts/run-vitest.mjs src/infra/openclaw-process-census.missing-command.test.ts src/infra/openclaw-process-census.test.ts src/infra/windows-process-census.native.test.ts src/infra/update-retained-runtime.test.ts src/plugins/plugin-source-capture-recovery.test.ts src/plugins/plugin-source-capture-directory.test.ts src/flows/doctor-retained-runtime.settlement.test.ts src/flows/doctor-plugin-source-captures.test.ts src/flows/doctor-retained-runtime.test.ts --maxWorkers=1.
  • Targeted node scripts/run-tsgo.mjs --noEmit -p .artifacts/tsconfig.l1701.json, scoped node scripts/run-oxlint.mjs --tsconfig tsconfig.json on this correction’s production and regression files, oxfmt, git diff --check, and Madge pass. The temporary typecheck config extends the root config and includes the touched sources/tests and canonical ambient declarations.
  • Independent Codex review of this correction: no actionable P0–P2 findings.
  • This correction versus 9a1d12aa: production +9 / -6 (net +3), tests +34 / -0 (net +34). Full PR versus merge base: production +202 / -129 (net +73), tests +212 / -109 (net +103), docs +1 / -1. The three production lines restore the explicit missing-command distinction; the regression uses a separate file because the existing census suite is at its lint size budget. No new configuration, dependency, schema, or persistent state.

Real-process proof

Re-ran the production census and Doctor cleanup owner in an isolated local OrbStack Debian 13 VM (l1701-proof, Node 24.22.0), with real manifest-free node -e and /standalone/dist/index.js processes, a permission-denied manifest, and a relative-entrypoint runtime holder with an equals-form preload. HOME and state were isolated; all children and the VM were removed afterward. No remote lease or operator Gateway was used.

Commands: docker run --rm --entrypoint cat node:24-bookworm /usr/local/bin/node > .artifacts/node; bundle the isolated proof entry with node_modules/.bin/esbuild .artifacts/census-ruling-final.mts --bundle --platform=node --format=esm --banner:js='import { createRequire as proofRequire } from "node:module"; const require = proofRequire(import.meta.url);' --outfile=.artifacts/third-p1-live.mjs; create the local VM with orb create --isolated --mount "$PWD/.artifacts:/proof" --cpus 2 --memory 2G --disk 4G debian:trixie l1701-proof; run orb -m l1701-proof env HOME=/proof/home OPENCLAW_STATE_DIR=/proof/state TMPDIR=/proof-data/tmp /proof/node /proof/third-p1-live.mjs; remove it with orb delete --force l1701-proof.

manifest-free/eval census {"pids":[]}
manifest-free/eval cleanup: Free01 removed; Held01 removed
unknown-permission census: PID 1367 retained; "could not read package identity" warning
unknown-permission cleanup: both candidates retained; one warning for PID 1367
mixed-runtime census {"pids":[1374]}
mixed-runtime cleanup: Free01 removed; Held01 retained
holder-exited census {"pids":[]}
holder-exited cleanup: Held01 removed
PASS: manifest absence, unknown permission retention, one warning, scoped mixed cleanup, and holder exit

Limitations: this exercises Doctor's production census/cleanup boundary, not a complete published-version upgrade. A previous native macOS probe stopped before classification on the host's ProcSafeError: incomplete: unterminated Darwin environment; deterministic Darwin fixtures cover unavailable cwd and partial/time-out scans. Full check:changed/SQLite inventory remains skipped under the campaign's local gate budget; PR CI supplies broad proof.

Treat exhausted package lookup as absent and keep unresolved process
classification local to each PID. Preserve positive OpenClaw identities
and runtime references, and continue inspecting remaining processes and
module operands before deciding cleanup custody.

Fixes #173082. Thanks @DonnieFi, @angeliti999, and @woshicby for the reports.
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review October 19, 2026 14:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T15:16:33.598980Z 519941c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M labels Oct 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 020674ac6f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/infra/openclaw-process-census.ts Outdated
Comment on lines +87 to +89
if (classifyOpenClawArgv(argv, options).kind === "openclaw") {
return true;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve active OpenClaw processes when package evidence is unreadable

When an active OpenClaw process uses a canonical entrypoint such as node /app/dist/index.js but its package.json is temporarily unreadable or malformed, classifyOpenClawArgv returns unclassified; this branch now ignores that result, the fallback classification is likewise discarded, and the census reports no holder. Both maintainRetainedUpdateRuntimes and noteLegacyPluginSourceCaptures interpret an empty census as permission to remove artifacts, so Doctor can delete captures or retained runtime files while that OpenClaw process is still using them. Keep unresolved canonical OpenClaw entrypoint evidence conservative without allowing unrelated manifest-free Node processes to abort the entire census.

Useful? React with 👍 / 👎.

Keep manifest absence distinct from unavailable process evidence. Retain
unscoped unknown holders with a PID warning while allowing independent
runtimes to be reclaimed. Resolve and combine argv, cwd, entrypoint, and
preload paths before applying runtime-specific custody decisions.

Preserve unresolved references when only runtime syntax is clarified,
and keep strict identity admission at its existing package boundary.
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the accepted P1 in 91405918d5395d5afabf2072f35a80674d170b68. Package absence and unknown custody are separate closed outcomes. Unknown evidence retains all candidates it cannot rule out, with one PID/reason warning; fully resolved holder paths support per-runtime cleanup. Relative paths, aliases, option values, and combined cwd/preload/entrypoint references retain their evidence. The real Debian proof covers no-manifest cleanup, denied metadata, scoped mixed cleanup, and reclamation after holder exit. 264 affected tests passed; scoped typecheck/lint/format and independent review passed. Evidence and LOC are updated in the PR body.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the second accepted P1 at 9a1d12a. Restored the existing unavailable-cwd gate and exact foreign-owner/systemd/PAM exemptions for every process, including non-Node relative commands. The new regressions were red on 9140591; 268 tests and the Debian real-process cleanup proof now pass. Production delta for this correction: -1 line. PR evidence is current.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. label Oct 19, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the third accepted P1 at 519941c: missing process command is explicitly unknown, retains candidates with a PID/reason warning, and does not stop inspection of later holders. The existing argvUnavailable/empty-argv behavior is unchanged. Regression red on 9a1d12a, green here; 249 affected tests passed (one Windows-native skip), targeted checks and Debian real-process cleanup proof passed. PR evidence is updated.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 519941cca5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +100 to +104
const evidence = classifyOpenClawEntrypointPath(reference, options);
if (evidence.kind === "openclaw" && evidence.artifactPath) {
return [evidence.artifactPath];
}
if (typeof position !== "number" && position.kind === "not-runtime") {
return false;
unknown ??= evidence.kind === "unclassified" ? evidence.reason : "runtime path is unresolved";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve file-URL artifact references before marking custody unknown

When a worker preloads a retained runtime using a supported option such as node --import=file:///tmp/openclaw-update-runtime-Held01/preload.js app.js, this prepass sends the file: URL directly to classifyOpenClawEntrypointPath, which treats it as a relative filesystem path and records could not resolve script. Although the later operand loop correctly converts the URL with fileURLToPath and finds the exact held runtime, the earlier unknown value is never cleared, so the process becomes an unscoped unknown and prevents Doctor from reclaiming every unrelated runtime. Local Node 24.15 node --help confirms that --import=... is a supported ES-module preload form; normalize module file URLs here or discard the provisional unknown once all references are resolved.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Distinguish missing package manifests from unavailable process evidence and scope Doctor cleanup to each retained runtime.

Example: A manifest-free node -e helper remains running after an update.

  • Before: Package lookup fails and Doctor retains abandoned updater runtimes.
  • After: With readable process evidence and no OpenClaw references, the helper permits cleanup.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful direction with credible production-boundary evidence, but unsafe scoped custody and two additional consumer/classification defects prevent merging.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Unrelated long-lived Node processes permanently prevent cleanup and leave large updater runtimes accumulating on disk.
Reason: Multiple concrete reports establish user value, and maintainer authorship supplies the direction decision for distinguishing proven manifest absence from failed inspection.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep open: this maintainer-authored PR addresses a confirmed cleanup failure, but three actionable defects remain, including a path that can reclaim an in-use runtime.

Priority: P1
Reviewed head: 519941cca53a086d9109ca7d55fb12983de8b198

Before merge

  • Check unavailable cwd before returning scoped runtime custody (P1) - For node /tmp/openclaw-update-runtime-Held01/worker.js with an unreadable cwd, the parser returns no module operands and this shortcut returns a holder scoped only to Held01. If the process actually has cwd inside Free01, the later per-runtime filter excludes it while inspecting Free01, allowing Doctor to remove that live directory. The same trigger exists for an absolute shell script. Previously the raw artifact reference preserved all candidates. Apply the unavailable-cwd decision before returning scoped custody, preserving the existing narrow exemptions, and add a regression combining a known argument path with an unavailable cwd.
  • Normalize file URLs before recording unresolved artifact evidence (P2) - With node --import=file:///tmp/openclaw-update-runtime-Held01/preload.js /standalone/app.js, this prepass passes the URL directly to filesystem-path classification and records could not resolve script. The operand loop later converts it with fileURLToPath and resolves Held01, but the earlier unknown survives, so every unrelated runtime remains retained. Normalize the URL before this classification or avoid retaining provisional uncertainty for the same successfully resolved operand. This confirms the existing discussion at fix(doctor): reclaim runtimes despite unrelated Node processes #177407 (comment).
  • Propagate census warnings through legacy capture cleanup (P2) - For an unrelated Node process with denied package metadata, the census now returns its PID and a reason in warnings instead of throwing an error. This consumer ignores warnings and reports only that other OpenClaw processes are running. Consequently legacy capture cleanup loses the inspection reason and falsely identifies the unrelated process as OpenClaw. Consume and report the new warnings before rejecting the holder list, with deduplication across cleanup attempts, and verify the legacy-capture Doctor output.

Findings

  • [P1] Check unavailable cwd before returning scoped runtime custody — src/infra/openclaw-process-census.ts:107-108
  • [P2] Normalize file URLs before recording unresolved artifact evidence — src/infra/openclaw-process-census.ts:99-104
  • [P2] Propagate census warnings through legacy capture cleanup — src/commands/doctor-plugin-source-captures.ts:31-37

Tests

  • Missing end-to-end proof: The supplied proof does not exercise a published-stable upgrade with existing settings and data intact, as required for this Doctor/update change.
Agent review details

How this fits together

Doctor and update cleanup consume process-census custody decisions to preserve live artifacts and remove recognized abandoned runtime directories.

flowchart TD
  A[Doctor or update cleanup] --> B[Recognized runtime candidates]
  B --> C[Process census]
  C --> D[Package and path evidence]
  D --> E[Per runtime custody decision]
  E --> F[Preserve with diagnostics]
  E --> G[Remove abandoned runtime]
Loading

Technical review

Best possible solution:

Keep classification in the existing census owner, require complete evidence before narrowing custody, normalize file URLs consistently, and preserve uncertainty diagnostics in both cleanup consumers.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the reported manifest-search-to-retention path, and the linked reports identify affected releases; this read-only review ran no target code.

Is this the best way to solve the issue?

The explicit absent-versus-unknown distinction uses the correct existing owners, but scoped custody must account for unavailable cwd and every diagnostic consumer.

Full review comments:

  • [P1] Check unavailable cwd before returning scoped runtime custody — src/infra/openclaw-process-census.ts:107-108
    For node /tmp/openclaw-update-runtime-Held01/worker.js with an unreadable cwd, the parser returns no module operands and this shortcut returns a holder scoped only to Held01. If the process actually has cwd inside Free01, the later per-runtime filter excludes it while inspecting Free01, allowing Doctor to remove that live directory. The same trigger exists for an absolute shell script. Previously the raw artifact reference preserved all candidates. Apply the unavailable-cwd decision before returning scoped custody, preserving the existing narrow exemptions, and add a regression combining a known argument path with an unavailable cwd.
    Confidence: 0.99
  • [P2] Normalize file URLs before recording unresolved artifact evidence — src/infra/openclaw-process-census.ts:99-104
    With node --import=file:///tmp/openclaw-update-runtime-Held01/preload.js /standalone/app.js, this prepass passes the URL directly to filesystem-path classification and records could not resolve script. The operand loop later converts it with fileURLToPath and resolves Held01, but the earlier unknown survives, so every unrelated runtime remains retained. Normalize the URL before this classification or avoid retaining provisional uncertainty for the same successfully resolved operand. This confirms the existing discussion at fix(doctor): reclaim runtimes despite unrelated Node processes #177407 (comment).
    Confidence: 0.99
  • [P2] Propagate census warnings through legacy capture cleanup — src/commands/doctor-plugin-source-captures.ts:31-37
    For an unrelated Node process with denied package metadata, the census now returns its PID and a reason in warnings instead of throwing an error. This consumer ignores warnings and reports only that other OpenClaw processes are running. Consequently legacy capture cleanup loses the inspection reason and falsely identifies the unrelated process as OpenClaw. Consume and report the new warnings before rejecting the holder list, with deduplication across cleanup attempts, and verify the legacy-capture Doctor output.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c3656d831b80.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/infra/openclaw-process-census.test.ts src/infra/openclaw-process-census.missing-command.test.ts --maxWorkers=1
  • pnpm test src/flows/doctor-retained-runtime.test.ts src/flows/doctor-plugin-source-captures.test.ts --maxWorkers=1
  • pnpm test src/infra/update-retained-runtime.test.ts src/plugins/plugin-source-capture-recovery.test.ts src/plugins/plugin-source-capture-directory.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 5f8e15a adds src/infra/temp-artifact-cleanup.ts:89 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5f8e15abdef4; files: src/infra/temp-artifact-cleanup.ts)
  • Dallin Romney: Raw commit 88a4f54 adds src/infra/openclaw-process-census.ts:38 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 88a4f54164de; files: src/infra/openclaw-process-census.ts)

PR surface

Source +73, Tests +103, Docs 0. Total +176 across 7 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 3 202 129 +73
Tests 3 212 109 +103
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 415 239 +176

Review metrics

Metric Value Why it matters
Production versus regression code Production +202/-129; tests +212/-109 The added distinctions and per-runtime custody decisions justify focused growth within existing owners; no separate manager or persistent store is introduced.

Labels

Label changes:

  • add P1: The proposed custody shortcut can permit deletion of files still used by a running runtime.
  • add merge-risk: 🚨 availability: Premature reclamation can break a live worker's subsequent file access or module loading.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P1: The proposed custody shortcut can permit deletion of files still used by a running runtime.
  • merge-risk: 🚨 availability: Premature reclamation can break a live worker's subsequent file access or module loading.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 11:25 AM ET / 15:25 UTC.

@steipete
steipete deleted the upd/upd-l1701 branch October 19, 2026 16:06
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
…law#177407)

Doctor's update-runtime cleanup inspects running processes to decide which retained update runtimes are still in use. Any unrelated Node process whose script had no package.json anywhere up to the filesystem root (for example a workspace server.mjs, or a long-lived 'node -e' helper such as LM Studio's) made package identity resolution throw, which aborted the whole census and kept every runtime forever. Such processes are now classified as not OpenClaw when their working directory is readable and the manifest search is exhausted. Every case with missing evidence (missing command, unavailable working directory, permission or timeout errors, unresolved runtime paths) retains the candidate runtimes with a warning naming the PID, and the census continues instead of aborting; existing exemptions are unchanged.

Fixes openclaw#173082
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: doctor retains an update runtime when a Node process has no package.json

1 participant