Skip to content

Feat/cron precheck skip llm - #10659

Closed
jneeee wants to merge 5 commits into
NousResearch:mainfrom
jneeee:feat/cron-precheck-skip-llm
Closed

jneeee wants to merge 5 commits into
NousResearch:mainfrom
jneeee:feat/cron-precheck-skip-llm

Conversation

@jneeee

@jneeee jneeee commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Related Issue

Fixes #10656

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

How to Test

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

Close #10656

jneeee and others added 4 commits April 15, 2026 21:47
…rns empty

Adds a `precheck` script field to cron jobs. When set, the script runs
BEFORE the LLM is invoked:

- Script exits non-zero → job skipped, error logged, no LLM call
- Script exits zero with empty stdout → silent skip (no LLM, no delivery)
- Script exits zero with output → output injected into prompt, LLM is called

This enables condition-gated cron jobs that avoid unnecessary LLM calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds user-facing documentation and developer internals for the new
precheck field, including behavior table, use cases, and examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Consolidate the precheck logic into the existing script field by adding
a `script_skip_if_empty` flag:

- script exits non-zero → error injected, LLM called (existing)
- script exits zero + empty + skip_if_empty=true → skip LLM silently
- script exits zero + empty + skip_if_empty=false → notice injected, LLM called
- script exits zero + output → output injected, LLM called (existing)

This avoids a redundant separate precheck mechanism.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add script_skip_if_empty parameter to cronjob tool (create/update)
- Fix _build_job_prompt to not inject "no output" notice when
  script_skip_if_empty=true and script returns empty (run_job handles skip)
- Add comprehensive tests for field storage, update, and prompt injection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jneeee
jneeee force-pushed the feat/cron-precheck-skip-llm branch 3 times, most recently from f982e19 to 1d6d41d Compare April 16, 2026 02:31
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jneeee
jneeee force-pushed the feat/cron-precheck-skip-llm branch from 1d6d41d to e4048ab Compare April 16, 2026 02:55
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Apr 25, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

Competing PR: #10855, #15223, and #9300 all implement similar cron script-skip-if-empty functionality. Also overlaps with merged #12373 (wakeAgent gate).

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the focused cron cost-control work. This automated hermes-sweeper review found that current main already implements the requested no-LLM/no-delivery outcome through the canonical script wake gate.

@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/cron Cron scheduler and job management 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.

feat(cron): add script_skip_if_empty to skip LLM when script returns empty output

3 participants