Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Kiro starts a full CLI + Node process per concurrent thread; 3 threads peak at ~1.6 GB RSS #49734

Opengujunxiang(GitHub profile, opens in a new tab) opened this issue 0 comments

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

  1. Use macOS arm64 with 16 GB RAM, T3 Code 0.1.14-nightly.20261206.25, Kiro CLI 3.8.2, and a valid KIRO_API_KEY.
  2. Use the Kiro provider with its normal per-thread behavior.
  3. Start three independent top-level Kiro threads in the same project, same provider instance, same working directory, and same Kiro account.
  4. 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.
  5. 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/agent child processes

Measured results for the same workload:

ConfigurationProcessesActive peak RSSActive CPU70s idle RSS70s idle footprint
Normal per-thread behavior61578.4 MB17.50 s1228.0 MB746 MB
One shared Kiro connection prototype2670.3 MB7.47 s436.4 MB246 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.

  1. tanstack-source added labelsbug

Sign in to join this conversation.