Menu

A Claude Code status line that warns you before you hit the limit
πŸ“°

A Claude Code status line that warns you before you hit the limit

DEV Community: pythonΒ·Mike MeshokΒ·about 4 hours ago
#D0u2cW3I
#devtopython#devto#dev#rrggbb#claude
Reading 0:00
15s threshold

The built-in footer in Claude Code doesn't tell you that the 5-hour limit is about to run out, or that 420K tokens in a 1M window already costs real money. So I wrote my own status line in plain Python with no dependencies: a context bar, remaining 5-hour and weekly limits, a "when will it run out" projection, session cost, git and uptime. Below: how it works, the decisions I made, and where it has holes.

[Opus 5.5] | ━━━━━━━━━━ 12% (120K/1000K) | H:91% 4h21m | W:73% | βš™M+t | session $2.84 | my-app | ⏱ 1h 12m model context bar 5h left+reset week mode cost dir uptime

Enter fullscreen mode

Exit fullscreen mode

Repository: claude-statusline , MIT license.

How Claude Code draws a status line

In settings.json you can set a command in the statusLine field. Claude Code runs it whenever the session updates and passes it JSON on stdin: model, context window, limits, cost and so on. Whatever the command prints to stdout is shown at the bottom.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.