[Bug] Statusline missing rate_limits and context_window on initial render
Bug Description
Bug Report: Statusline Missing rate_limits and context_window on Initial Render
From: Jordan Dea-Mattson
GitHub: @jordan-of (OrdinaryFolk), @jordandm (personal)
Email: jordan-of@users.noreply.github.com
Problem
When a new Claude Code session starts, the initial statusline render is missing rate_limits and context_window data. Only version, model, workspace, and cost are populated in the first JSON
payload sent to the statusline command.
Initial render (missing data):
2.1.81 with Opus 4.6 (1M context) | monofolk (master) | $0.00 · 0s
After any interaction (full data):
2.1.81 with Opus 4.6 (1M context) | monofolk (master) | ctx: 45% | 5h: 32% → 03:00 7d: 58% → Mon 14:00 | $0.00 · 42s
The full payload only appears after the first interaction — even a cancelled / menu (pressing / then Escape) is enough to trigger it.
Steps to Reproduce
- Start a new session: claude from a project directory
- Observe the statusline — ctx: and rate limit fields are absent
- Press / then Escape (cancel the command menu)
- Observe the statusline — all fields now appear
Root Cause
The initial statusline JSON payload omits rate_limits and context_window.remaining_percentage. These fields are only populated after the first API interaction establishes the context window and
rate limit state. The statusline script handles missing data correctly (omits sections when fields are empty), but the user sees an incomplete statusline until they interact.
Expected Behavior
The initial render should include all available data. Rate limits and context window are known at session start (they're account-level state, not conversation-level). If the data isn't available
yet, the statusline should re-render once it becomes available, rather than waiting for user interaction.
Environment
- Claude Code v2.1.81
- Custom statusline script via ~/.claude/settings.json
- macOS Darwin 25.2.0
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.81
- Feedback ID: 078e4222-abd8-4d8d-bd23-cafc0f10d193
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/jordan_of/.local/share/claude/versions/2.1.81 (expected in multi-process scenarios)\n at TET (/$bunfs/root/src/entrypoints/cli.js:2724:2174)\n at fgq (/$bunfs/root/src/entrypoints/cli.js:2724:1318)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-21T14:41:04.884Z"}]This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗