Status line shows model as unknown until first API call

Resolved 💬 3 comments Opened Mar 24, 2026 by T0C0-AI Closed Mar 28, 2026

Summary

When Claude Code CLI starts, the model.display_name field in the status line JSON payload is null until the first API call is made. This causes status line scripts to display the model as "unknown" at startup.

Current Behavior

  1. User launches Claude Code CLI
  2. Status line script receives JSON with model.display_name: null
  3. Model appears as "unknown" (or whatever fallback the script uses)
  4. After the first message is sent, model.display_name is populated correctly

Expected Behavior

The model name should be available in the status line JSON immediately at startup, since the model selection is already determined at that point (via --model flag, ANTHROPIC_MODEL env var, settings.json, or default).

Rationale

The model is already resolved during initialization (from CLI flags, environment variables, or settings). There's no technical reason to delay populating model.display_name until the first API call. Eagerly setting this field would eliminate the "unknown" flash and provide a better user experience.

Environment

  • Claude Code CLI (terminal, not VSCode extension)
  • Affects all custom status line scripts that read model.display_name

View original on GitHub ↗

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