封面

System prompt reports Windows (10) on Windows 11 hosts

写作时间:2026-07-23 15:44:37
# 协作
# 开源
# Hermes

Description

Hermes Agent system prompt reports on Windows 11 machines, misleading the LLM about the host OS.Host: Windows (10)

Root Cause

agent/prompt_builder.py::build_environment_hints() uses which returns for BOTH Windows 10 and Windows 11 — the kernel version is identical between them.platform.release()10.0

# Current behavior: platform.release() returns '10.0' for both
# Result: prompt says "Windows (10)" even on Windows 11

Fix

Use to distinguish:sys.getwindowsversion().build

  • 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)