[Bug]: Kiro starts a full CLI + Node process per concurrent thread; 3 threads peak at ~1.6 GB RSS #49734
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- Use macOS arm64 with 16 GB RAM, T3 Code
0.1.14-nightly.20261206.25, Kiro CLI3.8.2, and a validKIRO_API_KEY. - Use the Kiro provider with its normal per-thread behavior.
- Start three independent top-level Kiro threads in the same project, same provider instance, same working directory, and same Kiro account.
- Use
claude-haiku-5.5,mode=vibe,full-access, and send the same read-only analysis prompt to all three threads at the same time. - Sample the Kiro process tree with
ps, and sample total RSS and physical footprint until all turns complete.
Expected behavior#
The memory cost of concurrent Kiro threads should scale with the conversations and tool output, not with a complete kiro-cli + Node runtime per thread.
Threads that belong to the same provider instance, account, and workspace should reuse or multiplex the Kiro process/connection where the ACP protocol allows it. The exact implementation is up to the maintainers; the problem is the full process-tree duplication.
Actual behavior#
Each active Kiro thread starts its own process tree:
kiro-cli acp --agent-engine=v3 --auth-method=cli
└─ node .../@kiro/agent/dist/server/acp-server.js --transport=stdio --auth=acp-callback
Three concurrent threads therefore produced six processes:
- 3 ×
kiro-cli acp - 3 × Node
@kiro/agentchild processes
Measured results for the same workload:
| Configuration | Processes | Active peak RSS | Active CPU | 70s idle RSS | 70s idle footprint |
|---|---|---|---|---|---|
| Normal per-thread behavior | 6 | 1578.4 MB | 17.50 s | 1228.0 MB | 746 MB |
| One shared Kiro connection prototype | 2 | 670.3 MB | 7.47 s | 436.4 MB | 246 MB |
The active peak breakdown in the per-thread run was approximately:
kiro-cli: 98.0 MB RSS- Node ACP agent: 1480.3 MB RSS
This is not a stdio MCP fan-out issue. The Kiro configuration had no user-level stdio MCP servers; its only MCP entry was one HTTP dbhub server.
This build predates #49083, so the 70-second idle figures are before the new 2-minute idle-release behavior. I am not treating those idle numbers as steady state. The main problem is the concurrent case: each active thread still reserves a full Kiro CLI + Node process tree while it is running.
Impact#
Major degradation or frequent failure.
Three concurrent Kiro threads already peak at about 1.6 GB RSS for this provider alone. The per-thread cost is roughly 500 MB at peak, so a handful of parallel Kiro threads can consume multiple gigabytes and make a 16 GB machine swap heavily or OOM.
Version or commit#
0.1.14-nightly.20261206.25
Environment#
macOS 27.0.1 arm64, 16 GB RAM, Kiro CLI 3.8.2, Kiro model claude-haiku-5.5, mode=vibe, full-access.
Logs or stack traces#
# Normal per-thread run
3 × kiro-cli acp --agent-engine=v3 --auth-method=cli
3 × node .../@kiro/agent/dist/server/acp-server.js --transport=stdio --auth=acp-callback
# Local prototype that multiplexed the same 3 threads
1 × kiro-cli acp --agent-engine=v3 --auth-method=cli
1 × node .../@kiro/agent/dist/server/acp-server.js --transport=stdio --auth=acp-callback
Workaround#
Limit Kiro to one active thread at a time, archive completed threads, or use another provider for parallel work. Waiting for the 2-minute idle release helps after turns finish, but does not reduce memory while several Kiro threads are actively running.
Additional context#
A local prototype opened three ACP sessions over one kiro-cli acp connection and completed the same three read-only tasks with two processes instead of six, at 670.3 MB peak RSS instead of 1578.4 MB. That is evidence that the duplication is avoidable, but I am not asking for a specific user-facing setting in this issue.
I have not opened a PR for this. I am looking for guidance on whether this is considered an in-scope performance bug, and which direction the maintainers would prefer.
tanstack-source added labelsbug
Sign in to join this conversation.