Skip to content

Session-level model override not cleared when agent default model changes #29105

@petersykim

Description

@petersykim

Summary

When using /model to switch an agent's default model, existing sessions retain their previously stored session-level model override. If that overridden model later becomes unavailable (e.g. expired API credit, quota exceeded), the session continues attempting to use it and fails — even after the agent default has been updated.

Steps to Reproduce

  1. In a channel, use /model gpt-5.3 (or any model) — this stores the model at the session level
  2. The API credit/quota for that model runs out
  3. Use /model sonnet to switch the agent default to a working model
  4. The session continues failing with model not allowed: <old model>

Expected Behavior

Switching the agent's default model (via /model) should also clear or update the session-level model override for active sessions associated with that agent.

Actual Behavior

The session-level model persists independently of the agent default. The gateway returns errorCode=INVALID_REQUEST errorMessage=model not allowed: openai-codex/gpt-5.3 on subsequent requests.

Workaround

Manually doing /reset in the affected channel after switching the agent default model clears the session and resolves the issue.

Environment

  • OpenClaw: 2026.2.26
  • macOS 26.2 (arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    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