Repository navigation
fix(llama-cpp): managed setup crashes and loops on macOS below 13.3 - #163358
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. Reviewed October 6, 2026, 9:32 AM ET / 13:32 UTC (Revision 11). ClawSweeper reviewWhat this changesThe llama.cpp plugin checks managed-server compatibility before downloading models, preserves working installed servers, and explains unsupported hosts without futile retry advice. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main lacks the macOS compatibility guard. The earlier reuse defect is resolved, real Monterey evidence exercises the refusal path, and no actionable patch defect remains. Priority: P2 Review scores
Verification
How this fits togetherThe llama.cpp plugin prepares a local model server for chat and memory embeddings. Guided setup selects a runtime and models, then returns provider configuration after preparation succeeds. flowchart TD
A[Guided setup and consent] --> B[Managed server installer]
B --> C{Installed server validates?}
C -->|Yes| E[Prepare chat and embedding models]
C -->|No or absent| D{Host supports pinned build?}
D -->|Yes| F[Install verified server]
F --> E
D -->|No| G[Explain compatible alternatives]
E --> H[Prepared provider configuration]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +53, Tests +164, Docs +6. Total +223 across 5 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. Technical reviewBest possible solution: Keep compatibility decisions in the existing installer, reuse validated servers, and stop unsupported managed setup before model downloads with clear alternatives. Do we have a high-confidence way to reproduce the issue? Yes: current-main installation lacks the check required by the pinned macOS build contract, and the linked report supplies the resulting Monterey loader failure. This reviewer inspected source rather than executing a Mac reproduction. Is this the best way to solve the issue? Yes: using the existing installer preserves validated reuse and configured runtime alternatives while preventing dead-end downloads; no new configuration or competing compatibility owner is needed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8787ee08687e. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
3b3e808 to
0df8638
Compare
|
Hardware proof: macOS 12.7.6 Intel iMac. Host: Build tested: both open PRs (#163317 + #163358) cherry-picked onto
|
…and retry loop The pinned b10809 macOS archives (x64 and arm64) are built with minos 13.3, and libggml-blas imports Accelerate's `_cblas_sgemm$NEWLAPACK$ILP64`, which macOS 12 does not export. On those hosts guided and embedding-only setup downloaded the build, failed with a raw `dyld: Symbol not found`, and told the user to retry, which can never succeed. Read the product version with sw_vers before reusing or downloading a macOS build and refuse below 13.3 with the route that works: build llama-server for that Mac and point models.providers.llama-cpp .localService.command at it, or use a remote provider. An unreadable version keeps the existing launch check as the guard. Host refusals, including the existing Linux glibc and musl checks, now throw UnsupportedLlamaServerHostError, and guided setup drops its "run doctor, then retry" advice for them. Fixes openclaw#128879
On macOS hosts the default asset is a Darwin build, so the new sw_vers probe ran through the test's deferred execFile mock and doubled the call count. Answer sw_vers immediately, hold only the server version probe, and count server probes by command.
The macOS floor ran before the reuse branch, so guided setup on macOS 12 refused a self-built llama-server already in the managed install path even though it passes the pinned-build validation. Reuse any build that validates; on macOS below 13.3 turn a failed validation into the host-limit error with the launch failure as its cause, and gate only fresh downloads up front.
0df8638 to
a84b032
Compare
Managed setup previously downloaded the embedding model (and, in chat mode, the chat GGUF) before calling into ensureLlamaServerInstalled, where the macOS 13.3 and Linux glibc checks live. On unsupported hosts the eventual refusal was correct, but hundreds of megabytes were already fetched for a dead-end install. Call ensureLlamaServerInstalled at the top of runLlamaCppSetup's try block instead, before any ensureLlamaCppModel call. Its validate-and- reuse branch (`installLlamaServer` returns an installed+validating server on any macOS version before asserting the OS floor) is preserved, so an older Mac with a self-built binary at the pinned release still reaches guided setup success — the earlier attempt that bypassed reuse via an unconditional host assertion is dropped. The nested call from prepareManagedLlamaServer later hits installationPromises as a cheap no-op. Tested on macOS 12.7.6 iMac11,2 (Core i3-540, no AVX): embedding-only setup refuses with the host-support message immediately when no installed server exists, with no GGUF download attempt and no dyld crash. The validating-server reuse path through guided setup is covered by a new regression test.
a681b84 to
c343b2a
Compare
Reach the version probe from a failing installed server, preserve the launch error, fix setup test formatting, and clarify later runtime revalidation. No executable production behavior changes. Co-authored-by: VACInc <[email protected]>
* commit 'c39d9b0692dbaafa5b1bfe02514c9f6411ab5546': (30 commits) fix(ci): clear MCP audit and service-worker test blockers (#166217) test(gateway): wait for steering admission in FIFO fixtures fix(llama-cpp): managed setup crashes and loops on macOS below 13.3 (#163358) perf(worktrees): avoid full session parsing during GC (#166072) fix(update): recover stopped legacy managed services (#166232) perf(gateway): stream bounded link preview metadata (#166195) perf(diagnostics): release completed Git operation state (#166214) chore(deps): update fs-safe to 0.24.1 and clone plugin source captures (#166189) feat(clients): adopt worker-local inference placement (#163647) test: serialize PowerShell completion process suites (#166229) test: stabilize release timing boundaries (#166218) refactor(sessions): persist run outcomes only; liveness comes from the run registry (#165733) test(gateway): prove mention refresh after config retargeting fix(team-reports): keep the missed closed day when catch-up runs after midnight (#165780) test(gateway): join WebChat queue admission and drain completion fix(logging): reject blank diagnostic stability query fields (#145532) fix(agents): report unparseable serialized edit arguments (#163577) improve(anthropic): log Claude Code version probe failures (#157697) fix(agents): clarify prompt-size provider failures (#159712) fix(memory): re-throw non-ENOENT/ENOTDIR errors in root memory file lookup (#107921) ...
* commit 'c39d9b0692dbaafa5b1bfe02514c9f6411ab5546': fix(ci): clear MCP audit and service-worker test blockers (#166217) test(gateway): wait for steering admission in FIFO fixtures fix(llama-cpp): managed setup crashes and loops on macOS below 13.3 (#163358) perf(worktrees): avoid full session parsing during GC (#166072)
…penclaw#163358) * fix(llama-cpp): explain the macOS 13.3 floor instead of a dyld crash and retry loop The pinned b10809 macOS archives (x64 and arm64) are built with minos 13.3, and libggml-blas imports Accelerate's `_cblas_sgemm$NEWLAPACK$ILP64`, which macOS 12 does not export. On those hosts guided and embedding-only setup downloaded the build, failed with a raw `dyld: Symbol not found`, and told the user to retry, which can never succeed. Read the product version with sw_vers before reusing or downloading a macOS build and refuse below 13.3 with the route that works: build llama-server for that Mac and point models.providers.llama-cpp .localService.command at it, or use a remote provider. An unreadable version keeps the existing launch check as the guard. Host refusals, including the existing Linux glibc and musl checks, now throw UnsupportedLlamaServerHostError, and guided setup drops its "run doctor, then retry" advice for them. Fixes openclaw#128879 * test(llama-cpp): keep the install cancellation test host-independent On macOS hosts the default asset is a Darwin build, so the new sw_vers probe ran through the test's deferred execFile mock and doubled the call count. Answer sw_vers immediately, hold only the server version probe, and count server probes by command. * fix(llama-cpp): keep reusing a validating server on older macOS The macOS floor ran before the reuse branch, so guided setup on macOS 12 refused a self-built llama-server already in the managed install path even though it passes the pinned-build validation. Reuse any build that validates; on macOS below 13.3 turn a failed validation into the host-limit error with the launch failure as its cause, and gate only fresh downloads up front. * fix(llama-cpp): refuse unsupported hosts before any download Managed setup previously downloaded the embedding model (and, in chat mode, the chat GGUF) before calling into ensureLlamaServerInstalled, where the macOS 13.3 and Linux glibc checks live. On unsupported hosts the eventual refusal was correct, but hundreds of megabytes were already fetched for a dead-end install. Call ensureLlamaServerInstalled at the top of runLlamaCppSetup's try block instead, before any ensureLlamaCppModel call. Its validate-and- reuse branch (`installLlamaServer` returns an installed+validating server on any macOS version before asserting the OS floor) is preserved, so an older Mac with a self-built binary at the pinned release still reaches guided setup success — the earlier attempt that bypassed reuse via an unconditional host assertion is dropped. The nested call from prepareManagedLlamaServer later hits installationPromises as a cheap no-op. Tested on macOS 12.7.6 iMac11,2 (Core i3-540, no AVX): embedding-only setup refuses with the host-support message immediately when no installed server exists, with no GGUF download attempt and no dyld crash. The validating-server reuse path through guided setup is covered by a new regression test. * test(llama-cpp): exercise unreadable macOS version handling Reach the version probe from a failing installed server, preserve the launch error, fix setup test formatting, and clarify later runtime revalidation. No executable production behavior changes. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: xXG0DLessXx <[email protected]> Co-authored-by: NovaUnboundAi <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: VACInc <[email protected]>
…163358) * fix(llama-cpp): explain the macOS 13.3 floor instead of a dyld crash and retry loop The pinned b10809 macOS archives (x64 and arm64) are built with minos 13.3, and libggml-blas imports Accelerate's `_cblas_sgemm$NEWLAPACK$ILP64`, which macOS 12 does not export. On those hosts guided and embedding-only setup downloaded the build, failed with a raw `dyld: Symbol not found`, and told the user to retry, which can never succeed. Read the product version with sw_vers before reusing or downloading a macOS build and refuse below 13.3 with the route that works: build llama-server for that Mac and point models.providers.llama-cpp .localService.command at it, or use a remote provider. An unreadable version keeps the existing launch check as the guard. Host refusals, including the existing Linux glibc and musl checks, now throw UnsupportedLlamaServerHostError, and guided setup drops its "run doctor, then retry" advice for them. Fixes #128879 * test(llama-cpp): keep the install cancellation test host-independent On macOS hosts the default asset is a Darwin build, so the new sw_vers probe ran through the test's deferred execFile mock and doubled the call count. Answer sw_vers immediately, hold only the server version probe, and count server probes by command. * fix(llama-cpp): keep reusing a validating server on older macOS The macOS floor ran before the reuse branch, so guided setup on macOS 12 refused a self-built llama-server already in the managed install path even though it passes the pinned-build validation. Reuse any build that validates; on macOS below 13.3 turn a failed validation into the host-limit error with the launch failure as its cause, and gate only fresh downloads up front. * fix(llama-cpp): refuse unsupported hosts before any download Managed setup previously downloaded the embedding model (and, in chat mode, the chat GGUF) before calling into ensureLlamaServerInstalled, where the macOS 13.3 and Linux glibc checks live. On unsupported hosts the eventual refusal was correct, but hundreds of megabytes were already fetched for a dead-end install. Call ensureLlamaServerInstalled at the top of runLlamaCppSetup's try block instead, before any ensureLlamaCppModel call. Its validate-and- reuse branch (`installLlamaServer` returns an installed+validating server on any macOS version before asserting the OS floor) is preserved, so an older Mac with a self-built binary at the pinned release still reaches guided setup success — the earlier attempt that bypassed reuse via an unconditional host assertion is dropped. The nested call from prepareManagedLlamaServer later hits installationPromises as a cheap no-op. Tested on macOS 12.7.6 iMac11,2 (Core i3-540, no AVX): embedding-only setup refuses with the host-support message immediately when no installed server exists, with no GGUF download attempt and no dyld crash. The validating-server reuse path through guided setup is covered by a new regression test. * test(llama-cpp): exercise unreadable macOS version handling Reach the version probe from a failing installed server, preserve the launch error, fix setup test formatting, and clarify later runtime revalidation. No executable production behavior changes. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: xXG0DLessXx <[email protected]> Co-authored-by: NovaUnboundAi <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: VACInc <[email protected]> (cherry picked from commit 8f5c33c)
…penclaw#163358) * fix(llama-cpp): explain the macOS 13.3 floor instead of a dyld crash and retry loop The pinned b10809 macOS archives (x64 and arm64) are built with minos 13.3, and libggml-blas imports Accelerate's `_cblas_sgemm$NEWLAPACK$ILP64`, which macOS 12 does not export. On those hosts guided and embedding-only setup downloaded the build, failed with a raw `dyld: Symbol not found`, and told the user to retry, which can never succeed. Read the product version with sw_vers before reusing or downloading a macOS build and refuse below 13.3 with the route that works: build llama-server for that Mac and point models.providers.llama-cpp .localService.command at it, or use a remote provider. An unreadable version keeps the existing launch check as the guard. Host refusals, including the existing Linux glibc and musl checks, now throw UnsupportedLlamaServerHostError, and guided setup drops its "run doctor, then retry" advice for them. Fixes openclaw#128879 * test(llama-cpp): keep the install cancellation test host-independent On macOS hosts the default asset is a Darwin build, so the new sw_vers probe ran through the test's deferred execFile mock and doubled the call count. Answer sw_vers immediately, hold only the server version probe, and count server probes by command. * fix(llama-cpp): keep reusing a validating server on older macOS The macOS floor ran before the reuse branch, so guided setup on macOS 12 refused a self-built llama-server already in the managed install path even though it passes the pinned-build validation. Reuse any build that validates; on macOS below 13.3 turn a failed validation into the host-limit error with the launch failure as its cause, and gate only fresh downloads up front. * fix(llama-cpp): refuse unsupported hosts before any download Managed setup previously downloaded the embedding model (and, in chat mode, the chat GGUF) before calling into ensureLlamaServerInstalled, where the macOS 13.3 and Linux glibc checks live. On unsupported hosts the eventual refusal was correct, but hundreds of megabytes were already fetched for a dead-end install. Call ensureLlamaServerInstalled at the top of runLlamaCppSetup's try block instead, before any ensureLlamaCppModel call. Its validate-and- reuse branch (`installLlamaServer` returns an installed+validating server on any macOS version before asserting the OS floor) is preserved, so an older Mac with a self-built binary at the pinned release still reaches guided setup success — the earlier attempt that bypassed reuse via an unconditional host assertion is dropped. The nested call from prepareManagedLlamaServer later hits installationPromises as a cheap no-op. Tested on macOS 12.7.6 iMac11,2 (Core i3-540, no AVX): embedding-only setup refuses with the host-support message immediately when no installed server exists, with no GGUF download attempt and no dyld crash. The validating-server reuse path through guided setup is covered by a new regression test. * test(llama-cpp): exercise unreadable macOS version handling Reach the version probe from a failing installed server, preserve the launch error, fix setup test formatting, and clarify later runtime revalidation. No executable production behavior changes. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: xXG0DLessXx <[email protected]> Co-authored-by: NovaUnboundAi <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: VACInc <[email protected]> (cherry picked from commit 8f5c33c) (cherry picked from commit e0de414) Co-authored-by: RomneyDa <[email protected]>
Closes #128879
What Problem This Solves
Managed llama.cpp setup on macOS below 13.3 can download models and a native build that cannot load, then recommend a retry that cannot succeed. The issue is the operating-system version, not the age of the Mac.
User Impact
Guided setup refuses an incompatible managed build before downloading chat or embedding GGUFs and explains the compatible-server or remote-provider alternatives. An installed binary that passes pinned-build validation is still reused on older macOS. A configured compatible
localService.commandremains supported for runtime chat and local embeddings. This does not make the published native binaries compatible with older macOS.Why This Change Was Made
Both pinned b10809 macOS archives require the newer Accelerate LAPACK interface. Compatibility remains owned by the existing installer: it checks
sw_vers -productVersionwhen a fresh build is needed or an existing binary fails validation, preserving successful reuse first. Guided setup calls that installer before model downloads. It does not use an unconditional setup-level host assertion.Unreadable OS versions retain launch validation as the fallback. Host refusals, including the existing Linux glibc/musl refusals, use
UnsupportedLlamaServerHostError, so guided setup reports “unavailable on this host” without futile retry advice. The existing generic runtime-embedding recovery wrapper is unchanged. The custom-command alternative is manual/runtime configuration, not a promise that rerunning guided installation preserves an arbitrary custom executable.The follow-up corrections only repair test formatting, exercise the previously untested unreadable-version branch, and correct the comment about the second installer call: it revalidates the installed binary rather than using a completed-promise cache. They change no executable production behavior.
Evidence
LC_BUILD_VERSIONminos 13.3.0. Both servers strongly linklibggml-blas.0.dylib; the packaged BLAS libraries have a non-weak undefined_cblas_sgemm$NEWLAPACK$ILP64import from system Accelerate. This was binary inspection, not execution on macOS.sw_versand asserts that its failure does not replace the original launch error.scoped-clean, exit 0, and no P0–P2 findings. This was static review, not a test execution.ab16354ce7f7ac69ce40c772e0f13b196bebd66e, including lint, docs, production/test types, owner tests, andopenclaw/ci-gate. The owner-test job executed synthetic mergecab0da4fc00591e062cc72186379d71330eefaa6, which includes this head. No contributor hooks, tests, scripts, or configuration were executed on the credentialed local host.c343b2a2e8c8460754163874ba4272e7342bbcc4also records a repeated refusal on that host. These are contributor reports, not newly performed Mac runs. No paired Mac was available for the independent review.pnpm test <file> --maxWorkers=1measurement was not run locally because of the source-isolation boundary; the grouped CI duration is not represented as a per-file standalone measurement.Original implementation and Monterey hardware evidence: @NovaUnboundAi.