Skip to content

fix(cli): honor root-level prefill_messages_file from config.yaml#9655

Closed
flobo3 wants to merge 1 commit into
NousResearch:mainfrom
flobo3:fix/cli-prefill-config
Closed

fix(cli): honor root-level prefill_messages_file from config.yaml#9655
flobo3 wants to merge 1 commit into
NousResearch:mainfrom
flobo3:fix/cli-prefill-config

Conversation

@flobo3

@flobo3 flobo3 commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

CLI silently ignores root-level prefill_messages_file from config.yaml, even though the canonical config schema and gateway/cron loaders use it at the root level.

Problem

The config schema (hermes_cli/config.py:616) defines prefill_messages_file at the config root. Gateway (gateway/run.py:1084) and cron (cron/scheduler.py:662) both read it from there. But the CLI (cli.py:1740) only checks agent.prefill_messages_file — a root-level key is silently dropped.

A user with a valid config.yaml loses few-shot prefill behavior in the CLI with no error or warning.

Fix

Mirror root-level prefill_messages_file into agent.prefill_messages_file during load_cli_config(), same fallback pattern already used for root-level max_turns (lines 375-382).

Only applies when the nested key is not already set, so existing agent.prefill_messages_file configs are unaffected.

Closes #9635

@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 area/config Config system, migrations, profiles labels Apr 26, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related: Competing PR #9872 also addresses root-level prefill_messages_file. Both close #9635.

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Superseded by #38760, which merged the broader fix: top-level prefill_messages_file is now canonical across cli/gateway/cron with agent.prefill_messages_file retained as a legacy fallback. Closing as completed since the underlying issue (#9635) is now fixed on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI ignores root-level prefill_messages_file from config.yaml

3 participants