Skip to content

fix: archived sessions pollute per-project session list #27030

Closed as not planned

Description

@bingkxu

Problem

Session.list() (per-project session listing) returns all sessions including archived ones, while Session.listGlobal() already filters them out via isNull(time_archived).

This causes archived sessions from automated workflows (cron tasks, CI runs) to pollute the session history displayed to users.

Solution

Add isNull(SessionTable.time_archived) filter to listByProject() function to match listGlobal() behavior.

Code Change

In packages/opencode/src/session/session.ts:

  • Add archived?: boolean to ListInput type
  • Add filter condition in listByProject()

Activity

  1. github-actions commented on May 12, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • No issue template was used. Please use the Bug Report template, which requires a proper Description field and steps to reproduce (system info is also helpful for triaging)
    • The title follows a PR/commit message convention (fix:) rather than an issue title — consider describing the bug in plain language

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. added
    needs:compliance
    on May 12, 2026
  3. github-actions commented on May 12, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

  4. removed
    needs:compliance
    on May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions