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 sessions are filtered by project and how cron/background sessions are classified in retrieval.
- Assistant
Implementing the fix: cron sessions get a
project_idbut are stripped from the API before the client can filter by project. - Assistant
Implementing centralized visibility helpers and wiring them through the API, client, and MCP paths.
- Assistant
Fixed. Cron sessions were getting a
project_id(viaensure_cron_project()) but were stripped out server-side before the client could filter by project.Cause
Cron/background sessions were removed in three places:
all_sessions()via_hide_from_default_sidebar()/api/sessionsCLI merge via_cron_hide- Client project filter had nothing to match against
Fix
-
api/models.py— Added shared visibility helpers:_sidebar_background_session_eligible()— non-empty + assigned project_sidebar_visible_for_project_filter()— project-scoped visibility rules_append_project_scoped_background_sessions()— keeps assigned cron rows in the API pool for client-side project filtering
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.