Cron sessions do not appear under their assigned project Non-empty cron or background…
- User
Cron sessions do not appear under their assigned project
Non-empty cron or background sessions assigned to a project must be shown when that project is selected. They remain hidden in default, unassigned, empty, and unrelated-project views. The behavior must be consistent across supported session retrieval modes.
Interface
No new interfaces are introduced.
- Assistant
I'll trace how cron/background sessions are stored and how project filtering works in session retrieval.
- Assistant
Implementing the fix: cron sessions are excluded server-side before the client can apply project filters. I'll include project-assigned non-empty sessions in the catalog and filter them client-side in default views.
- Assistant
Now I'll add tests and update the gateway test that assumed cron sessions are never in the API response.
- Assistant
Fixed: cron/background sessions were being dropped from the session catalog before project filtering could run.
Root cause: Cron sessions were excluded entirely in
all_sessions()and/api/sessionsvia_hide_from_default_sidebar(), so they never reached the client. The project chip filter insessions.jshad nothing to match against.Fix:
-
api/models.py— Added_project_scoped_background_sidebar_session()and_append_project_scoped_background_sessions()so non-empty, project-assigned cron/background sessions stay in the catalog while still hidden from the default sidebar list. -
api/routes.py— CLI merge now includes those sessions instead of filtering them all out. -
static/sessions.js— Added_isIntentionallyBackgroundSidebarSession()and_visibleBackgroundSidebarSession()so cron rows only render when:
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.