Repository navigation
feat(statusline): draw everything claude-hud's default draws by default - #613
Merged
Merged
Conversation
The default statusline now draws everything stock claude-hud's default configuration draws, then agent-shim's own segments, so a launch with no statusline settings is a superset of claude-hud's. The header lists the model with the platform label beside it, the project with its git status and added directories inline, the provider and route, the login account, the identity, headroom's savings and the extra segment, which draws nothing until extra.command is set; the rows are the context window, the quota windows and an added directories row that draws nothing while the directories are inline. The defaults follow claude-hud's: the reset label and the per-model weekly windows are on, the weekly window is hidden below 80% of its use when a five-hour window is drawn beside it, the token breakdown appears from 85% of the context window, a context estimate with the autocompact reserve is made when the client reports no percentage, and the model is named by its id when the client sends no display name. The context bar has thresholds of its own, context.warnAt and context.criticalAt, at claude-hud's 70 and 85 and apart from bands, with context.breakdownAt for the breakdown. The context thresholds and the usage thresholds that hide a window are compared against the percentage rounded to a whole number, as claude-hud compares them, and the context bar's gradient stops sit half a point below its thresholds, where that comparison places them. The wider default quota block no longer fits on one grid with the context bar at some widths, and there the context bar and the quota windows each align within themselves, where the previous default lined them up wherever it fitted them on one grid. A session served through Bedrock draws no subscription window. A per-model window with a null figure is drawn as claude-hud draws it, and one with a missing or non-numeric figure is drawn too, where claude-hud skips it. The platform is read only for a Claude Code client, a negative token total or reported percentage is read as absent and one above 100 is drawn as 100, and a layer that sets only one of the context thresholds is refused when it would leave them out of order. A per-model window keeps the 64 characters of its name claude-hud keeps, holds its figure between 0 and 100, and an added directory or per-model window the client sends that cannot be used is skipped on its own, not discarding the rest of its list. A group of bars that does not fit one to a row with its labels and figures padded to match is drawn with each row aligned within itself, so a long per-model name widens its own row and not the five-hour and weekly ones. The cache hit share's mirrored bands compare the share with the decimals (100 less each threshold) / 100 themselves, so a share exactly on a whole-percentage edge is on the side of the band it reaches. A quota window's use is rounded to a whole percentage from the percentage it was reported as, so a half such as 56.5 reaches the threshold 57 as it does in claude-hud.
Document the default statusline in the configuration model, the CLI reference and the architecture overview: what the default header and rows draw, which defaults differ from the previous ones and the setting that restores each, the context thresholds and the breakdown threshold with their rounding, the Bedrock session and the platform label, the conditions under which a quota window is hidden or drawn, and how the bars lose alignment as the line narrows.
Mearman
marked this pull request as ready for review
October 27, 2026 00:35
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The built-in statusline's default now draws everything stock claude-hud's default draws, then agent-shim's own segments, so a launch with no statusline settings is a superset of claude-hud's. The header lists the model with the platform label beside it, the project with its git status and added directories inline, the provider and route, the login account, the identity, headroom's savings and the extra segment (which draws nothing until
extra.commandis set). The rows are the context window, the quota windows and an added directories row that draws nothing while the directories are inline.The defaults follow claude-hud's. The reset label and the per-model weekly windows are on, the weekly window is hidden below 80% of its use when a five-hour window is drawn beside it, the token breakdown appears from 85% of the context window, a context estimate with the autocompact reserve is made when the client reports no percentage, and the model is named by its id when the client sends no display name. The context bar has thresholds of its own,
context.warnAtandcontext.criticalAtat 70 and 85 and apart frombands, withcontext.breakdownAtfor the breakdown. A Bedrock session draws no subscription window. Because the default quota block is wider, at some widths the context bar and the quota windows now each align within themselves where the previous default lined them up on one grid.This is a deliberate change to the default output, so it is a minor release and not a breaking one. To get the previous output back, set
layout.headertomodel,provider,route,account,identityandheadroom,layout.rowstocontextandquota,usage.resetLabel,usage.modelScopedandmodel.platformtofalse,usage.sevenDayThresholdto 0,context.estimateandcontext.breakdowntonever, andcontext.criticalAtto 90. A few things follow the session and not a preference and are not undone by those settings, such as the Bedrock rule and comparing the whole-number percentage with the thresholds as claude-hud does; the configuration model and the parity doc list them.The behaviour is documented in the configuration model and the CLI reference, and
docs/statusline-claude-hud-parity.mdrecords every default taken from claude-hud and every difference kept. Refs #565.