fix(oneshot): inject --skills content into one-shot -z runs (#71759) - #71781
Closed
JonthanaHanh wants to merge 2 commits into
Closed
JonthanaHanh wants to merge 2 commits into
JonthanaHanh wants to merge 2 commits into
Conversation
For finite one-shot jobs (repeat.times=1), mark_job_run removes the job from the store when completed >= times. The subsequent get_job() in _execute_job_now returns None, causing execution_success=False even though the job ran end-to-end and delivered its output. Handle the None case: if run_one_job returned True and the job no longer exists in the store, treat it as successful completion rather than failure. Fixes NousResearch#71760
…arch#71759) The --skills flag was parsed but never passed to the oneshot path. Skills loaded via build_preloaded_skills_prompt were silently dropped in -z mode. Fix: pass skills through _run_and_exit_oneshot -> run_oneshot -> _run_agent, load skill content via build_preloaded_skills_prompt, and inject into ephemeral_system_prompt. Fixes NousResearch#71759
Contributor
Duplicate of #31591: both forward |
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
Fixes #71759 —
hermes --skills <name> -z "<prompt>"runs the prompt but the named skill's content never reaches the model.Root Cause
The
--skillsflag is parsed by the CLI argument parser but never passed through the oneshot execution path. The chain_run_and_exit_oneshot->run_oneshot->_run_agenthad noskillsparameter, so skill content was silently dropped.Fix
skillsparameter to_run_and_exit_oneshot,run_oneshot, and_run_agentskillsfrom the two callers inmain.py_run_agent, load skill content viabuild_preloaded_skills_promptand inject intoephemeral_system_promptChanges
hermes_cli/main.py: Passskillsto_run_and_exit_oneshot(2 call sites)hermes_cli/oneshot.py: Add_parse_skills_for_oneshothelper, addskillsparam throughout the chain, load and inject skill contentTest Results