Skip to content

Fix /hermes/ask: pin DeepSeek provider + resume live session context - #201

Open
TunaTung wants to merge 2 commits into
luckeyfaraday:mainfrom
TunaTung:fix/oneshot-deepseek-provider
Open

Fix /hermes/ask: pin DeepSeek provider + resume live session context#201
TunaTung wants to merge 2 commits into
luckeyfaraday:mainfrom
TunaTung:fix/oneshot-deepseek-provider

Conversation

@TunaTung

@TunaTung TunaTung commented Aug 1, 2026

Copy link
Copy Markdown

Problem

/hermes/ask hangs until client timeout and never returns an answer, and when it does work the one-shot answers without any conversation context.

  1. Hang: hermes --oneshot defaults to the opencode-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, so subprocess.run blocks until timeout_seconds and the request dies without a response (the orphaned oneshot process can survive for 40+ minutes).
  2. No context: plain one-shots answer from Hermes's static config/memory only — they cannot see the live conversation the caller (e.g. codex) is part of.

Fix

  1. Pin the DeepSeek official provider: ["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).
  2. Resume the live session: resolve the most recently active Hermes session (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. Optional session_id field lets callers pin a session. Resume is read-only — verified no session pollution.

Verified

  • /hermes/ask returns in ~15s with returncode: 0 (before: never returned).
  • codex reverse-ask with context: asked a question answerable only from the live conversation → one-shot answered from it, 26s round trip.

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).
@TunaTung TunaTung changed the title Fix /hermes/ask hanging: pin DeepSeek provider for hermes oneshot Fix /hermes/ask: pin DeepSeek provider + resume live session context Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant