Skip to content

fix(llama-cpp): managed setup crashes and loops on macOS below 13.3 - #163358

Merged
VACInc merged 5 commits into
openclaw:mainfrom
xXG0DLessXx:fix/llama-cpp-macos-floor
Oct 6, 2026
Merged

VACInc merged 5 commits into
openclaw:mainfrom
xXG0DLessXx:fix/llama-cpp-macos-floor

Conversation

@NovaUnboundAi

@NovaUnboundAi NovaUnboundAi commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

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.command remains 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 -productVersion when 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

  • Independent archive inspection: downloaded both real b10809 macOS archives and matched their SHA-256 digests to the repository pins. All 39 x64 and 41 arm64 Mach-O files declare LC_BUILD_VERSION minos 13.3.0. Both servers strongly link libggml-blas.0.dylib; the packaged BLAS libraries have a non-weak undefined _cblas_sgemm$NEWLAPACK$ILP64 import from system Accelerate. This was binary inspection, not execution on macOS.
  • Upstream contract: the pinned release workflow sets deployment target 13.3 for both architectures. The BLAS build enables the new LAPACK/ILP64 interfaces introduced in macOS 13.3.
  • Coverage: installer tests cover pre-download refusal, validating-binary reuse, preserved launch causes, supported versions, and the unreadable-version probe. Setup tests cover no-retry host errors, refusal before model downloads, and successful reuse. The corrected unreadable-version case actually invokes sw_vers and asserts that its failure does not replace the original launch error.
  • Fresh independent autoreview: the complete PR candidate, including the follow-up corrections and full relevant source context, completed with scoped-clean, exit 0, and no P0–P2 findings. This was static review, not a test execution.
  • Exact-head CI: run 37469240120 passed for ab16354ce7f7ac69ce40c772e0f13b196bebd66e, including lint, docs, production/test types, owner tests, and openclaw/ci-gate. The owner-test job executed synthetic merge cab0da4fc00591e062cc72186379d71330eefaa6, which includes this head. No contributor hooks, tests, scripts, or configuration were executed on the credentialed local host.
  • ClawSweeper: revision 10, completed at 2026-10-06 13:20 UTC on the same head, reports no actionable findings and “Ready for maintainer review.”
  • Contributor-reported hardware: the Monterey transcript records custom-server embeddings and embedding-only setup refusal; implementation commit c343b2a2e8c8460754163874ba4272e7342bbcc4 also 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.
  • Test cost: the owner CI job passed 159 tests across 7 files in 11.22 seconds of runner-reported duration; the whole CI job took 100 seconds including setup. The corrected unreadable-version case passed in 9 ms. The contributor previously reported 9 seconds standalone wall time for the installer file. A fresh standalone pnpm test <file> --maxWorkers=1 measurement 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.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: llama-cpp size: S labels Oct 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 9:32 AM ET / 13:32 UTC (Revision 11).

ClawSweeper review

What this changes

The 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
Reviewed head: ab16354ce7f7ac69ce40c772e0f13b196bebd66e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful repair with real hardware evidence, resolved prior findings, and successful pinned-head CI.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Contributor terminal evidence exercises the changed installer through actual embedding-only provider setup on macOS 12.7.6, showing immediate refusal, zero model downloads, and actionable guidance. Custom-server memory output supports runtime compatibility; validating managed-path reuse has focused regression coverage. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Contributor terminal evidence exercises the changed installer through actual embedding-only provider setup on macOS 12.7.6, showing immediate refusal, zero model downloads, and actionable guidance. Custom-server memory output supports runtime compatibility; validating managed-path reuse has focused regression coverage. No stored-data contract changes.
Evidence reviewed 8 items Pinned introduction scope: Reviewed the merge-base-to-head introduced diff and original owner code. Changes are confined to llama.cpp installation, guided setup, their tests, and documentation; unrelated endpoint drift is excluded.
Compatibility and setup ordering: The installer validates an existing server before enforcing the macOS floor. Guided setup invokes that same installer before model downloads, and distinguishes unsupported-host errors from recoverable failures.
Still absent from main and release: Fetched main still downloads models before runtime preparation and has no macOS version guard. Inspection of v2026.9.8 also found the original installer path, so neither establishes a merged replacement for this work.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +53, Tests +164, Docs +6. Total +223 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 57 4 +53
Tests 2 166 2 +164
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 229 6 +223

Review metrics

Metric Value Why it matters
Production versus test growth production +57/-4; tests +166/-2 Production growth is justified by installer-owned compatibility detection and earlier runtime preparation.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #128879
Summary: This PR implements the linked report's acceptable minimum remedy: actionable refusal for incompatible managed binaries.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This repairs a bounded managed-provider setup failure on older macOS without changing working runtime configurations.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Contributor terminal evidence exercises the changed installer through actual embedding-only provider setup on macOS 12.7.6, showing immediate refusal, zero model downloads, and actionable guidance. Custom-server memory output supports runtime compatibility; validating managed-path reuse has focused regression coverage. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Contributor terminal evidence exercises the changed installer through actual embedding-only provider setup on macOS 12.7.6, showing immediate refusal, zero model downloads, and actionable guidance. Custom-server memory output supports runtime compatibility; validating managed-path reuse has focused regression coverage. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduction scope: Reviewed the merge-base-to-head introduced diff and original owner code. Changes are confined to llama.cpp installation, guided setup, their tests, and documentation; unrelated endpoint drift is excluded. (extensions/llama-cpp/src/llama-server-install.ts:77, ab16354ce7f7)
  • Compatibility and setup ordering: The installer validates an existing server before enforcing the macOS floor. Guided setup invokes that same installer before model downloads, and distinguishes unsupported-host errors from recoverable failures. (extensions/llama-cpp/src/setup.ts:411, ab16354ce7f7)
  • Still absent from main and release: Fetched main still downloads models before runtime preparation and has no macOS version guard. Inspection of v2026.9.8 also found the original installer path, so neither establishes a merged replacement for this work. (extensions/llama-cpp/src/llama-server-install.ts:382, 8787ee08687e)
  • Verified dependency contract: The target asset table pins this upstream commit. Its release workflow sets CMAKE_OSX_DEPLOYMENT_TARGET=13.3 for both macOS architectures; its BLAS build enables ACCELERATE_NEW_LAPACK and ACCELERATE_LAPACK_ILP64. This directly supports the new compatibility check. (.github/workflows/release.yml:64, 5266f24da75d)
  • Real Monterey behavior proof: The captured comment fix(llama-cpp): managed setup crashes and loops on macOS below 13.3 #163358 (comment) reports the actual provider-login entrypoint on macOS 12.7.6: embedding-only setup reaches the new host refusal immediately after consent, leaves the model directory empty, and displays compatible-server guidance without retry advice. Separate memory-status output demonstrates working custom-server embeddings. Commit c343b2a records a repeated refusal on that host; subsequent head changes affect tests and a comment. (extensions/llama-cpp/src/setup.ts:411, c343b2a2e8c8)
  • Regression and continuity review: Installer coverage exercises pre-download refusal, validating-server reuse, preserved launch causes, and unreadable-version handling. Setup coverage protects ordering and no-retry guidance. The prior reuse finding is resolved by the current production ordering; the completed same-head review contains no remaining findings. (extensions/llama-cpp/src/llama-server-install.test.ts:695, ab16354ce7f7)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • VACInc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-02T08:14:39.044Z sha 3b3e808104b75f5e955123e5e5e51e1dcbc1a6ad :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-05T19:49:44.034Z sha 0df8638f2b2784f3a35629cab615eb6b3387d882 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-05T21:44:01.030Z sha 0df8638f2b2784f3a35629cab615eb6b3387d882 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-05T22:00:44.765Z sha a84b032 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-05T22:40:47.173Z sha a681b847bf0d4b7fc0ff1b66528ef8890601c6cf :: needs real behavior proof before merge. :: [P1] [P1] Preserve validating server reuse in the setup preflight
  • reviewed 2026-10-05T22:57:53.219Z sha a681b847bf0d4b7fc0ff1b66528ef8890601c6cf :: blocked before merge. :: [P1] [P1] Preserve validating server reuse in the setup preflight
  • reviewed 2026-10-05T23:26:11.174Z sha c343b2a :: needs maintainer review before merge. :: none
  • reviewed 2026-10-06T13:20:42.702Z sha ab16354 :: needs maintainer review before merge. :: none

@NovaUnboundAi

NovaUnboundAi commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Hardware proof: macOS 12.7.6 Intel iMac.

Host: iMac11,2 / Intel Core i3-540 @ 3.07GHz / macOS 12.7.6 (21H1320) / 8 GB RAM. Same reporter machine referenced in the PR description.

Build tested: both open PRs (#163317 + #163358) cherry-picked onto openclaw/openclaw@0ac81cf6ec1a93acad4abe7e57bd8fe7537afa23; this PR's commits are included as 62ae9212515 + 3d4e68a1234 + 84fe477b99f. Built via pnpm install && OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1 pnpm build.

localService.command route — PASS

openclaw memory status --deep on the real profile (models.providers.llama-cpp.localService.command points at a self-built llama-server, no BLAS and no AVX, at an older release than the current pin) returns clean, served results on both configured agents:

[provider-local-service] starting llama-cpp local service: ~/.openclaw/tools/llama.cpp/b10534/darwin-x64/llama-server
[provider-local-service] llama-cpp local service ready: pid=<N> spawnMs=66 readyMs=603

Memory Search (<agent-a>)
Provider: local (requested: local)
Model: ~/.openclaw/agents/<agent-a>/workspace/models/jina-embeddings-v2-small-en-Q8_0.gguf
Sources: memory
Indexed: 150/150 files · 557 chunks
Dirty: no
Embeddings: ready
llama.cpp server: unknown (b10534-2b5621094)
Endpoints: health=ready models=ready props=ready metrics=ready
By source:
  memory · 150/150 files · 557 chunks · 2.8 MiB text + embeddings

Memory Search (<agent-b>)
Provider: local (requested: local)
...
Indexed: 47/47 files · 348 chunks
Embeddings: ready
Endpoints: health=ready models=ready props=ready metrics=ready

[provider-local-service] llama-cpp local service exited: code=0

The current-main code paths continue to drive the self-built llama-server without regression; the pin bump this PR guards against does not break the localService.command escape hatch.

Managed-setup refusal path — unreachable on this exact host via the shipped wizard

Running openclaw --profile prtest models auth login --provider llama-cpp --method local on a fresh profile does not reach UnsupportedLlamaServerHostError. The upstream memory-budget check at extensions/llama-cpp/src/model-catalog.ts:284 fires first:

"Setup skipped — No recommended model fits the current 5 GiB memory budget. Close other applications and retry, or configure an existing GGUF or external server."

This Mac has 8 GB RAM → ~6 GiB max budget (per the headroom calc at model-catalog.ts:197-200), minus running processes → 5 GiB available; every current chat recipe needs more. The embedding-only path at extensions/llama-cpp/src/setup.ts:349-356 is also unreached on a fresh profile because localMemoryIntent requires a pre-existing memory.search.provider = "local" config — I'll track that discoverability gap left by PR #130883 in a separate issue.

What this nonetheless proves for this PR

The pre-patch bad sequence described in the PR body ("downloads a build that cannot load, fails with a raw dyld: Symbol not found error, and tells the user to retry, which can never succeed") does not occur:

  • No download attempt.
  • No dyld: Symbol not found crash.
  • No "run openclaw doctor and retry" loop.

The end-state this PR guarantees (clean refusal before download, no dyld crash, no retry loop) holds on this hardware. The specific route to that end-state here is an earlier, pre-existing gate rather than this PR's UnsupportedLlamaServerHostError — because this particular Mac cannot fit a chat recipe at all. On a hypothetical 16+ GB Mac stuck on macOS 12, this PR's refusal would be the active guard; the 7 unit tests in llama-server-install.test.ts already cover that path with the host forced to darwin/x64.


Update: live-tested UnsupportedLlamaServerHostError path (after a681b847bf0)

With the new "refuse unsupported hosts before any download" commit on this PR, the embedding-only path is now reachable on this same hardware when the scratch profile pre-configures memory.search.provider = "local" (which unlocks the embedding-only branch in extensions/llama-cpp/src/setup.ts:349-356). Live result:

openclaw --profile <scratch> models auth login --provider llama-cpp --method local

┌  Provider sign-in
  Scope: System / agent
  …

┌  Install a verified CPU llama.cpp server on Gateway host <hostname> and download only the local embedding model
│  (about 0.3 GB)? Your chat model will stay unchanged.
│  Yes
│
◇  llama.cpp setup failed
Managed llama.cpp setup is unavailable on this host. The verified llama-server b10809 build requires macOS 13.3+; this Mac runs macOS 12.7.6. Build llama-server for this Mac and set models.providers.llama-cpp.localService.command to its absolute path, or use a remote model or embedding provider.
  • Refusal fires immediately after the consent prompt.
  • The scratch profile's models/llama.cpp/ directory is empty (0 B, verified with du -sh ~/.openclaw-<scratch>/models) — zero GGUF download attempted.
  • No dyld: Symbol not found crash, no retry advice, actionable localService.command guidance.

So the PR's UnsupportedLlamaServerHostError message now hits on this hardware via the embedding-only path, and the "nothing is fetched" guarantee holds for both the chat and the embedding-only flows. Testing matches the behaviour described in the updated PR body.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 5, 2026
…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.
@NovaUnboundAi
NovaUnboundAi force-pushed the fix/llama-cpp-macos-floor branch from 0df8638 to a84b032 Compare October 5, 2026 21:54
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 5, 2026
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.
@NovaUnboundAi
NovaUnboundAi force-pushed the fix/llama-cpp-macos-floor branch from a681b84 to c343b2a Compare October 5, 2026 23:12
@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 5, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 5, 2026
@VACInc VACInc self-assigned this Oct 6, 2026
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]>
@VACInc
VACInc merged commit 8f5c33c into openclaw:main Oct 6, 2026
109 of 111 checks passed
@NovaUnboundAi
NovaUnboundAi deleted the fix/llama-cpp-macos-floor branch October 6, 2026 19:58
vincentkoc added a commit that referenced this pull request Oct 6, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Oct 6, 2026
* 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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 7, 2026
…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]>
RomneyDa pushed a commit that referenced this pull request Oct 11, 2026
…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)
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Oct 22, 2026
…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]>
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 extensions: llama-cpp P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: prebuilt Intel macOS llama-server binary requires macOS 13.3+ (LAPACK$ILP64 dyld crash on Monterey)

4 participants