fix(cli): Fix oneshot skills preload - #31591
Closed
GarlicGo wants to merge 1 commit into
Closed
Conversation
GarlicGo
marked this pull request as ready for review
May 24, 2026 17:28
6 tasks
Contributor
|
Thanks for targeting a real current-main gap: both Problems
Suggested changes
Automated hermes-sweeper review. |
GarlicGo
force-pushed
the
codex/fix-oneshot-skills
branch
from
July 21, 2026 08:08
6d5d023 to
2c714c4
Compare
Willhong
added a commit
to Willhong/hermes-agent
that referenced
this pull request
Jul 31, 2026
hermes -z accepted -s/--skills at the parser level but both dispatch sites dropped it before run_oneshot(), so skills were silently discarded — despite oneshot.py's own docstring promising 'preloaded skills = same as a normal chat turn'. - forward args.skills at both -z dispatch sites (main.py) - build the skills prompt via agent.skill_commands .build_preloaded_skills_prompt and inject it through AIAgent's existing ephemeral_system_prompt seam - mirror the interactive CLI contract (cli.py main()): partial-missing skills warn on stderr and continue; only all-missing hard-fails (exit 2, before the agent runs and before the stderr redirect) - reuse cli._parse_skills_argument for flag normalization parity Fixes NousResearch#31548. Builds on the approach from PR NousResearch#31591 (GarlicGo), updated per review: mixed valid/missing degradation and the current _run_agent (response, result) contract. Tests: tests/hermes_cli/test_oneshot_skills.py (12), updated 2 run_oneshot forwarding expectations in test_tui_resume_flow.py; 66 passed across oneshot/tui-flow suites. (cherry picked from commit 0b6bad769794855915a77d3d40a1a986a602edd9)
Contributor
|
Merged via PR #90389 — your commits were cherry-picked onto current main with your authorship preserved in git log, plus a widening fix for a fast-path call site added after your PR. Thanks for the fix, and for being the earliest of five independent submissions! |
This was referenced Aug 20, 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
--skillsthrough both oneshot launch pathsRoot cause
hermes -z/--oneshotaccepted--skillsat the parser layer, but the oneshot launch path did not pass that value intorun_oneshot(), and the oneshot agent construction did not build the preloaded skill prompt.Fixes #31548.
Tests
uv run --with pytest --with pytest-timeout python -m pytest tests/hermes_cli/test_tui_resume_flow.py -qgit diff --check