aws / aws/amazon-q-developer-cli

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

Open
#3,653 0 comments 0 reactions 0 assignees View on GitHub
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](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"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.