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:
--no-interactive mode (no tty)
- Sub-agent uses
fs_write tool
- 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
Checks
q doctorin the affected terminal sessionq restartand replicated the issue againOperating system
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-interactivemode. 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.jsonIS written correctly by the child.See
repro_output.logfor full output.Key Findings
--no-interactive--no-interactive--no-interactiveThe bug requires ALL of:
--no-interactivemode (no tty)fs_writetoolWorkaround
Change child prompt ending from:
To:
See
repro_output_short_reply.logfor 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