-
-
Notifications
You must be signed in to change notification settings - Fork 54.5k
Description
Severity: High (blocks JSON parsing/automation)
Environment:
- macOS (Mac-mini, Homebrew install:
/opt/homebrew/bin/openclaw) openclaw version: 2026.2.25- Terminal: zsh
Steps to reproduce:
- Run the command:
openclaw skills list --json | jq . - The command fails with a JSON parsing error, such as:
parse error: Invalid numeric literal at line 2, column 0
Root cause:
The JSON output from openclaw skills list --json is malformed. It contains raw, unescaped ANSI terminal escape sequences within the string values for fields like emoji and description. These control characters are not valid in a JSON string and cause all standard JSON parsers to fail.
Example of corrupted JSON:
{
"name": "himalaya",
"emoji": "📧M-^_M-^S📧"
}The M-^_M-^S sequence represents unescaped terminal control characters.
Impact:
This defect prevents any form of programmatic use or automation of the skills list --json command. It is impossible to parse the output with standard tools like jq, Python's json library, or any other compliant JSON parser.
Expected behavior:
The command should output a clean, well-formed JSON array with properly escaped strings, suitable for machine parsing. For example:
[
{
"name": "himalaya",
"emoji": "📧",
...
}
]Workarounds (temporary):
Using grep on the invalid JSON can provide some basic information, but this is not a sustainable solution:
# Count total skills
openclaw skills list --json | grep -c '"name":'
# Count eligible skills
openclaw skills list --json | grep -c '"eligible": *true'I have created two files that demonstrate the issue, which I will attach in a follow-up comment:
broken.json: A raw capture of the broken JSON output.broken-cat-v.txt: The output viewed withcat -vto make the control characters visible.