Claudux version
00513f3 (main)
How did you install it?
git clone + npm install (found via code review, not filed from a live install)
OS, Node, tmux, ttyd
N/A. This is a logic bug found by reading the code, not a runtime reproduction on a specific environment.
What happened?
windowFromModelEntry reads the [1m] marker off the model entry in settings.json to decide the context window size shown for a session. That entry is a default value, not a property of the session that's actually running.
Measured case: settings.json had "sonnet" in the model entry, with no [1m] marker, while the session itself was running claude-opus-5 with a 1M-token window. The usage percentage shown would have been five times too high.
This hasn't shown up in practice only because, above 200k tokens, the window size is fixed regardless of the entry, so the wrong default gets overridden anyway. Below 200k tokens in a 1M session, the display shows the wrong percentage.
The model name read from the transcript (added for the popover rework) doesn't fix this either: the JSONL carries claude-opus-5 without any [1m] marker, and whether a session is actually running in 1M mode isn't something the model name alone tells you.
Steps to reproduce
- Set
settings.json's model entry to a value without the [1m] marker (for example "sonnet").
- Start or resume a session that is actually running in 1M-context mode (for example
claude-opus-5 with the 1M window enabled).
- Stay below 200k tokens of usage in that session.
- The context-usage percentage shown is based on the wrong, smaller window size and reads too high.
Claudux version
00513f3 (main)
How did you install it?
git clone + npm install (found via code review, not filed from a live install)
OS, Node, tmux, ttyd
N/A. This is a logic bug found by reading the code, not a runtime reproduction on a specific environment.
What happened?
windowFromModelEntryreads the[1m]marker off themodelentry insettings.jsonto decide the context window size shown for a session. That entry is a default value, not a property of the session that's actually running.Measured case:
settings.jsonhad"sonnet"in themodelentry, with no[1m]marker, while the session itself was runningclaude-opus-5with a 1M-token window. The usage percentage shown would have been five times too high.This hasn't shown up in practice only because, above 200k tokens, the window size is fixed regardless of the entry, so the wrong default gets overridden anyway. Below 200k tokens in a 1M session, the display shows the wrong percentage.
The model name read from the transcript (added for the popover rework) doesn't fix this either: the JSONL carries
claude-opus-5without any[1m]marker, and whether a session is actually running in 1M mode isn't something the model name alone tells you.Steps to reproduce
settings.json'smodelentry to a value without the[1m]marker (for example"sonnet").claude-opus-5with the 1M window enabled).