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
Now let me check
_keep_latest_messaging_session_per_sourceand_is_messaging_session_recordto make sure cron rows pass through: - Assistant
Now I have the full picture. Let me implement the fix.
1. Server —
api/models.py: add the project-scoped background predicate + merge helper: - Assistant
3. Client —
static/sessions.js: flagged rows are only visible when their own project is selected: - Assistant
Let me check the search endpoint, since its results merge into the sidebar list client-side:
- Assistant
Now create the new test file:
- Assistant
Now run the new tests plus the touched existing suites:
- Assistant
Now a full-suite sweep to catch anything else affected:
- Assistant
While that runs, validate the JS edit and check whether the payload contract is documented:
- Assistant
The diff is complete and coherent. Now I'll wait for the full-suite run to finish:
- Assistant
I need the server-side traceback. Let me temporarily capture server stderr:
- Assistant
The full suite finished: 85 failed / 6355 passed — I need to check whether those failures are pre-existing or mine:
- Assistant
Now run the baseline suite:
- Assistant
Only one new failure — the unassigned-chip source-contract test. Let me look at it:
- Assistant
Now reproduce the order-dependent 500 with server logging enabled (my conftest debug edit is back after the stash pop):
- Assistant
Final full-suite confirmation run:
- Assistant
All green. The fix is complete.
Summary
Bug: Cron sessions auto-assigned to the "Cron Jobs" project (#1079) — or moved to any project — never appeared when that project was selected, because the server dropped every cron/background row from the
/api/sessionspayload via , and project filtering happens client-side over that payload.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.