hermes - 💡(How to fix) Fix System prompt budget: full skills index adds ~14KB and output format guidance is duplicated

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Hermes' default system prompt can become ~30KB before any conversation content, mostly from the full skills index plus persistent memory/profile. This is still functional, but it creates avoidable pressure for upstream adapters/proxies with smaller prompt/panel-state budgets. In one real CLI session, a downstream WindsurfAPI/Cascade adapter warned about a 26KB system prompt and had to compact the tool preamble separately.

There is also an apparent duplicate injection of the Chinese local file/media output-format guidance: # 输出格式规范 appears twice in the same system prompt.

Root Cause

  • Some clients/proxies/adapters have practical prompt/panel-state limits well below the model context window.
  • Tool schemas can be compacted by adapters, but the Hermes system prompt itself is not compacted by that downstream tool-preamble budget.
  • A full skills index in every new session is useful, but it is currently the largest single block (~14.5KB in this setup).
  • Duplicate output-format guidance is pure overhead and can be removed without losing functionality.

Code Example

C:/Users/zhangqianfeng/.hermes/sessions/session_20260529_221125_61b78f.json

---

system_prompt chars: 26236
system_prompt bytes: 30638
tools count in Hermes session: 37
tools JSON bytes: 48948

---

14647 B  <available_skills>
 3469 B  MEMORY (your personal notes)
 2583 B  USER PROFILE
 2693 B  preamble / base agent guidance
 1480 B  ## Skills (mandatory)
 ~2500 B output format guidance duplicated once

---

# 输出格式规范
...
# 输出格式规范
...

---

Probe[ywohg6]: model=claude-4.5-haiku stream=true rf=none tools=28 reasoning=none ctypes=[string] turns=6
Probe[ywohg6] msg[0] role=system len=26236 hash=c7cd26192bb2605c
Probe[ywohg6]: large system prompt 26KB — heavy clients (OpenClaw / Cline / opencode) may hit upstream panel-state retries above ~30KB
Probe[ywohg6]: toolPreamble 45KB exceeds soft cap 23KB; using schema-compact tier (9KB, 28 tools)

---

Chat: model=claude-4.5-haiku flow=cascade stream=true attempt=1 ... turns=6 chars=28754
Cascade started
Cascade done
RAW_BUFFERClick to expand / collapse

Summary

Hermes' default system prompt can become ~30KB before any conversation content, mostly from the full skills index plus persistent memory/profile. This is still functional, but it creates avoidable pressure for upstream adapters/proxies with smaller prompt/panel-state budgets. In one real CLI session, a downstream WindsurfAPI/Cascade adapter warned about a 26KB system prompt and had to compact the tool preamble separately.

There is also an apparent duplicate injection of the Chinese local file/media output-format guidance: # 输出格式规范 appears twice in the same system prompt.

Observed evidence

Session file:

C:/Users/zhangqianfeng/.hermes/sessions/session_20260529_221125_61b78f.json

Measured from the saved session JSON:

system_prompt chars: 26236
system_prompt bytes: 30638
tools count in Hermes session: 37
tools JSON bytes: 48948

Major system prompt sections:

14647 B  <available_skills>
 3469 B  MEMORY (your personal notes)
 2583 B  USER PROFILE
 2693 B  preamble / base agent guidance
 1480 B  ## Skills (mandatory)
 ~2500 B output format guidance duplicated once

The same system prompt contains:

# 输出格式规范
...
# 输出格式规范
...

The downstream adapter log from the same request:

Probe[ywohg6]: model=claude-4.5-haiku stream=true rf=none tools=28 reasoning=none ctypes=[string] turns=6
Probe[ywohg6] msg[0] role=system len=26236 hash=c7cd26192bb2605c
Probe[ywohg6]: large system prompt 26KB — heavy clients (OpenClaw / Cline / opencode) may hit upstream panel-state retries above ~30KB
Probe[ywohg6]: toolPreamble 45KB exceeds soft cap 23KB; using schema-compact tier (9KB, 28 tools)

The request did complete successfully, so this is not a hard failure:

Chat: model=claude-4.5-haiku flow=cascade stream=true attempt=1 ... turns=6 chars=28754
Cascade started
Cascade done

Why this matters

  • Some clients/proxies/adapters have practical prompt/panel-state limits well below the model context window.
  • Tool schemas can be compacted by adapters, but the Hermes system prompt itself is not compacted by that downstream tool-preamble budget.
  • A full skills index in every new session is useful, but it is currently the largest single block (~14.5KB in this setup).
  • Duplicate output-format guidance is pure overhead and can be removed without losing functionality.

Expected behavior

  1. The system prompt should not contain duplicate output-format/file-link guidance.
  2. The skills index should have a more compact mode or budget-aware rendering, especially when many skills are installed.
  3. Hermes should optionally log or expose a prompt-size breakdown so users can distinguish:
    • system prompt size
    • skills index size
    • memory/profile size
    • tool schema size

Possible fixes

Low-risk:

  • Deduplicate the output-format guidance injection path so # 输出格式规范 appears only once.
  • Add a diagnostic prompt-size breakdown in verbose/debug mode.

Medium-risk / design:

  • Add a compact skills-index mode, for example:
    • category + skill name only by default, descriptions loaded via skills_list / skill_view
    • truncate descriptions after N chars
    • show only skills matching enabled toolsets/platform plus a user-configurable allowlist
    • support a skills.prompt_index_mode: full | compact | names_only config option

Environment

  • Hermes Agent local editable install from source
  • Platform: Windows host, Git Bash/MSYS terminal backend
  • Session source: CLI
  • Downstream OpenAI-compatible route included WindsurfAPI/Cascade

Notes

This issue is about default prompt budget hygiene, not about context-window exhaustion. The actual request succeeded; the concern is avoidable fixed prompt overhead and duplicate injected instructions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  1. The system prompt should not contain duplicate output-format/file-link guidance.
  2. The skills index should have a more compact mode or budget-aware rendering, especially when many skills are installed.
  3. Hermes should optionally log or expose a prompt-size breakdown so users can distinguish:
    • system prompt size
    • skills index size
    • memory/profile size
    • tool schema size

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix System prompt budget: full skills index adds ~14KB and output format guidance is duplicated