← Back to PRs

#23279: fix: show correct context limit in status when runtime model differs

by Imccccc open 2026-02-22 05:09 View on GitHub →
commands size: S
Fixes https://github.com/openclaw/openclaw/issues/23122 Changes the lookup behavior to respect runtime model overrides when displaying context length in `session_status` output. <!-- greptile_comment --> <h3>Greptile Summary</h3> Fixed context window display in `openclaw status` to show the correct limit when a session uses a runtime model override. The bug occurred because the code was falling back to the config-level default model when looking up context tokens, even when the session had a different runtime model. The fix ensures `lookupContextTokens` is called with the session's actual runtime model, not the fallback default. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The fix is surgical and well-tested: it corrects a display bug by ensuring context token lookups use the actual runtime model instead of falling back to config defaults. The new test validates the exact scenario from issue #23122, and the logic change is minimal with no side effects. - No files require special attention <sub>Last reviewed commit: a8ac19b</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs