anomalyco / anomalyco/opencode

TUI lag with multi-subagent sessions (97% CPU on render thread)

Abierto
#42,657 4 comentarios 1 reacción 1 asignado Ver en GitHub

@kommander ya está trabajando en esto.

Desde el 14/8/2026.

Lenguaje dominante
TypeScript
Estrellas
209k
Forks
27.5k
Merge medio
7 h 2 min
PR fusionados (30 d)
384

Descripción

Description

When running sessions with 2-4 concurrent subagents, the TUI becomes unresponsive: typing has 1-3 second delay, spinner animation stutters/freezes. Tested across Warp, Windows Terminal, and WezTerm — same lag in all three.

Profiled during 4 concurrent subagents:

  • opencode process: 2,029 MB RAM, 97% CPU realtime, 42 threads
  • RAM grows from ~300 MB to 2+ GB within 20 minutes

The render loop appears to re-render on every state change from every subagent stream, saturating a full CPU core.

Already ruled out: terminal emulator (3 tested), Chrome memory pressure, orphaned node processes, 61 MB log file, power plan (High Performance), PowerShell version.

Setup: Windows 11 Boot Camp (MacBook Pro 16,1, i9-9980HK, 64 GB RAM), 15+ agents configured (orchestrator + SDD workflow), 3 MCP servers. Node v22.22.2.

Suggestion: throttle render frequency (max 30 FPS) or batch state updates when multiple subagents are active.

Plugins

opencode-subagent-statusline, opencode-sdd-engram-manage, custom TUI logo plugin

OpenCode version

1.18.18

Steps to reproduce
  1. Configure an orchestrator agent with 15+ subagent definitions
  2. Connect 3 MCP servers (codegraph, context7, engram)
  3. Enable TUI plugins (subagent-statusline, sdd-engram-manage)
  4. Start a session and trigger a task that launches 2-4 subagents concurrently
  5. Try typing while subagents are running — input is delayed 1-3 seconds
Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.