-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
Add --quiet / -q flag to suppress doctor warnings in CLI output #9777
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
When running openclaw sessions list --json, the output includes doctor warnings before the JSON:
│
◇ Doctor warnings ─────────────────────────────────────────╮
│ │
│ - State dir migration skipped: target already exists │
│ (/Users/jontsai/.openclaw). Remove or merge manually. │
│ │
├───────────────────────────────────────────────────────────╯
{
"path": "/Users/jontsai/.openclaw/agents/main/sessions/sessions.json",
...
}
This breaks programmatic parsing with jq or any JSON parser since the output doesn't start with {.
Proposed Solution
Add a global --quiet / -q flag that suppresses all non-essential output (doctor warnings, decorative boxes, etc.) when machine-readable output is needed.
Alternatively/additionally:
--no-doctoror--skip-doctorto specifically suppress doctor warnings- Automatically suppress warnings when
--jsonis used (warnings should go to stderr, JSON to stdout)
Use Case
Building a dashboard that queries openclaw sessions list --json to display active session counts. Currently requires stripping non-JSON prefix before parsing.
Workaround
Strip everything before the first { in the output, but this is fragile.
Environment
- OpenClaw version: 2026.2.2-2
- Platform: macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.