[BUG] usage slash command gets stuck in loading state after terminal is idle for several hours

Resolved 💬 3 comments Opened Jan 29, 2026 by ibarapascal Closed Mar 2, 2026

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?

The /usage slash command works correctly when a Claude Code session is freshly started.
However, if the system terminal stays idle for several hours, invoking /usage again (either by typing it manually or cycling to it with the Tab key) causes the command to remain stuck in a loading state, and it never returns the current session usage information.

At this point, no usage data is displayed, even though the session itself is still active and other interactions may continue to work.

Restarting the Claude Code session fully resolves the issue.

What Should Happen?

The /usage command should reliably load and display the current session usage information regardless of how long the terminal has been idle, as long as the session is still valid.

If the underlying session has expired or become invalid, the command should fail gracefully with a clear error message instead of hanging indefinitely in a loading state.

Error Messages/Logs

Steps to Reproduce

Start a new Claude Code session in a system terminal.

Run the /usage slash command and confirm it loads correctly.

Leave the terminal idle (no input) for several hours.

Return to the terminal and:

Press / and use Tab to cycle to usage, or

Manually type /usage and execute it.

Observe that the command remains stuck in a loading state and does not display session usage information.

Restart the Claude Code session.

Run /usage again and confirm it works as expected after restart.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.23

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 ↗