Skip to content

[Bug]: /reset and /new commands do not reset model to default #58302

@yunsuyunsu

Description

@yunsuyunsu

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When using /reset or /new commands to start a new session, the model is not reset to the default model configured in openclaw.json. Instead, the previous session's model setting is retained.

Steps to reproduce

Configure default model in openclaw.json:

{
"agents": {
"defaults": {
"model": {
"primary": "ai group/qwen3.5"
}
}
}
}
Switch to a different model during a session (e.g., vllm-dev/deepseek-v3.1-terminus-reasoner)

Execute /reset or /new command to start a new session

Observe that the new session still uses the previous model (vllm-dev/deepseek-v3.1-terminus-reasoner) instead of the default model (ai group/qwen3.5)

Expected behavior

The /reset and /new commands should reset the model to the default model configured in openclaw.json (agents.defaults.model.primary).

Actual behavior

The new session inherits the model setting from the previous session, ignoring the default model configuration.

OpenClaw version

OpenClaw version: 2026.3.2

Operating system

OS: Windows 10.0.26100 (x64)

Install method

No response

Model

deepseek-v3.1-terminus-reasoner

Provider / routing chain

openclaw-> deepseek-v3.1-terminus-reasoner

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Evidence
From the session transcript file (sessions/<session-id>.jsonl):

{"type":"session","version":3,"id":"a5712492-7356-46bb-918f-7df8269f4a39","timestamp":"2026-03-31T08:23:11.252Z"}
{"type":"model_change","id":"880c0c8f","parentId":null,"timestamp":"2026-03-31T08:23:11.254Z","provider":"vllm-dev","modelId":"deepseek-v3.1-terminus-reasoner"}
The model_change event is recorded immediately after session creation, indicating that the previous session's model is being restored instead of using the default.

Root Cause
The session module reads model and modelProvider fields from the session store when creating a new session, and these fields are retained from the previous session.

The DEFAULT_RESET_TRIGGERS = ["/new", "/reset"] is defined in sessions-XdimqNx2.js, but the reset logic does not clear the model settings.

Impact and severity

No response

Additional information

Suggested Fix
Clear the model and modelProvider fields in the session store when executing /reset or /new commands, or do not inherit these fields when creating a new session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crashclose:duplicateClosed as duplicatededupe:childDuplicate issue/PR child in dedupe cluster

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions