Fix /hermes/ask: pin DeepSeek provider + resume live session context - #201
Open
TunaTung wants to merge 2 commits into
Open
Fix /hermes/ask: pin DeepSeek provider + resume live session context#201TunaTung wants to merge 2 commits into
TunaTung wants to merge 2 commits into
Conversation
Hermes oneshot defaults to the opencode-go (Zen free tier) provider, which hits IP rate limits under daily use. When limited, the oneshot process sits in retry backoff indefinitely and /hermes/ask never returns (request hangs until client timeout). Pin --model deepseek-v4-flash --provider deepseek for the oneshot call. Note arg order: the prompt must immediately follow --oneshot (hermes CLI parses -z as a value-taking option).
One-shot answers previously ran without conversation context. Now the ask flow resolves the most recently active Hermes session (from state.db, ended_at IS NULL) and passes --resume <id>, so codex reverse-asks carry the live conversation. Optional session_id field on /hermes/ask lets callers pin a specific session. Verified: codex asked 'What tool were we debugging for result-return issues today?' and the resumed one-shot answered from the live conversation (15s round trip, read-only resume, no session pollution).
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.
Problem
/hermes/askhangs until client timeout and never returns an answer, and when it does work the one-shot answers without any conversation context.hermes --oneshotdefaults to theopencode-go(OpenCode Zen free tier) provider from the host config. Under daily usage the Zen IP rate limit kicks in; the oneshot process then sits in exponential-retry backoff (its own logs are silenced) and the subprocess never exits, sosubprocess.runblocks untiltimeout_secondsand the request dies without a response (the orphaned oneshot process can survive for 40+ minutes).Fix
["hermes", "--oneshot", prompt, "--model", "deepseek-v4-flash", "--provider", "deepseek"]. Arg order matters: the prompt must immediately follow--oneshot(the CLI parses it as a value-taking option).HERMES_HOME/runtime-data/state.db,ended_at IS NULL,archived = 0) and pass--resume <id>so the one-shot answers with real conversation context. Optionalsession_idfield lets callers pin a session. Resume is read-only — verified no session pollution.Verified
/hermes/askreturns in ~15s withreturncode: 0(before: never returned).