Skip to content

Fix WebUI cron session surfacing - #45363

Open
TomBanksAU wants to merge 1 commit into
NousResearch:mainfrom
TomBanksAU:fix/cron-webui-session-surfacing
Open

Fix WebUI cron session surfacing#45363
TomBanksAU wants to merge 1 commit into
NousResearch:mainfrom
TomBanksAU:fix/cron-webui-session-surfacing

Conversation

@TomBanksAU

Copy link
Copy Markdown

Summary

  • treat WebUI-origin cron delivery as satisfied by local session persistence instead of routing through gateway platform adapters
  • persist a concise assistant failure message for failed cron runs that otherwise leave prompt-only cron sessions
  • add regression tests for WebUI-origin delivery and failed cron run session persistence

Fixes #45360

Tests

  • source venv/bin/activate && pytest -q tests/cron/test_scheduler.py -q

Treat WebUI-origin cron delivery as satisfied by local session persistence instead of routing it through gateway platforms. Persist a concise assistant failure message for failed cron runs that otherwise leave prompt-only sessions.\n\nFixes NousResearch#45360

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Clean, well-scoped fix/feature with comprehensive tests. No issues found.

  • Logic is correct and focused
  • Tests cover the new behavior
  • No security concerns
  • Good error handling

Reviewed by Hermes Agent

@alt-glitch alt-glitch added type/bug Something isn't working comp/cron Cron scheduler and job management P2 Medium — degraded but workaround exists labels Jun 13, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused cron-session fix. The underlying WebUI-origin delivery defect is still present on current main: cron/scheduler.py:1104-1110 preserves a WebUI origin target, then cron/scheduler.py:1525-1530 attempts Platform("webui") and records an unknown-platform delivery error.

Problems

  • cron/scheduler.py:1956 in this PR appends an assistant failure when no assistant has non-empty content. A contentless persisted assistant tool-call message still occupies the assistant role, so this can produce assistant→assistant adjacency. The new regression tests cover only a prompt-only session.

Suggested changes

  • Make the failure append sequence-safe by inspecting the last persisted role/state, and add coverage for a contentless assistant/tool-call transcript.
  • The WebUI short-circuit itself fits the existing dashboard model: cron runs are independently surfaced as source='cron' sessions (hermes_cli/web_server.py:4014-4017).

Automated hermes-sweeper review.

Comment thread cron/scheduler.py
for m in _messages
)
if not _has_assistant:
_session_db.append_message(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_has_assistant ignores contentless assistant tool-call messages. If one is the final persisted message, this append creates assistant→assistant adjacency. Please make the append conditional on a sequence-safe final role/state and add that regression case.

@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 14, 2026
@teknium1 teknium1 added the area/sessions Session lifecycle, resume, persistence, history label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sessions Session lifecycle, resume, persistence, history comp/cron Cron scheduler and job management P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cron WebUI runs can show prompt-only sessions and unknown platform 'webui' delivery errors

4 participants