You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Performance issue: session-child-cycle becomes extremely slow with many sessions #3526
session-child-cycle (ctrl+right) and session-child-cycle-reverse (ctrl+left) become extremely slow in workspaces with many sessions (e.g., after subagents create child sessions). Response time exceeds 10 seconds, causing input lag and ignored commands.
Root cause: `Session.children()` in `packages/opencode/src/session/index.ts` performs O(N) scan of all sessions via `Storage.list()` and `Storage.read()` per cycle.
OpenCode version
0.15.23 (sessions persist across versions)
Steps to reproduce
Create workspace with 500+ sessions (e.g., run complex tasks with subagents).
Activity
rekram1-node commentedon Oct 29, 2025
good to know thx
ry2009 commentedon Dec 9, 2025
Should more then resolve the problem but open to comments or concerns:
ry2009#4
zenyr commentedon Dec 11, 2025
Guys please add input about your recent experience with this issue, since I myself have not suffered this issue these days.
For the record
now my storage looks like this after extensive use of OC:
/sessionfolder anymore! 👍 Huge WSo... of course, this could be even better with more optimizations. But I consider this mostly solved.
ry2009 commentedon Dec 11, 2025
@zenyr is this what you found naturally with the newest OpenCode version?
rekram1-node commentedon Dec 11, 2025
I did do a small optimization for subagent stuff in terms of perf that could be what fixed it
also we are improving the ux of subagent nav soon
ry2009 commentedon Dec 11, 2025
Should I close out my perf with extra caches fix then? @rekram1-node