mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-24 07:21:20 +00:00
* fix(status): consolidate live model switches so /status stops reporting stale state After /model during an active run, liveModelSwitchPending could survive forever on CLI-harness sessions (they never pass the embedded attempt-recovery clear), and /status gave no hint that a live switch had not been applied yet — the second symptom of #97517. Add a post-run consolidation in the generic reply runner: once a completed non-heartbeat run has executed the persisted selection, the pending flag is spent and cleared. While a switch is genuinely pending, /status now annotates the Model line with 'live switch pending' instead of implying the new selection is already running. * refactor(status): make live-switch consolidation atomic and default-aware Review findings: compare-and-clear now happens inside one patchSessionEntry callback against the same row snapshot, so a concurrent /model that persists a newer selection can never be consumed by the finished run's result. The selection also resolves from module-level defaults (matching the embedded attempt-recovery caller) instead of the finished run's provider, which misclassified a completed /model default switch. * fix(status): resolve the owning agent before consolidating a default switch Without an explicit agent id, /model default consolidation compared the ran model against library-wide defaults; when config overrides the primary, the pending flag never cleared. Derive the canonical agent id from the session key so the agent's configured default is used. * fix(status): resolve the owning agent before selecting the session store Agent-scoped store templates need the derived agent id for store-path resolution too, or the consolidation patches a different store than the one holding the pending flag. * chore(ci): retrigger after GitHub Actions startup failures