aws / aws/amazon-q-developer-cli
bug: use_subagent returns EmptyResponse in --no-interactive mode
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 2k
- Forks
- 439
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Checks
- I have searched github.com/aws/amazon-q-developer-cli/issues and there are no duplicates of my issue
- I have run
q doctorin the affected terminal session - I have run
q restartand replicated the issue again
Operating system
- kiro-cli 2.6.0 - Linux (WSL2 Ubuntu 24.04, glibc 2.39)
Expected behaviour
Orchestrating Agent call subagent successfully
Actual behaviour
While building an agent evaluation system (parent agent orchestrating specialized sub-agents), we discovered that sub-agent responses are lost when running in --no-interactive mode. The sub-agent executes fully (reads files, writes results), but its final text response is never returned to the parent agent.
Steps to reproduce
Reproduce
kiro-cli chat --agent repro-parent --no-interactive "call the child agent to process /tmp/repro_input.txt"
Expected
Parent receives child's text response (analysis + confirmation)
Actual
Parent reports EmptyResponse. But /tmp/repro_output/result.json IS written correctly by the child.
See repro_output.log for full output.
Key Findings
| Mode | Child Response Type | Result |
|---|---|---|
--no-interactive |
Multi-line text after fs_write | ❌ EmptyResponse (100%) |
--no-interactive |
Single short line after fs_write | ✅ Works (0% failure) |
| Interactive (tty) | Multi-line text after fs_write | ✅ Works (0% failure) |
--no-interactive |
Multi-line text without fs_write | ✅ Works (0% failure) |
The bug requires ALL of:
--no-interactivemode (no tty)- Sub-agent uses
fs_writetool - Sub-agent responds with multi-line text after writing
Workaround
Change child prompt ending from:
IMPORTANT: You MUST write the result file AND respond with a natural language confirmation. Do not respond with only JSON.
To:
IMPORTANT: After writing the result file, respond with ONLY this exact text: 'DONE:case-001:PASS'. Nothing else.
See repro_output_short_reply.log for successful output with workaround.
Files
repro-parent.json— minimal parent agent (only use_subagent tool)repro-child.json— child agent that triggers bug (fs_read + fs_write + multi-line response)repro_output.log— output showing EmptyResponse (bug)repro_output_short_reply.log— output showing success (workaround)
Environment
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Führe zunächst den Reproduktionsbefehl mit repro-parent.json und repro-child.json aus und vergleiche anschließend repro_output.log mit repro_output_short_reply.log. Verfolge, wie --no-interactive die Antwort des untergeordneten Prozesses nach fs_write verarbeitet; abgeschlossen ist die Änderung, wenn der übergeordnete Prozess den mehrzeiligen Text des untergeordneten Prozesses statt EmptyResponse erhält und die Ergebnisdatei weiterhin geschrieben wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- ai, cli
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100