You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Status line disappears when context usage exceeds its window #25
On main at e86ba25, the status command returns an empty string once context usage is sufficiently above 100%.
Reproduction with the built command and an isolated home:
Write ~/.scaledown/stats.json with {"totalSaved":1200,"totalRequests":7,"sessions":{},"contextWindow":{"current_tokens":220000,"max_tokens":200000}}.
Seed a fresh _updateCache in ~/.scaledown/config.json so update/reconciliation work is skipped.
Pipe {} into node dist/hooks/status.js.
Actual: empty stdout. At 110%, filled becomes 11 and "░".repeat(10 - filled) throws a RangeError, swallowed by the top-level catch. Savings and request counts disappear too.
Expected: a full ten-cell bar showing the actual 110% value, with savings and request counts retained. Invalid context values (negative/missing/non-numeric counts or an overflowing ratio) should omit the context indicator while preserving the rest of the status line.
I reproduced the failure with command-level tests and have a fix covering normal, overfull, and malformed context data.
Activity