aws / aws/amazon-q-developer-cli

feature-request: KIRO CLI: show tool output but do not include all intermediate results into context

Aperta
#3,653 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
2k
Fork
439
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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

### Expected behaviour

When running tools like `read`/`grep`/`maven`, Kiro CLI now includes everything into context. But IMO this is not necessary. The output to be read by the CLI can be piped to temp files/subprocess terminals, so that Kiro only needs to interact with the output, not include every line of intermediate output into context. If necessary, only include the most related result.

You can show them in the terminal to increase transparency, but do not include into context to avoid bloated context very quickly.

For example: user puts some docs into a dir named `problem/fix-ABC`. User requests with "find all docs under ABC".
Kiro would run `grep ABC` or `find . -type dir -name ABC` but does not find anything. Then, it tries to `-iname ".*ABC.*"` and found the dir. But it does not have to include every line of output of `find` into context. Instead, when found, it can put into context `it's under ~/Documents/problems/fix-ABC` and that's all it needs.
Same for `mvn`. A `mvn build` would have thousands of lines of output.

Same for MCP servers. Output like this is not very useful until it finds the trace.

### Actual behaviour

Intermediate info is put into context, causing exploding context.

Example 1:

```
Please read everything under OLAP dir before answering.

> I'll analyze this error and compare it with any previous issues by examining the OLAP directory first.
Tool validation failed:
Failed to validate tool parameters: Directory not found: OLAP
Searching for files: **/OLAP/** (using tool: glob)
❗ No files found matching pattern: **/OLAP/** under current directory
- Completed in 6.236s

Searching for files: **/olap/** (using tool: glob)
❗ No files found matching pattern: **/olap/** under current directory
- Completed in 2.767s

I will run the following command: find . -type d -iname "*olap*" 2>/dev/null | head -20 (using tool: shell)
Purpose: Search for OLAP directory case-insensitively

Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:

14% > t

./Documents/tickets/ABC-1234-OLAP
- Completed in 17.593s

Reading directory: ./Documents/tickets/ABC-1234-OLAP (using tool: read, max depth: 3, max entries: 1000, excluding: defaults)
✓ Successfully read directory ./Documents/tickets/ABC-1234-OLAP (26 entries)
- Completed in 0.1s

Batch fs_read operation with 3 operations (using tool: read)
Purpose: Read key documentation files to understand previous issues

↱ Operation 1: Reading file: ./Documents/tickets/ABC-1234-OLAP/COMPLETE-INVESTIGATION-OVERVIEW.md, all lines
↱ Operation 2: Reading file: ./Documents/tickets/ABC-1234-OLAP/FINAL-SOLUTION-SUMMARY.md, all lines
↱ Operation 3: Reading file: ./Documents/tickets/ABC-1234-OLAP/Questions and traces.md, all lines
✓ Successfully read 31801 bytes from ./Documents/tickets/ABC-1234-OLAP/COMPLETE-INVESTIGATION-OVERVIEW.md

✓ Successfully read 19243 bytes from ./Documents/tickets/ABC-1234-OLAP/FINAL-SOLUTION-SUMMARY.md

✓ Successfully read 44603 bytes from ./Documents/tickets/ABC-1234-OLAP/Questions and traces.md

- Summary: 3 operations processed, 3 successful, 0 failed
- Completed in 0.1s

> Based on the OLAP documentation and your new error, I can now analyze whether this is the same problem or different.
...
```

---

Example 2:
When using `Honeycomb` MCP:

```
Running tool get_trace with the param (from mcp server: honeycomb)
⋮ {
⋮ "environment_slug": "prod",
⋮ "trace_id": "12345",
⋮ "time_range": "7d"
⋮ }
```

### Steps to reproduce

Ask Kiro to search any dir without clear path, and asks it to read all files in that.
Ask Kiro to change Java code, it will run mvn build to see if it compiles.
Ask Kiro to search trace with Honeycomb MCP.

### Environment

```yaml
[q-details]
version = "1.26.2"
hash = "a8687141fdf1e599719c4da99f88f338aba93537"
date = "2026-02-18T03:22:58.712286Z (7d ago)"
variant = "full"

[system-info]
os = "macOS 26.2.0 (25C56)"
chip = "Apple M4 Pro"
total-cores = 14
memory = "48.00 GB"

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

[env-vars]
PATH = "/Users/USER/.rbenv/shims:/Users/USER/.qlty/bin:/Users/USER/.rd/bin:/Users/USER/.nvm/versions/node/v22.13.1/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/pmk/env/global/bin:/Users/USER/.local/bin:/Users/USER/local/share/yt-dlp:/opt/homebrew/opt/util-linux/sbin:/opt/homebrew/opt/util-linux/bin:/opt/homebrew/opt/postgresql@15/bin:/Users/USER/.rd/bin"
QTERM_SESSION_ID = "f7285f65af15499facfe3f984284d73f"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.26.2"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.apple.Terminal"
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Nell’issue non sono identificati file sorgente né test. Inizia riproducendo il comportamento tramite ricerche nelle directory, una build Maven e un trace Honeycomb MCP, quindi segui il modo in cui l’output dello strumento Kiro CLI entra nel contesto. Il lavoro è completato quando l’output dello strumento rimane visibile nel terminale, mentre i risultati intermedi vengono omessi dal contesto o ridotti al solo risultato rilevante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
ai, cli
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
32/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.