Feature request: Invoke statusline command on session start before first assistant response

Resolved 💬 2 comments Opened Mar 3, 2026 by chcardoz Closed Mar 31, 2026

Problem

When using a custom statusLine command (configured in ~/.claude/settings.json), the statusline area is completely blank when a new session starts or after running /new. It only appears after the first assistant response, because that's the first time Claude Code invokes the statusline command with model/context data via stdin.

This creates a confusing UX — users see an empty bottom bar and assume their statusline plugin is broken or not configured, when in reality it's just waiting for data.

Use Case

We built Redline, a statusline plugin that displays:

  • Current model name (e.g., Opus 4.6)
  • Context window usage with a progress bar
  • Session (5-hour) and weekly (7-day) rate limit utilization with progress bars
  • Reset times for rate limits

The plugin fetches data from the Anthropic usage API and renders a boxed statusline. It works perfectly once the first message is exchanged, but on session start, users consistently think the plugin isn't installed or is broken because the statusline area is empty.

Proposed Solution

Invoke the statusline command once on session start with empty/default stdin data, e.g.:

{
  "model": {},
  "context_window": {}
}

This would allow statusline scripts to detect the "no data yet" state and render a meaningful placeholder. For example, Redline could show:

╭─ Redline ────────────────────────╮
│ Waiting for first response...    │
╰──────────────────────────────────╯

or display just the usage API data (session/weekly limits) which is available independently of the conversation state.

Current Behavior

  1. User opens new Claude Code session
  2. Statusline area is blank
  3. User sends a message and receives a response
  4. Statusline appears

Expected Behavior

  1. User opens new Claude Code session
  2. Statusline command is invoked with empty/default data
  3. Statusline renders a placeholder or partial info
  4. After first response, statusline updates with full data

Environment

  • Claude Code with statusLine type command in ~/.claude/settings.json
  • macOS / Darwin
  • Affects all custom statusline commands, not just Redline

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗