[BUG] Status line displays literal "undefined" text instead of meaningful status

Resolved 💬 3 comments Opened Oct 28, 2025 by ryderdavid Closed Oct 31, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

## Description
The status line at the bottom of Claude Code frequently displays the literal string "undefined" instead of a meaningful status message or verb describing the current action.

## What's Happening
When Claude is processing requests, the status line (the shimmering text below the input) shows:
✢ undefined…

This happens intermittently during various operations, especially during state transitions.

## Expected Behavior
The status line should either:

  • Display a meaningful verb/action (e.g., "Thinking...", "Processing...", "Reading...")
  • Show an empty string or default message
  • Never show the literal string "undefined"

## Root Cause (from investigation)
In /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1539, the code initializes:
```javascript
statusLineText:void 0

When this value is rendered to the UI, JavaScript's void 0 (which equals undefined) is being stringified and displayed as the literal text "undefined" instead of being handled
gracefully.

Suggested Fix

The status line rendering code should:

  1. Check if the value is undefined/null before rendering
  2. Default to an empty string or generic message like "Processing..."
  3. Never output the string representation of undefined values

Environment

  • Claude Code version: 2.0.28 (from investigation)
  • Platform: macOS (Darwin 25.0.0)
  • Installation: Homebrew

What Should Happen?

The status line should display a meaningful action verb (e.g., "Thinking", "Reading", "Processing") or remain empty, but should never show the literal string "undefined".

The UI should gracefully handle null/undefined state values by either:

  1. Using a fallback default message
  2. Showing an empty string
  3. Showing a generic "Processing..." message

The status line text rendering code should validate the value before displaying it.

Error Messages/Logs

## Debug Log Evidence
  The debug logs show undefined values being propagated throughout the system:

  [DEBUG] Getting matching hook commands for SubagentStop with query: undefined
  [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined
  [DEBUG] Getting matching hook commands for Notification with query: undefined

Steps to Reproduce

## Steps to Reproduce

  1. Launch Claude Code in any project directory: claude
  2. Start a conversation by asking Claude to perform any task (e.g., "read package.json and explain it")
  3. Observe the status line at the bottom of the terminal (the shimmering text below the input field)
  4. Watch the status line during Claude's response - it will intermittently display "✢ undefined…" instead of a meaningful action verb

Note: This issue is intermittent and occurs during state transitions. It happens most frequently when:

  • Starting a new request
  • Claude is switching between different operations (e.g., from reading files to processing)
  • During agent/subagent operations
  • When the UI updates the status before a proper status message is set

## Reproduction Rate
Occurs frequently during normal usage - typically seen multiple times per session, especially during the initial moments of processing a request.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.28

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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