aws / aws/amazon-q-developer-cli

`kiro-cli chat` (bun) consumes 80-130% CPU while idle

Offen
#3,777 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
2k
Forks
439
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) 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 26.4.1 (25E253)

### Expected behaviour

`kiro-cli chat` (bun process) should consume near 0% CPU when idle — i.e., when there are no active API calls, no tool executions, and no user input. An idle chat session waiting for user input should be event-driven, not busy-polling.

### Actual behaviour

The `bun` process running `kiro-cli chat` consistently consumes 80-130% CPU even when completely idle. This causes rapid battery drain on laptops.

Sampled over 6 seconds while idle:
$ for i in 1 2 3; do ps -p -o pcpu=; sleep 2; done
82.1
128.5
111.4

Running multiple `kiro-cli chat` sessions compounds the issue — observed ~220% total CPU with 4 idle sessions.

Note: Both autocomplete and inline suggestions are disabled:
- `kiro-cli settings autocomplete.disable` → true
- `kiro-cli inline status` → disabled

### Steps to reproduce

1. Open a terminal (tested with WezTerm and Tabby on macOS)
2. Run `kiro-cli chat`
3. Do nothing — leave it idle
4. Check CPU usage: `ps -Arco pid,pcpu,comm | grep bun`
5. Observe bun process at 80-130% CPU continuously

### Environment

```yaml

[q-details]
version = "2.0.1"
hash = "4a41569da83e25b6ab94898d7c4c83fa18cb5216"
date = "2026-04-17T02:21:00.156808Z (7d ago)"
variant = "full"

[system-info]
os = "macOS 26.4.1 (25E253)"
chip = "Apple M4"
total-cores = 10
memory = "16.00 GB"

[environment]
cwd = "/Users/USER/playground"
cli-path = "/Users/USER/playground"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "Wezterm"
install-method = "unknown"

[env-vars]
PATH = "/Users/USER/.local/bin:/Users/USER/.toolbox/bin:/opt/homebrew/opt/python@3.13/libexec/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pkg/env/active/bin:/opt/pmk/env/global/bin"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.github.wez.wezterm"
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, das Problem mit `kiro-cli chat` unter macOS zu reproduzieren und den inaktiven `bun`-Prozess zu profilieren. Untersuche den Pfad für inaktive Eingaben und die Event-Loop, um die Ursache der kontinuierlichen CPU-Aktivität zu identifizieren. Als erledigt gilt die Aufgabe, wenn eine inaktive Sitzung bei deaktivierter Autovervollständigung und deaktivierten Inline-Vorschlägen nahezu 0 % CPU verbraucht, während aktive Aufrufe und die Tool-Ausführung weiterhin funktionieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
bun, macos
Bereich
cli, performance
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.