fix(cli): pass conversation_history in quiet mode with --resume

hermes chat -q 'msg' --resume SESSION_ID loaded the session history
but never passed it to run_conversation(), so the model responded
without prior context. The interactive mode already does this correctly.

Based on work by christopher-kapic in PR #2081. Fixes #2106.
This commit is contained in:
christopher-kapic
2026-03-21 12:51:34 -07:00
committed by Teknium
parent 1f1fa71d0c
commit 97108db038

5
cli.py
View File

@@ -7267,7 +7267,10 @@ def main(
route_label=turn_route["label"],
):
cli.agent.quiet_mode = True
result = cli.agent.run_conversation(query)
result = cli.agent.run_conversation(
user_message=query,
conversation_history=cli.conversation_history,
)
response = result.get("final_response", "") if isinstance(result, dict) else str(result)
if response:
print(response)