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 — tui: pinned sessions disappear from the session list once outside the newest 50 · Issue #64337 · anomalyco/opencode

tui: pinned sessions disappear from the session list once outside the newest 50 #64337

New issue
Copy link
New issue
Copy link
Closed as duplicate
#64339
Closed as duplicate
tui: pinned sessions disappear from the session list once outside the newest 50#64337
#64339
Copy link
Labels
area/tuiTerminal interfaceplatform/windowsWindowsreproducedtype/bugSomething is brokenversion/v2OpenCode 2.x

Description

@Jet-00656
Jet-00656
opened on Nov 17, 2026
Issue body actions

Description

Pinned sessions silently disappear from the session list once they fall outside the newest 50 sessions. The pins are not lost: the state file still contains them and their pin state is unchanged. The "Pinned" group only renders pinned sessions that happen to be inside the page the dialog loads, so older pins become unreachable from the UI.

Steps to reproduce

  1. Pin several sessions (ctrl+f in the session list).
  2. Keep working until more than 50 newer root, non-archived sessions exist.
  3. Open the session list (ctrl+o, or ctrl+x then l).

Expected behavior

Every pinned session appears under the "Pinned" group, regardless of how old it is or how many newer sessions exist.

Actual behavior

Only pinned sessions that are inside the newest 50 sessions are shown. The remaining pins are omitted from the list entirely, even though they are still pinned.

Additional context

The dialog requests session.list({ limit: 50, order: "desc", parentID: null, archived: false }) and builds the pinned group as pinned.filter(id => loadedIds.has(id)), so any pin outside that window is dropped.

Verified against a running 2.2.6 server:

$ opencode api get /api/session --param limit=50 --param order=desc --param parentID=null --param archived=false

returns 50 sessions, and only 2 of the 9 ids in ~/.local/state/opencode/session.json are present in that response. The other 7 pins rank 58-81 when ordered by time.updated.

All 9 pinned sessions still exist in the local database (session_v2 table), have parent_id IS NULL and are not archived, so this is display-only. The same request made by the dialog is confirmed to omit them, so it is not a data-loss or migration issue.

The quick slots also cap pinned entries at 9 (pinned.filter(...).slice(0, 9)), which is presumably intentional for session.quick_switch.1 through session.quick_switch.9.

Workaround: searching for the session title inside the session list makes the session reappear, and it is then correctly labeled "Pinned".

Plugins

opencode-mem

OpenCode version

2.2.6

Operating System

Windows 11 (Windows_NT 10.0.26300, x64)

Terminal

Windows Terminal (TERM=xterm-256color)

Activity

  1. opencodejr
    added
    area/tuiTerminal interface
    platform/windowsWindows
    type/bugSomething is broken
    version/v2OpenCode 2.x
    on Nov 17, 2026
  2. opencodejr commented on Nov 17, 2026

    @opencodejr
    opencodejrBot
    on Nov 17, 2026
    Contributor
    More actions

    Thanks for the detailed report. I reproduced this on 2.2.6 with session tabs off:

    1. I created 3 sessions and pinned each one with ctrl+f in the session list. They showed under "Pinned".
    2. I created 55 newer root sessions.
    3. I reopened the session list (ctrl+x l). The "Pinned" group was gone and the pinned sessions were missing.
    4. Searching for one of the titles brought it back, labelled "Pinned", as you describe.

    It still happens on the latest dev (62d06fa). The recording and screenshots below show it, and the script below reproduces it.

    recording.mp4

    Screenshot

    Screenshot

    Screenshot

    Reproduction script (drive.ts)
    // Reproduces anomalyco/opencode#64337: pinned sessions outside the newest 50
    // disappear from the TUI session list.
    import { Effect } from "effect"
    import { OpenCodeDriver } from "opencode-drive"
    
    const PINS = ["OLD-PIN-ALPHA", "OLD-PIN-BRAVO", "OLD-PIN-CHARLIE"]
    
    export default OpenCodeDriver.use(
      {
        ...(process.env.OC_DEV ? { opencode: { dev: process.env.OC_DEV } } : {}),
        tuiConfig: { tabs: { mode: "off" } },
        tui: { recording: true, keypressOverlay: true, viewport: { cols: 140, rows: 45 } },
      } as any,
      ({ ui, opencode }) =>
        Effect.gen(function* () {
          // 1. Three old sessions, then pin each from the session list (ctrl+f).
          for (const title of PINS) yield* opencode.session.create({ title })
          yield* Effect.sleep(500)
          // Show sessions from all projects (the API-created sessions have no project location).
          yield* ui.press("x", { ctrl: true })
          yield* ui.press("l")
          yield* ui.waitFor("Sessions")
          yield* Effect.sleep(500)
          if (yield* ui.matches("Sessions for")) yield* ui.press("a", { ctrl: true })
          yield* ui.waitFor("OLD-PIN-ALPHA")
          yield* ui.screenshot("0-all-projects")
          yield* ui.press("escape")
          for (const title of PINS) {
            yield* ui.press("x", { ctrl: true })
            yield* ui.press("l")
            yield* ui.waitFor("Sessions")
            yield* ui.type(title)
            yield* Effect.sleep(800)
            yield* ui.press("f", { ctrl: true })
            yield* Effect.sleep(300)
            yield* Effect.sleep(400)
            yield* ui.press("escape")
            yield* Effect.sleep(300)
          }
          yield* ui.press("x", { ctrl: true })
          yield* ui.press("l")
          yield* ui.waitFor("Pinned")
          yield* Effect.sleep(800)
          yield* ui.screenshot("1-pins-visible-with-3-sessions")
          const before = yield* ui.capture()
          yield* ui.press("escape")
    
          // 2. 55 newer root sessions push the pins out of the newest 50.
          for (let i = 1; i <= 55; i++) yield* opencode.session.create({ title: `newer session ${i}` })
          yield* Effect.sleep(500)
    
          // 3. Reopen the session list: the Pinned group is gone.
          yield* ui.press("x", { ctrl: true })
          yield* ui.press("l")
          yield* ui.waitFor("newer session 55")
          yield* Effect.sleep(1000)
          yield* ui.screenshot("2-pins-missing-after-55-newer")
          const pinnedShown = yield* ui.matches("Pinned")
          const alphaShown = yield* ui.matches("OLD-PIN-ALPHA")
          yield* Effect.log(`after 55 newer sessions: "Pinned" visible=${pinnedShown}, OLD-PIN-ALPHA visible=${alphaShown}`)
    
          // 4. Workaround from the report: searching brings a pin back, labelled Pinned.
          yield* ui.type("OLD-PIN-ALPHA")
          yield* ui.waitFor("OLD-PIN-ALPHA")
          yield* Effect.sleep(1000)
          yield* ui.screenshot("3-search-brings-pin-back")
          yield* Effect.log(`after search: "Pinned" visible=${yield* ui.matches("Pinned")}`)
          void before
        }),
    )

    Run it with opencode-drive: opencode-drive run ./drive.ts. It drives opencode from your PATH; set OC_DEV to the path of an OpenCode checkout to run that from source instead.

  3. opencodejr
    added
    reproduced
    on Nov 17, 2026
  4. neriousy commented on Nov 23, 2026

    @neriousy
    neriousy
    on Nov 23, 2026
    Member
    More actions

    Closing as a duplicate of #60236: pins older than the newest 50 sessions disappear from the list, and #60237 is open to fix it. Please follow that issue for updates and add any extra details there.

  5. neriousy
    closed this as a duplicateof [FEATURE]: show pinned sessions in the session list when tabs are enabled #60236 on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tuiTerminal interfaceplatform/windowsWindowsreproducedtype/bugSomething is brokenversion/v2OpenCode 2.x

    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.