Repository navigation
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:not-repro-on-mainClawSweeper found high-confidence evidence that this issue no longer reproduces on main.ClawSweeper found high-confidence evidence that this issue no longer reproduces on main.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.
Description
Path: /help/troubleshooting
OpenClaw 2026.7.1
llama.cpp
version 9950 (961e4b26a)
MacBook Pro M5 Max
macOS 26.5.2
Works:
- curl /v1/chat/completions
- ChatGPT provider
Fails:
- any local llama.cpp provider
Error:
400 Unable to generate parser for this template.
Automatic parser generation failed:
JSON schema conversion failed:
Pattern must start with '^' and end with '$'
OpenClaw logs:
reason=format
Tools enabled: same
Tools disabled: same
Doctor:
20 skills
54 plugins
0 plugin errors
Reacted by clawsweeper, Ross Brigoli and Andrew Vavilchenko
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:not-repro-on-mainClawSweeper found high-confidence evidence that this issue no longer reproduces on main.ClawSweeper found high-confidence evidence that this issue no longer reproduces on main.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon Jul 13, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Close as implemented on current main: the exact unanchored
patternin the cron tool schema was removed, and current provider projection also strips unsupported llama.cpp schema patterns.Possible regression — probable (reproduction; failure trace). No predecessor PR is attributed.
Root-cause cluster
Relationship:
same_root_causeCanonical: #107449
Summary: This issue and the canonical cron-schema report describe the same llama.cpp pattern-parser failure; later shared projection work generalized the protection.
Members:
canonical: [Bug]: cron tool JSON Schema is incompatible with llama.cpp tool parser (pattern: "\S") #107449 - It identifies the cron tool pattern as the concrete source of the same parser error addressed by the direct fix.same_root_cause: [Bug]: Llama-cpp json schema conversion error #107824 - It concerns the same llama.cpp JSON Schema conversion boundary.same_root_cause: JSON schema conversion error when using local model via OpenClaw #115449 - It covered the broader local-model schema-conversion cluster later addressed by shared projection work.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Retain the canonical schema projection; any new report should reproduce on current main and identify the exact remaining rejected keyword and endpoint profile.
Do we have a high-confidence way to reproduce the issue?
No on current main: the reported
patternis absent from the cron schema and regression coverage verifies the llama.cpp-safe projection, although no live local server was run in this read-only review.Is this the best way to solve the issue?
Yes; removing the invalid model-facing schema constraint at its producer and applying the shared provider projection is more maintainable than requiring per-model workaround settings.
Security review:
Security review: No patch is under review.
AGENTS.md: found and applied where relevant.
What I checked:
src/agents/tools/cron-tool-schema.ts:270, d8c240781598)src/agents/tools/cron-tool.schema.test.ts:75, d8c240781598)packages/ai/src/providers/clean-for-llamacpp-gbnf.ts:51, d8c240781598)src/agents/tools/cron-tool-schema.ts:270, c6a9f5339b01)packages/ai/src/providers/clean-for-llamacpp-gbnf.ts:34, d8c240781598)Likely related people:
src/agents/tools/cron-tool-schema.ts,src/agents/tools/cron-tool.schema.test.ts)packages/ai/src/providers/clean-for-llamacpp-gbnf.ts,extensions/llama-cpp/index.ts)packages/ai/src/providers/clean-for-llamacpp-gbnf.ts)Codex review notes: model internal, reasoning high; reviewed against d8c240781598; fix evidence: commit c6a9f5339b01, main fix timestamp 2026-07-16T00:59:20-07:00.
mknap commentedon Jul 14, 2026
I was excited to update to 2026.7.1
... and then...
Updating to 2026.7.1 with this bug has been a tough one to handle.
./llama-server --version
version: 9982 (99f3dc322)
built with GNU 14.2.0 for Linux x86_64
delimir commentedon Jul 14, 2026
Additional debugging information:
I can confirm the failure is reproducible with Qwen3.6-35B-A3B and Qwen3-Coder-30B-A3B through llama.cpp.
Both models work when calling llama.cpp directly through /v1/chat/completions.
Openclaw web interface works as intended when using GPT5.5, issue is only with local llama.cpp.
OpenClaw web agent fails before model generation with:
reason: "format"
400 Unable to generate parser for this template. Automatic parser generation failed: JSON schema conversion failed: Pattern must start with '^' and end with '$'
Disabling tools in the web UI does not change the behavior.
openclaw doctor reports 20 eligible skills, 54 loaded plugins and 0 plugin errors.
llama.cpp /v1/models reports the Qwen3.6 model with n_ctx: 131072 and capabilities completion and multimodal.
llama.cpp version: 9950 (961e4b26a).
The same Qwen model worked with OpenClaw 2026.6.11 before upgrading to 2026.7.1.
Based on mknap's observation that Gemma works while Qwen3.6 fails, this may be specific to automatic parser generation / response format handling with the Qwen chat template rather than the llama.cpp provider generally.
delimir commentedon Jul 14, 2026
Additional model test: GPT-OSS also fails with the same reason. Gemma works on the same OpenClaw 2026.7.1 + llama.cpp server setup. Therefore this does not appear to be Qwen3.6-specific. Qwen3.6, Qwen3-Coder and GPT-OSS fail, while Gemma succeeds.
rsampaio commentedon Jul 14, 2026
Apparently the cron tool is the one breaking the template with llama.cpp server, I have the same issue with qwen3.6
rsampaio commentedon Jul 14, 2026
@LckHot your patch didn't fix my instance, after an hour with claude this fixed:
for the local model section in the config:
Rchique-Openclaw commentedon Jul 14, 2026
I can confirm this solution worked to solve my problem with local qwen model as well
Original model config was:
Adding a "compat" section resolved the issue. The bug started with 2026.7.1 upgrade and was gone with the downgrade to 2026.6.11 so it's definitely a 2026.7.1 issue.
Here are the local model launch arguments, just in case
mknap commentedon Jul 14, 2026
🙏Thank you @rsampaio for the json that patches this for now. 👍️
For what its worth, this also affected my local ornith model. Using the compat key for ornith and qwen36 , the error is avoided.
racing-cars commentedon Jul 14, 2026
I tried the workaround. It doesn't work for me.
My customization:
Same result as without compat from llama.cpp:
operator(): got exception: {"error":{"code":400,"message":"Unable to generate parser for this template. Automatic parser generation failed: JSON schema conversion failed:\nPattern must start with '^' and end with '$'","type":"invalid_request_error"}}Addendum: Perhaps someone else has this problem too. I have llama.cpp installed locally, previously via the OpenAI provider, but now it works via vLLM, where the compat workaround works. It seems they expect you to figure it out yourself, or I didn't read the release info...
1 remaining item
PCAssistSoftware commentedon Jul 17, 2026
For me with Lemonade as my backend, I can confirm the compat fix resolved the issue for me
rossbrigoli commentedon Jul 21, 2026
I can confirm this is only happening in Control UI. Terminal UI is not affected. It happens even without tool calls. A simple prompt like "hey" returns error 400. I can also confirm that the config below fixes it.
I am running Qwen 3.6-27 on llama-server.
vincentkoc commentedon Aug 5, 2026
Closing as completed.
This is the same root cause as #107449: v2026.7.1 exposed the cron tool's unanchored
pattern: "\\S"to llama.cpp-compatible schema compilers, which reject it before model generation.The repair landed in two layers:
patternand largemaxLengthconstraints for the bundled llama.cpp, LM Studio, and Ollama provider paths. Commit: 98a066c. This first shipped in the signed https://github.com/openclaw/openclaw/releases/tag/v2026.7.2-beta.6 release on August 1, 2026.Fresh validation on current
mainat92b4757227a7c4754eb99406ab54f1e4a499082epassed 89/89 focused cron-schema and shared provider-schema tests. Both release artifacts are also published on npm.Arbitrary custom OpenAI-compatible endpoints continue to use explicit model compatibility metadata such as
compat.toolSchemaProfile: "llamacpp"orunsupportedToolSchemaKeywords; that is separate from the fixed cron regression. Please reopen with a current beta/main reproduction and the exact rejected schema path if the same 400 remains.