openclaw - 💡(How to fix) Fix models set leaves main/default agent pinned to old model via agents.list override [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#76128Fetched 2026-05-03 04:42:02
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
2
Timeline (top)
commented ×2mentioned ×1subscribed ×1unsubscribed ×1

Changing the default model to openai-codex/gpt-5.5 can appear successful while the active main/default agent continues using the previous model because agents.list[].id == "main" has its own explicit model.primary.

In my case, the global default had been updated to 5.5, but the active main/Jinx path still resolved to 5.4.

Root Cause

This creates a high-confusion failure mode:

  1. User asks to change default model.
  2. Config/default appears changed.
  3. Gateway startup may report the new default.
  4. Active sessions or the main/default agent still use the old model due to override precedence.
  5. The user only discovers it later through logs, costs, provider errors, or behavior drift.

Code Example

{
  "primary": "openai-codex/gpt-5.5",
  "fallbacks": []
}

---

{
  "id": "main",
  "model": {
    "primary": "openai-codex/gpt-5.4",
    "fallbacks": []
  }
}

---

[prompt-cache] cache read dropped ... for openai-codex/gpt-5.4 via session-custom
embedded run agent end ... model=gpt-5.4 provider=openai-codex
RAW_BUFFERClick to expand / collapse

Summary

Changing the default model to openai-codex/gpt-5.5 can appear successful while the active main/default agent continues using the previous model because agents.list[].id == "main" has its own explicit model.primary.

In my case, the global default had been updated to 5.5, but the active main/Jinx path still resolved to 5.4.

Observed state before manual fix

Global default:

{
  "primary": "openai-codex/gpt-5.5",
  "fallbacks": []
}

Explicit main-agent override:

{
  "id": "main",
  "model": {
    "primary": "openai-codex/gpt-5.4",
    "fallbacks": []
  }
}

Runtime logs still showed active embedded/session-custom calls using 5.4:

[prompt-cache] cache read dropped ... for openai-codex/gpt-5.4 via session-custom
embedded run agent end ... model=gpt-5.4 provider=openai-codex

After manually changing agents.list.main.model.primary to openai-codex/gpt-5.5, the config resolved as expected.

Expected behavior

When a user changes the default model, OpenClaw should not silently leave the active/default agent on the old model.

Any of these would be acceptable:

  • openclaw models set ... updates agents.list.main.model.primary when main is the default/active agent.
  • The command prints a warning listing agent-level overrides that still point to the old model.
  • The command offers an explicit flag, e.g. --include-agent-overrides, --reset-agent-overrides, or --set-main.
  • openclaw doctor reports model-shadowing problems.
  • /status clearly shows the source of the effective model: global default, agent override, session override, heartbeat override, etc.

Actual behavior

The global default was updated, but the active main/default agent override remained pinned to the old model. This made the previous model-change operation look complete while runtime traffic continued using 5.4.

Why this matters

This creates a high-confusion failure mode:

  1. User asks to change default model.
  2. Config/default appears changed.
  3. Gateway startup may report the new default.
  4. Active sessions or the main/default agent still use the old model due to override precedence.
  5. The user only discovers it later through logs, costs, provider errors, or behavior drift.

Related issues

  • #51251 - Session modelOverride persists across gateway restarts, silently overrides config default
  • #74284 - agent:main:main pins model from creation time, ignores openclaw.json edits
  • #58822 - Global default shadowed by parent agent's own model in subagent paths
  • #28965 - Simplify Model Configuration: Single-Source Reconcile + Session Override Reset

This issue is specifically about models set / default-model changes not warning about or reconciling agents.list.main.model.

Environment

  • OpenClaw 2026.4.26 (be8c246)
  • macOS 26.3.1
  • Darwin 25.3.0 arm64
  • Node v25.8.0

extent analysis

TL;DR

Update the agents.list.main.model.primary to the new default model when changing the global default model to ensure consistency.

Guidance

  • Verify that the agents.list.main.model.primary is updated to the new default model after running the openclaw models set command.
  • Check the runtime logs to ensure that the active sessions or main/default agent are using the new model.
  • Consider adding a warning or flag to the openclaw models set command to notify users of agent-level overrides that still point to the old model.
  • Review related issues (#51251, #74284, #58822, #28965) to ensure that similar model configuration inconsistencies are addressed.

Example

No code snippet is provided as the issue is related to configuration and not code.

Notes

The issue is specific to OpenClaw version 2026.4.26 and may not apply to other versions. The solution may require updates to the openclaw models set command or the configuration handling.

Recommendation

Apply a workaround by manually updating the agents.list.main.model.primary to the new default model after changing the global default model, until a permanent fix is implemented. This ensures that the active sessions or main/default agent use the correct model.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When a user changes the default model, OpenClaw should not silently leave the active/default agent on the old model.

Any of these would be acceptable:

  • openclaw models set ... updates agents.list.main.model.primary when main is the default/active agent.
  • The command prints a warning listing agent-level overrides that still point to the old model.
  • The command offers an explicit flag, e.g. --include-agent-overrides, --reset-agent-overrides, or --set-main.
  • openclaw doctor reports model-shadowing problems.
  • /status clearly shows the source of the effective model: global default, agent override, session override, heartbeat override, etc.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING