fix(cron): add --profile flag to all cron subcommands - #45350
Closed
EdderTalmor wants to merge 3 commits into
Closed
EdderTalmor wants to merge 3 commits into
EdderTalmor wants to merge 3 commits into
Conversation
added 3 commits
June 12, 2026 09:15
- tui_gateway/slash_worker.py: Set HERMES_SLASH_WORKER=1 for non-interactive subprocess - cli.py: Auto-approve destructive slash commands when HERMES_SLASH_WORKER=1 - hermes_cli/web_server.py: Add gateway config cache (30s TTL) and status response cache (5s TTL) - web/src/hooks/useSidebarStatus.ts: Reduce polling from 10s to 30s - web/src/pages/SessionsPage.tsx: Reduce polling from 5s to 15s, remove duplicate status fetch - tests/hermes_cli/test_destructive_slash_confirm_gate.py: Add test coverage for slash worker auto-approval - hermes_cli/web_server.py: Bypass caches during pytest runs (PYTEST_CURRENT_TEST)
When Copilot ACP is run with --context long_context, the model emits
Anthropic/Claude native <tool_use> XML tags instead of Hermes'
expected format. This commit adds regex parsing for both self-closing
<tool_use name=... arguments=... id=... /> and opening/closing
<tool_use>{JSON}</tool_use> formats.
Fixes NousResearch#45139
Allow operating on cron jobs in any profile via --profile flag on each cron subcommand (list, create, edit, pause, resume, run, remove, status, tick). Previously, only the global --profile/-p flag could switch the profile context, which affected all subsequent commands. Now users can manage cron jobs in specific profiles without changing the global context. Fixes NousResearch#45335 where 'hermes cron edit <job_id> --profile <name>' returned 'Job not found' because the global --profile flag changed the CLI context instead of targeting a specific profile's cron directory. The --profile flag on subcommands overrides the global --profile for that command only, similar to how the dashboard API's _call_cron_for_profile works.
tonydwb
approved these changes
Jun 13, 2026
tonydwb
left a comment
There was a problem hiding this comment.
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
7 tasks
Collaborator
|
Thanks for the cron-profile work. This is an automated hermes-sweeper review; the requested behavior is already provided by current
The PR's new parser-level |
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
--profileflag to all cron subcommands (list, create, edit, pause, resume, run, remove, status, tick) to allow operating on cron jobs in any profile without changing the global CLI context.Problem
Previously, users could only use the global
--profile/-pflag which changes the entire CLI context (HERMES_HOME). This caused issues wherehermes cron edit 506bdd39a6c2 --profile tradingwould look for the job in thetradingprofile's cron directory instead of the current profile, resulting in "Job not found" errors.Solution
Add a
--profileargument to each cron subcommand that temporarily sets HERMES_HOME for that command only, using the same pattern as the dashboard API's_call_cron_for_profilefunction.Changes
hermes_cli/subcommands/cron.py: Added--profileargument to all cron subcommandshermes_cli/cron.py:_cron_profile_context()context manager to temporarily switch HERMES_HOMEcron_command()to wrap subcommand execution in profile contexthermes_constants.set_hermes_home_override()for context-local overrideTesting
hermes cron list --profile <name>hermes cron create ... --profile <name>hermes cron edit <job_id> --name "New Name" --profile <name>hermes cron pause/resume/run/remove <job_id> --profile <name>hermes cron status/tick --profile <name>--profilestill works and subcommand--profiletakes precedenceFixes
Fixes #45335