Repository navigation
Description
Bug Description
In the Desktop GUI, the Run History panel shows "No runs yet" for agent cron jobs, even though the backend API returns the run sessions correctly. This started after updating to v0.16.0; the same jobs previously displayed their run history.
This is distinct from #42433 / #46918 / #44080, which all concern no_agent / script jobs whose /runs endpoint genuinely returns {"runs":[]} (script jobs don't create agent run-sessions). Here the jobs are normal agent jobs, the /runs endpoint returns a populated list, and the UI still shows nothing.
The backend is fully exonerated. Verified end-to-end:
- State DB has the runs — 92
source='cron'sessions, including today's (e.g.cron_96bd815a3d61_20260616_010050, job "Memory Dream",end_reason=cron_complete). - Hitting the Desktop's own dashboard process (the one it spawned, using its
HERMES_DASHBOARD_SESSION_TOKEN) over real HTTP returns the data:
GET http://127.0.0.1:<port>/api/cron/jobs/96bd815a3d61/runs?limit=20→ HTTP 200,{"runs": [ …6 items… ], "limit": 20}(~107 KB). - Driving the exact endpoint backend path in-process returns 6 runs with full fields (
id,started_at,title,preview,message_count, …):from hermes_cli import web_server as ws selected = ws._find_cron_job_profile("96bd815a3d61") # -> 'default' db = ws._open_session_db_for_profile(selected) # -> root state.db len(db.list_cron_job_runs("96bd815a3d61", limit=20)) # -> 6
So DB layer, profile resolution, the /api/cron/jobs/{id}/runs endpoint, and JSON serialization all return the data — only the Desktop UI renders nothing.
Steps to Reproduce
- Have one or more agent cron jobs (non-empty
prompt,no_agent: false) that have completed several runs. - Update to v0.16.0 and open the Desktop GUI → cron jobs.
- Select a job with completed runs (e.g. a daily agent job).
- The Run History panel shows "No runs yet", while
GET /api/cron/jobs/<id>/runsreturns a populatedrunsarray for that same job.
Expected Behavior
The Run History panel lists the job's completed runs (the same sessions the /runs endpoint returns), as it did before v0.16.0.
Actual Behavior
Run History shows "No runs yet" for every agent cron job, despite the endpoint returning HTTP 200 with a non-empty runs array. No error is surfaced in the UI.
Affected Component
Other — Desktop GUI, cron Run History view.
Debug Report
Not provided. hermes debug share uploads config and logs to a public paste service; this config contains live provider API keys and private cron prompts, so I'm not publishing it to a public issue. The end-to-end backend verification above (HTTP 200 + populated runs) is reproducible without it and contains no secrets. Happy to provide redacted specifics on request.
Operating System
Windows 11
Python Version
3.11.15
Hermes Version
Backend: Hermes Agent v0.16.0 (2026.6.5) · upstream 2dbc3bd9. Desktop is running the freshly-built binary from the same tree (apps/desktop/release/win-unpacked/Hermes.exe built 2026-06-16; the running processes started after that build), so this is current 0.16.0 code — not a stale install. Note: the desktop's own version string still reads 0.15.1 because apps/desktop/package.json is un-bumped on upstream HEAD too (last touched in 368fcf1ff, still 0.15.1); it's a version-label lag, not stale code.
Root Cause Analysis (optional)
Backend is exonerated, so this is on the Desktop frontend fetch/render path:
apps/desktop/src/hermes.ts:536getCronJobRuns()→GET /api/cron/jobs/{id}/runs?limit=20apps/desktop/src/app/cron/index.tsx:643-672andapps/desktop/src/app/chat/sidebar/cron-jobs-section.tsx:301-333both do.catch(() => setRuns([])), i.e. any error in the fetch is silently rendered as "No runs yet" with no surfaced error.
The symptom landed with the v0.16.0 multi-profile work (fix(desktop): route profile session reads 7a2d498b9; bb/desktop-profile-fallout #44529 — reworked WS auth + cross-profile session reads). The regression is plausibly in how the desktop now authenticates/routes that request for agent jobs, but the swallowing .catch means the UI can't distinguish "request failed" from "genuinely zero runs".
Proposed Fix (optional)
- Don't collapse a failed
/runsfetch into "No runs yet" — distinguish error from empty and surface the error (this alone makes the root cause visible). - Verify the desktop's run-history request still authenticates/routes correctly under the v0.16.0 profile changes for agent jobs whose
/runsreturns a non-empty list.
Activity
[-]Desktop Run History empty for agent cron jobs despite /api/cron/jobs/{id}/runs returning runs (v0.16.0 regression)[/-][+][Bug]: Desktop Run History empty for agent cron jobs despite /api/cron/jobs/{id}/runs returning runs (v0.16.0 regression)[/+]szzhoujiarui-sketch commentedon Jun 16, 2026
I took this. Here's the current status:
PR 1 — Surface the swallowed error ✅ (PR #47018)
Replaced
.catch(() => setRuns(prev => prev ?? []))with explicit error state + Retry button in bothCronJobRunsandCronJobSidebarRuns. On fetch failure, the UI now shows the error message with a Retry button instead of silently falling back to "No runs yet".Updates since opening:
cancelledRefto prevent stalesetStateafter unmount (theuseCallbackpattern lost the originalcancelledflag from the effect cleanup)PR 2 — Fix the actual regression ⏳ (on hold)
After tracing the full request path (
renderer → IPC → Electron main → backend), I found that the backend's_find_cron_job_profile()already iterates all profiles to resolve the owning profile correctly. So even thoughgetCronJobRunsdoesn't pass aprofile, the backend finds the rightstate.dband returns data — this was confirmed working via direct HTTP.This means the original symptom (UI empty, endpoint returns data) was purely caused by the silent
.catch()swallowing an intermittent error (likely connection timeout, backend restart, or transient auth hiccup). PR 1 should be sufficient — once it lands, whatever concrete error occurs will be visible with a Retry button.I'll reassess PR 2 if the surfaced error reveals a pattern that needs a routing fix.
GottZ commentedon Jul 29, 2026
Summary
One PR references issue #46979. The issue establishes a symptom boundary—Desktop shows no history while the same job's runs API returns a non-empty array—but does not establish whether the defect is in rendering, client-side data consumption, or an API contract mismatch; #62663 instead changes stale-session recovery and session ownership handling.
Related pull requests
unrelated— (+1413/-59) — unrelated to the reported symptom: the diff adds lease-aware stale-session reaping, bounded SessionDB opening, scheduler cadence handling, and associated tests, but it does not change the Desktop history consumer or the runs endpoint's response contract. Despite the keep_open review on fix(cron): reap stale sessions on every tick + persist final_response as session message #62663, which identifies the stale-session work as independently salvageable after safety fixes, the current diff does not explain or correct the evidenced case where completed runs are already returned yet remain absent from the UI.Suggested consolidation
Do not merge #62663 as the fix for #46979, and remove its closes linkage to this issue; retain or evaluate it separately for stale-session reliability in line with the keep_open review. Continue #46979 investigation at the Desktop-to-API contract boundary without presupposing whether the eventual correction belongs to the frontend or backend.
Cross-PR triage: Reviewed 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 69 kB of PR diffs, 7 kB of issue/PR text, 5 kB of discussion (5 comments), 1 verify verdict. verdicts reflect diff content, not PR titles. Part of an automated triage batch.