anomalyco / anomalyco/opencode
TUI lag with multi-subagent sessions (97% CPU on render thread)
@kommander 已经在做这个了。
开始于 2026年8月14日。
- 主要语言
- TypeScript
- 星标
- 209k
- 派生
- 27.5k
- 平均合并
- 7 小时 2 分钟
- 30 天内合并 PR
- 384
描述
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
- Configure an orchestrator agent with 15+ subagent definitions
- Connect 3 MCP servers (codegraph, context7, engram)
- Enable TUI plugins (subagent-statusline, sdd-engram-manage)
- Start a session and trigger a task that launches 2-4 subagents concurrently
- 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。