Skip to content

/new and /reset commands should clear session-level model override to respect agents.defaults.model configuration #67573

@MiaoDX

Description

@MiaoDX

Problem Description

When a user explicitly changes the model via /model <model-id>, the session-level model override persists even after running /new or /reset. This causes the session to continue using the previously selected model instead of falling back to the configured default (agents.defaults.model.primary).

This behavior is unexpected because:

  1. /new and /reset are documented as "start fresh" commands
  2. Gateway restarts do not clear this override
  3. The only way to restore the default model is to manually run /status default (or session_status model=default)

Steps to Reproduce

  1. Configure agents.defaults.model.primary to anthropic_kimi/k2.6-code-preview
  2. Start a conversation, verify model is anthropic_kimi/k2.6-code-preview
  3. Run /model openai-codex/gpt-5.4 to switch model
  4. Run /new or /reset to "start fresh"
  5. Check /status — model is still openai-codex/gpt-5.4 (unexpected)
  6. Expected: model should reset to anthropic_kimi/k2.6-code-preview

Current Workaround

After /new, manually run /status default to clear the model override.

Proposed Solutions

Option A (Preferred): /new and /reset should automatically clear session-level model overrides, respecting the agents.defaults.model configuration.

Option B: Add a configuration option like session.resetClearsModelOverride: true to enable this behavior explicitly.

Environment

  • OpenClaw version: 2026.4.12
  • Config: agents.defaults.model.primary = "anthropic_kimi/k2.6-code-preview"

Signatures

Metadata

Metadata

Assignees

No one assigned

    Labels

    close: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