aws / aws/amazon-q-developer-cli
/usage command shows capped credits (100%) in --no-interactive mode but correct overage (153%) in interactive mode
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
## Checks
- [x] I have searched github.com/aws/amazon-q-developer-cli/issues and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] 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"
```
Contributor guide
Research direction
Start at the `/usage` command and its non-interactive text-rendering path, then compare it with the interactive output. Check how the `GetUsageLimits` response and `current_overages` are handled; done means overage values such as `15312.32 of 10000` and 153.1% appear consistently in both modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100