Skip to content

Feature Request: Claude Code Usage Limit Prompt Segment #2940

Description

@gangula-karthik

Summary

Add a built-in prompt segment for displaying Claude AI (claude.ai / Claude Code) usage limits, specifically the 5-hour session consumption and weekly usage remaining, similar to how p10k already surfaces context from tools like kubectl, aws, and gcloud.

Motivation

Claude has become a widely used AI assistant among developers, especially with the rise of Claude Code (the CLI agent). Claude enforces two rolling usage limits:

  • 5-hour session limit: a rolling window that resets every 5 hours; how fast it depletes depends on conversation length, model used (Sonnet vs Opus), and tool use (web search, code execution, etc.)
  • Weekly limit: a shared weekly cap across all Claude surfaces (claude.ai, Claude Code, Claude Desktop)

These limits are easy to forget about mid-flow, and hitting them unexpectedly can be disruptive, especially during long agentic Claude Code sessions. Having a live indicator in the terminal prompt would let users pace their usage proactively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions