← Back to library

排查子代理模型错显:用 sessions list + session_status 校验真实运行模型

解决“子代理实际模型与界面显示不一致”问题:升级后可直接看到子代理真实模型,便于成本与质量排障。

GITHUBDiscovered 2026-02-18Author @thesahibm
Prerequisites
  • You are using sub-agents (sessions_spawn) and have at least two model aliases in use.
  • Gateway/CLI version includes PR #18660 fix (or newer).
Steps
  1. Spawn a sub-agent with an explicit non-default model alias.
  2. Run session listing and capture the model column for that sub-agent session.
  3. Cross-check with session_status for the same session key.
  4. Compare displayed model against task config/runtime metadata.
  5. If mismatch remains, collect logs and pin reproduction steps before filing issue.
Commands
openclaw sessions list --limit 20
session_status {"sessionKey":"<subagent_session_key>"}
openclaw status
Verify

The sub-agent session shows its real runtime model (not primary/default fallback) in both sessions list and status views.

Caveats
  • Historical sessions created before upgrade may still reflect stale metadata.
  • Provider/model alias resolution can vary by deploy config; edge cases still need environment verification(需验证).
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post