排查子代理模型错显:用 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
- Spawn a sub-agent with an explicit non-default model alias.
- Run session listing and capture the model column for that sub-agent session.
- Cross-check with session_status for the same session key.
- Compare displayed model against task config/runtime metadata.
- If mismatch remains, collect logs and pin reproduction steps before filing issue.
Commands
openclaw sessions list --limit 20session_status {"sessionKey":"<subagent_session_key>"}openclaw statusVerify
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 ↗