Version: 2026.5.7 (eeef486)
What happened:
Ran openclaw doctor --repair as part of recovering from gateway stalls. Afterward, the model status reported:
Current: anthropic/claude-opus-4-7 (selected)
Active: claude-cli/claude-opus-4-7 (runtime)
The runtime was still claude-cli/... only because the CLI session was already attached. On the next gateway/CLI restart, the selected anthropic/... provider would take over and break Claude-CLI transcript continuity (per-session-id .jsonl stops being read, conversation context is lost).
I confirmed by inspecting ~/.openclaw/openclaw.json:
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-opus-4-7",
...
Before running doctor --repair, this was claude-cli/claude-opus-4-7.
Reproduction:
- Set agents.defaults.model.primary to claude-cli/claude-opus-4-7 (or any claude-cli/... value).
- Run openclaw doctor --repair.
- Check openclaw config get agents.defaults.model.primary — flipped to anthropic/claude-opus-4-7.
Workaround:
openclaw config set agents.defaults.model.primary claude-cli/claude-opus-4-7
(Then gateway restart.)
Why this matters:
- --repair is documented as "non-destructive remediation," but silently rewriting the user-selected provider is destructive to a user setting.
- CLI users who rely on claude-cli/... for transcript continuity lose context on the next restart with no warning surfaced in the doctor output.
- The upgrade docs (and Krill's own troubleshooting playbook) recommend doctor --repair as part of normal upgrade hygiene, so this footgun fires on a recommended path.
Asks:
- Can doctor --repair be made provider-preserving — only fill in primary if unset/invalid, never rewrite a valid one?
- If the rewrite is intentional, surface it in doctor's output (Changed: agents.defaults.model.primary: claude-cli/... → anthropic/...) so the user can react.
- Is this still live in 5.12? Asking before I do the 5.7 → 5.12 upgrade.