hermes - 💡(How to fix) Fix Archiving cron sessions from the desktop sidebar doesn't stick — session reappears after ~5–10s [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Cron sessions live in a separate atom ($cronSessions) from the regular session list ($sessions). The regular session list is fetched with excludeSources: ["cron"], while cron sessions are fetched separately via refreshCronSessions into $cronSessions. The archiveSession function optimistically removes from $sessions only — for cron sessions this is a no-op because $sessions.find(s => s.id === storedSessionId) returns undefined. The session lingers in $cronSessions until the next refresh cycle, and if a subsequent cron run creates a new session it fills the slot immediately.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug Description

Archiving a cron job session from the desktop sidebar session context menu appears to succeed (session disappears, notification shows), but the session reappears in the sidebar after approximately 5–10 seconds.

Steps to Reproduce

  1. Have a cron job that produces run sessions (source = cron)
  2. Open the desktop sidebar
  3. Right-click (or use the actions menu) on a cron session row
  4. Click "Archive"
  5. Observe: the session disappears briefly, then reappears ~5–10s later

Expected Behavior

Archiving should permanently soft-hide the session — it should only appear in the "Archived sessions" view, not in the default session list.

Actual Behavior

The session reappears in the sidebar shortly after being archived.

Proposed Solution

The archiveSession function in apps/desktop/src/app/session/hooks/use-session-actions.ts should also remove the session from $cronSessions when the archived session has source === "cron", or refreshCronSessions should be called immediately after archiving.

Technical Notes

Cron sessions live in a separate atom ($cronSessions) from the regular session list ($sessions). The regular session list is fetched with excludeSources: ["cron"], while cron sessions are fetched separately via refreshCronSessions into $cronSessions. The archiveSession function optimistically removes from $sessions only — for cron sessions this is a no-op because $sessions.find(s => s.id === storedSessionId) returns undefined. The session lingers in $cronSessions until the next refresh cycle, and if a subsequent cron run creates a new session it fills the slot immediately.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING