GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Performance issue: session-child-cycle becomes extremely slow with many sessions · Issue #3526 · anomalyco/opencode

Performance issue: session-child-cycle becomes extremely slow with many sessions #3526

New issue
Copy link
New issue
Copy link
Closed
Closed
Performance issue: session-child-cycle becomes extremely slow with many sessions#3526
Copy link
Assignees
thdxr
Labels
perfIndicates a performance issue or need for optimization

Description

@zenyr
zenyr
opened on Oct 29, 2025
Issue body actions

Description

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

  1. Create workspace with 500+ sessions (e.g., run complex tasks with subagents).
  2. Press ctrl+right or ctrl+left to cycle sessions.
  3. Observe delay in switching.

Screenshot and/or share link

Image

... no wonder 😅

Operating System

macOS (Darwin)

Terminal

No response

Reacted by Yuan, Kevin Centeno, Zebulon Rouse-Frantzich and Julián Cruciani

Activity

  1. rekram1-node
    assigned
    thdxr
    on Oct 29, 2025
  2. rekram1-node
    added
    perfIndicates a performance issue or need for optimization
    on Oct 29, 2025
  3. rekram1-node commented on Oct 29, 2025

    @rekram1-node
    rekram1-node
    on Oct 29, 2025
    Member
    More actions

    good to know thx

  4. ry2009 commented on Dec 9, 2025

    @ry2009
    ry2009
    on Dec 9, 2025
    Contributor
    More actions

    Should more then resolve the problem but open to comments or concerns:
    ry2009#4

  5. zenyr commented on Dec 11, 2025

    @zenyr
    zenyr
    on Dec 11, 2025
    ContributorAuthor
    More actions

    Guys please add input about your recent experience with this issue, since I myself have not suffered this issue these days.

    • Before: took >20s every time
    • After: takes <2s (not an exact science)

    For the record

    now my storage looks like this after extensive use of OC:

    Image Image
    • No gigantic /session folder anymore! 👍 Huge W
    • No, the switch is not INSTANT fast yet. But it works within reasonable time nonetheless.

    So... of course, this could be even better with more optimizations. But I consider this mostly solved.

  6. ry2009 commented on Dec 11, 2025

    @ry2009
    ry2009
    on Dec 11, 2025
    Contributor
    More actions

    @zenyr is this what you found naturally with the newest OpenCode version?

    Reacted by Jinhyeok Lee
  7. rekram1-node commented on Dec 11, 2025

    @rekram1-node
    rekram1-node
    on Dec 11, 2025
    Member
    More actions

    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

  8. ry2009 commented on Dec 11, 2025

    @ry2009
    ry2009
    on Dec 11, 2025
    Contributor
    More actions

    Should I close out my perf with extra caches fix then? @rekram1-node

  9. thdxr
    closed this as completedon Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

Labels

perfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.