Skip to content

fix(cli): preload skills in oneshot mode - #86173

Closed
Vicenteut wants to merge 1 commit into
NousResearch:mainfrom
Vicenteut:fix/preloaded-skill-resolution
Closed

fix(cli): preload skills in oneshot mode#86173
Vicenteut wants to merge 1 commit into
NousResearch:mainfrom
Vicenteut:fix/preloaded-skill-resolution

Conversation

@Vicenteut

Copy link
Copy Markdown

Summary

  • forward -s / --skills through every one-shot CLI dispatch path
  • load requested skills into the one-shot agent before its only model call
  • preserve existing ephemeral prompt content and match chat behavior for missing skills

Scope

  • no gateway, provider, model, or container changes
  • no migrations
  • no deployment changes

Verification

  • pytest -q -p no:cacheprovider tests/hermes_cli/test_oneshot_skills.py tests/hermes_cli/test_tui_resume_flow.py tests/hermes_cli/test_argparse_flag_propagation.py tests/cli/test_cli_preloaded_skills.py — 19 passed
  • ruff check --no-cache hermes_cli/main.py hermes_cli/oneshot.py tests/hermes_cli/test_oneshot_skills.py — passed
  • offline integration against a real nested skill: loaded theclamai-content-intelligence, injected 7,721 prompt characters, no network or model call

@Vicenteut
Vicenteut force-pushed the fix/preloaded-skill-resolution branch from 14fb25f to 0d3b8df Compare August 14, 2026 15:46
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard tool/skills Skills system (list, view, manage) labels Aug 14, 2026
@Enough1122

Copy link
Copy Markdown
Contributor

AI code review — automated review for reference, author can ignore or act on any point.

fix(cli): preload skills in oneshot mode

The plumbing through _run_and_exit_oneshot and the _apply_preloaded_skills helper are straightforward, and the tests cover the forwarding and unknown-skill paths. Observations:

  1. hermes_cli/oneshot.py::_apply_preloaded_skills: agent.preloaded_skills is only set when skills_prompt is truthy. If build_preloaded_skills_prompt ever returns a non-empty loaded_skills list with an empty prompt, the agent records no loaded skills even though the load happened. Keying the bookkeeping off loaded_skills (and only the prompt append off skills_prompt) would keep the two consistent.

  2. The behavior split — warn-and-continue when some skills are unknown, raise ValueError when all are unknown — is reasonable, but it means a typo in a single-skill one-shot invocation fails hard while the same typo next to a valid skill is silently forgiven. For a scripted/one-shot context, a consistent warn-and-continue (matching cli.py's tolerance) may be less surprising.

  3. _normalize_toolsets is reused to parse the skills value. If it applies toolset-specific normalization or validation, unknown-skill input may surface toolset-flavored messages before reaching the clearer build_preloaded_skills_prompt messaging — worth verifying the two vocabularies don't collide.

No blocking issues.

@teknium1

Copy link
Copy Markdown
Contributor

Fixed on main via PR #90389 (salvage of #31591, the earliest submission for this bug, May 24). Thanks for the contribution!

@teknium1 teknium1 closed this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants