Problem
When creating a cron job with action="create" and a relative script path like "scripts/ai-newsletter-aggregator.py", the cronjob tool resolves it by prepending ~/.hermes/profiles/<name>/scripts/, resulting in the path:
~/.hermes/profiles/<name>/scripts/ + scripts/ai-newsletter-aggregator.py
= ~/.hermes/profiles/<name>/scripts/scripts/ai-newsletter-aggregator.py
This causes two issues:
1. Silent double-directory trap
The user-provided path scripts/foo.py becomes scripts/scripts/foo.py with no warning. The correct relative path should be just foo.py, but this is non-obvious from the tool documentation.
2. No create-time validation
The cronjob tool accepts any string for script without checking the resolved path exists. No warning at create or update time. The failure only appears at runtime when the cron fires and the script is silently skipped, with only a late error message in the agent delivery.
Impact
- Scripts appear to "vanish" or get lost between setup and execution
- No feedback loop at configuration time to catch the mistake
- Agent falls back to processing stale data when the data-collection script fails, masking the underlying issue
Proposed fixes
-
Validate at create/update time: Check the resolved script path exists before accepting the cron job configuration. Fail or warn if the file is missing.
-
Strip leading scripts/ prefix: If the user provides scripts/foo.py, normalize it to foo.py to prevent the double-directory trap. Or document clearly that the base dir is already scripts/.
-
Support skill-based script references: Allow script to reference a skill-managed script (e.g., "skill:ai-newsletter-youtube-aggregator/scripts/ai-newsletter-aggregator.py"), eliminating the dual-directory drift problem. Currently scripts live in both ~/.hermes/profiles/<name>/scripts/ (for cronjob) and ~/.hermes/profiles/<name>/skills/<name>/scripts/ (for skills) with no sync.
Reproduction
cronjob(action="create", script="scripts/ai-newsletter-aggregator.py", ...)
# resolves to ~/.hermes/profiles/aoife/scripts/scripts/ai-newsletter-aggregator.py
# file does not exist, no error at create time
# cron fires, script silently skipped, agent reports "script not found" in delivery
Problem
When creating a cron job with
action="create"and a relative script path like"scripts/ai-newsletter-aggregator.py", the cronjob tool resolves it by prepending~/.hermes/profiles/<name>/scripts/, resulting in the path:This causes two issues:
1. Silent double-directory trap
The user-provided path
scripts/foo.pybecomesscripts/scripts/foo.pywith no warning. The correct relative path should be justfoo.py, but this is non-obvious from the tool documentation.2. No create-time validation
The cronjob tool accepts any string for
scriptwithout checking the resolved path exists. No warning atcreateorupdatetime. The failure only appears at runtime when the cron fires and the script is silently skipped, with only a late error message in the agent delivery.Impact
Proposed fixes
Validate at create/update time: Check the resolved script path exists before accepting the cron job configuration. Fail or warn if the file is missing.
Strip leading
scripts/prefix: If the user providesscripts/foo.py, normalize it tofoo.pyto prevent the double-directory trap. Or document clearly that the base dir is alreadyscripts/.Support skill-based script references: Allow
scriptto reference a skill-managed script (e.g.,"skill:ai-newsletter-youtube-aggregator/scripts/ai-newsletter-aggregator.py"), eliminating the dual-directory drift problem. Currently scripts live in both~/.hermes/profiles/<name>/scripts/(for cronjob) and~/.hermes/profiles/<name>/skills/<name>/scripts/(for skills) with no sync.Reproduction