Skip to content

fix(cli): keep help from loading inactive provider runtimes - #121997

Merged
steipete merged 1 commit into
mainfrom
codex/fix-cli-help-resource-cleanup
Aug 11, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-cli-help-resource-cleanup

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where cache-cold CLI help metadata generation could exceed its render deadline on a saturated host because every help process loaded provider cleanup runtimes that it had never activated.

Why This Change Was Made

Provider owners now record lightweight lifecycle facts when local services or the transport dispatcher pool actually exist. CLI teardown consults those facts before importing the heavyweight cleanup implementations, while preserving the existing sequential cleanup for real provider commands. Timeout values and help output are unchanged.

User Impact

Help and version commands avoid unnecessary provider-runtime loading, making generated CLI metadata and other cold help paths more resilient under load. Normal provider execution and cleanup behavior are unchanged.

Evidence

  • Failure evidence: a cache-cold source build timed out rendering nodes --help at 120 seconds while unrelated build phases were 2–10× slower; the same code completed in 46.7 seconds on a normally loaded run.
  • Focused Blacksmith Testbox proof: 255 tests passed across run-main.exit, provider local-service lifecycle, and dispatcher-pool lifecycle (run).
  • Focused follow-up: provider local-service 22/22 passed; targeted Oxlint and oxfmt checks passed (run).
  • Core and core-test typechecks, API-contract guards, boundary guards, and dead-export checks passed on Blacksmith Testbox.
  • Autoreview: clean, no accepted/actionable findings.

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes agents Agent runtime and tooling labels Aug 11, 2026
@steipete steipete self-assigned this Aug 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 11, 2026
@steipete
steipete merged commit 452cf09 into main Aug 11, 2026
126 checks passed
@steipete
steipete deleted the codex/fix-cli-help-resource-cleanup branch August 11, 2026 10:51
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

agents Agent runtime and tooling cli CLI command changes maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant