Changing my agent's default model did not change its existing sessions
A model setting on disk can be correct without describing the model an existing conversation will use. I hit that distinction while repairing a local OpenClaw installation in September. This is a historical debugging note about that installation, initially running version 2026.4.1, rather than a guide to the current release's storage format. The visible symptom was an empty assistant reply. One…
Changing a model configuration in the OpenClaw agent does not affect existing conversations that have already been established. This issue was encountered during a local OpenClaw installation repair in September. Initially, the system was running version 2026.4.1, and the problem manifested as an empty assistant reply, with the underlying cause being a model that had reached its end of life on July 27.
Upon investigation, it was discovered that all eight configured models were missing, and the diagnostic state indicated that fallbackConfigured was set to false. This explains why the old model could not provide any responses, but it did not clarify why adjusting the default model was not sufficient to resolve the issue. The default model setting was merely one of several locations where model settings were stored, including ~/.openclaw/openclaw.json, under agents.defaults.model.primary, and agent-specific entries within agents.list[].
Persistent session data stored under ~/.openclaw/agents/id/sessions/sessions.json and agents/models.json overrode the settings in place, thus existing sessions continued to use their saved model values. The distinction between setting a default value and modifying an already-existing conversation was overlooked initially. The application maintained enough state to differentiate between these two operations.
To troubleshoot such scenarios, the recommended approach is to back up the configuration directory, then search the configuration and session stores for the old model identifier. Comparing an existing session with a newly created one will reveal which model is actually being used for a particular request. If discrepancies are found between the two, further investigation is required to determine which saved selection the existing session retains and what actions can be taken to update it.
It is important not to assume that repeating an edit to the default model will resolve the issue, as this may not address the underlying problem. Each version of the storage format comes with its own specific file layout, and attempting to delete a session file as a universal solution could result in loss of valuable chat history. A more cautious approach is to inspect the conversation's saved selection alongside the default model setting, ensuring that the dispatched request aligns with the intended agent behavior.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.