aws / aws/amazon-q-developer-cli

bug: use_subagent returns EmptyResponse in --no-interactive mode

Offen
#3,835 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Rust
Sterne
2k
Forks
439
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Checks
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:

  1. --no-interactive mode (no tty)
  2. Sub-agent uses fs_write tool
  3. 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

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Ö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

Neue Issues direkt in Ihr Postfach

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