You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add skills.format config option to control skill serialization format #24824
When OpenCode loads skills from a project with many Claude Code skills, the system prompt can reach 40KB+, with the skills listing serialized as XML tags (<available_skills>, <skill>, <description>, etc.). For some local Ollama models this XML structure causes them to switch into XML output mode — specifically, models like qwen3-coder and devstral revert to HERMES XML tool-call format instead of JSON, which OpenCode can't parse. Tool invocations then fail silently or log invalid Invalid Tool.
There's currently no way to change this serialization format without patching OpenCode directly.
Proposed solution
Add a skills.format config option ("xml" | "json" | "markdown") that lets users control how skills are serialized into the system prompt. The default stays "xml" — no behavior changes for existing users. Users who hit format-related tool-calling issues with local models can opt into "json" or "markdown" as a workaround.
{
"skills": {
"format": "json"
}
}
Evidence
Tested with devstral:24b via Ollama, 50 runs each, same system prompt and tool definitions — only the skills serialization format varied:
changed the title [-]bug: Large XML-heavy system prompt causes qwen3-coder:30b (Ollama) to output HERMES XML instead of JSON tool calls[/-][+]bug: Large XML-heavy system prompt breaks tool calling across multiple Ollama models (Qwen3, Qwen2.5, Devstral)[/+]on Apr 28, 2026
Ran the same three-tier tests against two additional models to see how broad the format sensitivity is.
Models tested
Model
Family
Size
Tool call result with XML system prompt
qwen3-coder:30b
Qwen
18GB
HERMES XML output
qwen2.5-coder:32b
Qwen
19GB
Plain-text JSON {"name":"bash","arguments":{...}}
devstral:24b
Mistral
14GB
Plain-text JSON (test 1), hallucinated without tool call (test 2), no output at all (test 3)
Tests run per model
Simple tool call: "List files in the current directory using a bash command"
File read + analysis: "Read README.md and give me a one sentence summary"
Multi-step: "Find all TypeScript files in apps/ai, read one, tell me what it does"
Takeaway
The format sensitivity isn't Qwen-specific — it shows up across model families in different ways. This strengthens the case for a skills.format config option so users can choose the serialization format that works best for their model rather than being locked into XML.
Ran controlled tests to quantify how much the serialization format actually matters. Tested XML (current default), Markdown, and JSON against devstral:24b via Ollama, 50 runs each, same system prompt and tool definitions across all three.
Format
Prompt size
Pass rate
XML (current default)
7,019 bytes
68% (34/50)
Markdown
3,654 bytes
74% (37/50)
JSON
6,611 bytes
86% (43/50)
JSON and XML are nearly the same prompt size, so the difference is about format, not token count. This suggests a skills.format config option with "json" or "markdown" as available values would give local model users a meaningful improvement without changing the default for anyone.
changed the title [-]bug: Large XML-heavy system prompt breaks tool calling across multiple Ollama models (Qwen3, Qwen2.5, Devstral)[/-][+]feat: add skills.format config option to control skill serialization format[/+]on Apr 30, 2026
Activity
[-]bug: Large XML-heavy system prompt causes qwen3-coder:30b (Ollama) to output HERMES XML instead of JSON tool calls[/-][+]bug: Large XML-heavy system prompt breaks tool calling across multiple Ollama models (Qwen3, Qwen2.5, Devstral)[/+]andrewgwoodruff commentedon Apr 28, 2026
Additional testing — confirmed model-agnostic
Ran the same three-tier tests against two additional models to see how broad the format sensitivity is.
Models tested
{"name":"bash","arguments":{...}}Tests run per model
Takeaway
The format sensitivity isn't Qwen-specific — it shows up across model families in different ways. This strengthens the case for a
skills.formatconfig option so users can choose the serialization format that works best for their model rather than being locked into XML.andrewgwoodruff commentedon Apr 28, 2026
Follow-up: format comparison testing
Ran controlled tests to quantify how much the serialization format actually matters. Tested XML (current default), Markdown, and JSON against devstral:24b via Ollama, 50 runs each, same system prompt and tool definitions across all three.
JSON and XML are nearly the same prompt size, so the difference is about format, not token count. This suggests a
skills.formatconfig option with"json"or"markdown"as available values would give local model users a meaningful improvement without changing the default for anyone.[-]bug: Large XML-heavy system prompt breaks tool calling across multiple Ollama models (Qwen3, Qwen2.5, Devstral)[/-][+]feat: add skills.format config option to control skill serialization format[/+]github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.