Skip to content

feat(cron): add opt-in session history delivery - #7400

Closed
helix4u wants to merge 1 commit into
NousResearch:mainfrom
helix4u:feat/cron-into-history-delivery
Closed

feat(cron): add opt-in session history delivery#7400
helix4u wants to merge 1 commit into
NousResearch:mainfrom
helix4u:feat/cron-into-history-delivery

Conversation

@helix4u

@helix4u helix4u commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds an opt-in cron delivery mode that mirrors delivered cron output into the target gateway conversation history so later turns in that chat can see it.

This keeps the existing isolated cron behavior as the default and adds a per-job into_history toggle for users who want cron output to become part of the live conversation history.

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Tests
  • Documentation

Changes Made

  • Added per-job into_history storage and API/tool support for cron jobs.
  • Added CLI flags for hermes cron create/edit --into-history and --no-into-history.
  • Added /cron slash-command support for --into-history / --no-into-history in the interactive CLI path.
  • Mirrored delivered cron output into the target gateway session history when into_history is enabled.
  • Kept the existing isolated cron behavior as the default.
  • Updated cron delivery footer text to distinguish isolated delivery from history-mirrored delivery.
  • Added cron output artifact metadata so saved cron run files show the delivery/history mode.
  • Added a guardrail in the standalone cron CLI path to catch swallowed cron flags accidentally pasted into the prompt text.
  • Updated user and developer cron docs.

How to Test

Targeted tests run and passed:

  • python -m pytest tests/hermes_cli/test_cron.py -q
  • python -m pytest tests/cron/test_scheduler.py -q
  • python -m pytest tests/cron/test_jobs.py -q
  • python -m pytest tests/gateway/test_api_server_jobs.py -q

Manual behavior tested locally:

  • created paired one-shot cron jobs with and without --into-history
  • verified the saved job config persisted into_history true/false correctly
  • verified the delivered footer changes when history mirroring is enabled
  • verified /cron add ... --into-history now parses correctly instead of swallowing the flag into prompt text

Full suite status:

  • python -m pytest tests/ -q -n 0
  • Result: 57 failed, 10092 passed, 37 skipped, 50 deselected

The full suite is currently red in unrelated areas outside this change, so this PR is scoped to the cron/history feature and its focused regression coverage.

Checklist

  • I have read the contributing guide
  • My commit follows the repository's commit style
  • This PR is scoped to related changes
  • I added tests for the feature/fix
  • I considered cross-platform impact
  • pytest tests/ -q passes fully in this branch

@helix4u
helix4u marked this pull request as ready for review April 10, 2026 21:43
@Tosko4

Tosko4 commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

@teknium1 would you please be willing to merge this in at least :( this will help the experience a lot!

@thelumiereguy

thelumiereguy commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Agreed! ^
This would be a great addition!
Thanks for the changes @helix4u !

I was just planning to do this when I stumbled upon your PR.

@ajmurphy

Copy link
Copy Markdown

This would make cron tasks way better! watching for when this one gets merged in.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 28, 2026
@guajardo

Copy link
Copy Markdown

any news to implement this??

@Duesentrieb71

Copy link
Copy Markdown

Any progress on this? This is an essential feature.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution. Current main now implements the requested opt-in cron-to-session delivery behavior in a more complete form. This is an automated hermes-sweeper review.

  • 1b181724fae7799cf45dec3aca03ac44063175e7 added optional cron delivery mirroring and is an ancestor of current main.
  • cron/scheduler.py:583 resolves the default-off global cron.mirror_delivery gate and a per-job attach_to_session override.
  • cron/scheduler.py:648 mirrors a labelled cron delivery as a user turn; tests/cron/test_scheduler.py:4155 verifies this avoids assistant→assistant alternation failures.
  • cron/scheduler.py:1511 scopes mirroring to the originating conversation, and tests/cron/test_scheduler.py:4296 covers non-origin fan-out targets.

The current implementation also documents the continuable-job behavior in website/docs/user-guide/features/cron.md:301.

@teknium1 teknium1 closed this Jul 12, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: True Autonomy - Automatically Inject Cron Results into Live Gateway Chat Sessions

8 participants