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()
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: