Description
Hermes Agent system prompt reports Host: Windows (10) on Windows 11 machines, misleading the LLM about the host OS.
Root Cause
agent/prompt_builder.py::build_environment_hints() uses platform.release() which returns 10.0 for BOTH Windows 10 and Windows 11 — the kernel version is identical between them.
# Current behavior: platform.release() returns '10.0' for both
# Result: prompt says "Windows (10)" even on Windows 11
Fix
Use sys.getwindowsversion().build to distinguish:
- Build >= 22000 → Windows 11 (or later)
- Build < 22000 → Windows 10
import sys
if sys.platform == "win32":
build = sys.getwindowsversion().build
win_version = "11" if build >= 22000 else "10"
# f"Windows ({win_version})"
Environment
- OS: Windows 11 家庭中文版 (Build 26200)
- Hermes version: 0.17.0-cn.1
platform.release(): 10.0
sys.getwindowsversion().build: 26200
Expected
Host: Windows (11)
Actual
Host: Windows (10)
Description
Hermes Agent system prompt reports
Host: Windows (10)on Windows 11 machines, misleading the LLM about the host OS.Root Cause
agent/prompt_builder.py::build_environment_hints()usesplatform.release()which returns10.0for BOTH Windows 10 and Windows 11 — the kernel version is identical between them.Fix
Use
sys.getwindowsversion().buildto distinguish:Environment
platform.release():10.0sys.getwindowsversion().build:26200Expected
Host: Windows (11)Actual
Host: Windows (10)