Status line shows model as unknown until first API call
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
- User launches Claude Code CLI
- Status line script receives JSON with
model.display_name: null - Model appears as "unknown" (or whatever fallback the script uses)
- After the first message is sent,
model.display_nameis 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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗