Context calculation incorrect in v0.15.0-rc
Trying out the RC for v0.15 and now the calculations for the context are completely broken. After a single prompt and response context is showing full. Also seeing previous sessions that were not context 100% now showing 100% as well.
I'm on this. It's driving me nuts. But I'm going to tease this issue out.
Closing as duplicate of #271 — your report has been merged into that issue.
Merged from #271 (Context Calculation is Inaccurate)
Reported by @pedramamini — extensive debugging of the same context calculation bug:
Context window jumps up and down and just generally not be accurate. It'll show 100% (or more) when there is clearly plenty of context left. I've read all the docs, tried all the things.
Additional context from #271:
- Debug logs are in place showing "context calculation" and "display calculation" in JS console during
npm run dev - Compared implementation to how OpenClaw does it — still couldn't get it working
- Automatic context clearing/compacting may be contributing to non-linear behavior
- Bug also affects group chat (shows >100%)
- Screenshots: http://pedramamini.com/dropbox/maestro-claude-context-calculation-screenshots.zip
Community suggestions (from #271 comments by @PwrBank):
- Reference implementation: claude-powerline context.ts
- Reference implementation: cc-sessions statusline.js
Closing #271 as a duplicate of this issue.
@dmaynor needs closing
Hi @PwrBank — thanks for reporting this. The context calculation issues you described have been addressed through a series of fixes that landed across v0.15.x:
- Delta normalization for cumulative token reporters so first-turn values don't inflate the gauge
- Overflow guard that detects accumulated multi-tool turn tokens exceeding the context window and falls back to conservative growth estimation
calculateContextDisplayconsolidation to cap tokens and derive sane percentages when raw values overflow- Context propagation into history entries so resumed sessions retain accurate context percentages
These fixes are live on main (shipped in v0.15.3). If you're still seeing incorrect context calculations on the latest release, please reopen and we'll dig in further.
Thank you for your time and for helping us catch this early in the RC cycle!