Skip to content

/usage command shows capped credits (100%) in --no-interactive mode but correct overage (153%) in interactive mode #3867

Description

@CrysisDeu

Checks

  • I have searched github.com/aws/amazon-q-developer-cli/issues and there are no duplicates of my issue
  • I have run q doctor in the affected terminal session
  • I have run q restart and replicated the issue again

Operating system

macOS 15.5 (Apple Silicon)

Expected behaviour

/usage in --no-interactive mode should report the same credit values as interactive mode. When the account is in overage (usage > plan limit), both modes should show the real total (e.g. 15312.32 of 10000).

Actual behaviour

Interactive mode (correct):

Estimated Usage | resets on 2026-08-01 | KIRO POWER
Credits (15312.32 of 10000 covered in plan)
██████████████████████████████████████████████████ 153.1%

Non-interactive mode (incorrect — capped at 100%):

kiro-cli chat --no-interactive --agent meshclaw-lite "/usage"

Estimated Usage | resets on 2026-08-01 | KIRO POWER
Credits (10000.00 of 10000 covered in plan)
████████████████████████████████████████████████████████████████████████████████ 100%

The non-interactive output caps current_usage at the plan limit instead of showing the real overage total. This breaks programmatic consumers that parse /usage output to display credit usage (e.g. editor extensions, dashboards).

Steps to reproduce

  1. Have a Kiro Power account that is in overage (usage > 10000 credits)
  2. Run interactively: kiro-cli chat then type /usage — shows correct overage (e.g. 15312.32 of 10000)
  3. Run non-interactively: kiro-cli chat --no-interactive "/usage" — shows capped 10000.00 of 10000

Also reproducible without --agent:

kiro-cli chat --no-interactive "/usage"

Impact

Any tool that programmatically fetches credit usage via --no-interactive mode cannot detect overage state. The GetUsageLimits API returns the correct data (including current_overages), but the /usage text rendering in non-interactive mode truncates it.

Environment

[q-details]
version = "2.12.1"

[system-info]
os = "macOS 15.5"
chip = "Apple M1 Max"
memory = "64.00 GB"

[environment]
shell = "zsh 5.9"
terminal = "iTerm2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions