Skip to content

Feature: Session-level model overrides should be visible and clearable in Dashboard/CLI #22443

@qijie850

Description

@qijie850

Problem

When a session gets a model override (via /model command, session_status(model=...), or other means), the override is stored in sessions.json and silently overrides the agent-configured model. There is currently no way to:

  1. See which sessions have model overrides (vs. using the agent default)
  2. Clear session-level overrides without manually editing sessions.json

Real-world impact

We had a family agent configured with gpt-5-nano for LINE group chats. At some point, sessions got overridden to claude-opus-4-6. Since LINE groups generate frequent messages, this silently burned expensive Opus tokens instead of the intended Nano tokens. The only way to discover this was by noticing the bill spike and manually inspecting sessions.json.

Additional issue: session_status reports wrong model

When a session has a model override, the session_status tool may report the agent-configured model (e.g., gpt-5-nano) instead of the actual model being used (e.g., claude-opus-4-6). This makes debugging even harder — the agent itself thinks it is running on the cheap model while actually burning expensive tokens.

Cron jobs: session override persists across runs

When a cron job specifies payload.model (e.g., gpt-5.2-codex), the model is only applied on the first session creation. If the model gets changed during a run (e.g., due to fallback or error recovery), the override sticks for all subsequent cron runs, ignoring the cron job's configured model. Cron jobs should re-apply their configured model on each run, not inherit stale session overrides.

What makes this hard to catch

  • openclaw agents list correctly shows the agent-level model (gpt-5-nano)
  • openclaw status Sessions table shows the actual model being used, but does not indicate whether it is an override or the agent default
  • session_status tool may show the agent default instead of the actual override
  • There is no openclaw sessions command to list/manage session overrides
  • The Dashboard does not surface this information

Proposed solution

  1. In openclaw status: Mark sessions that have a model override (e.g., claude-opus-4-6 (override) vs claude-opus-4-6)
  2. Add a CLI command: e.g. openclaw sessions list / openclaw sessions reset-model <session-key> to view and clear overrides
  3. In Dashboard: Show session model overrides with a "reset to agent default" button
  4. Fix session_status: Report the actual model in use, not the agent config
  5. Fix cron model handling: Re-apply payload.model on each cron run instead of inheriting stale session overrides

Workaround

Manually edit ~/.openclaw/agents/<name>/sessions/sessions.json and remove "model" and "modelProvider" keys, then restart the gateway.

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