You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: build_skills_system_prompt() TypeError with compact_categories on Windows post-upgrade #45473
After upgrading from f222bd2 to 0a7a818 (284 commits) on Windows, the Hermes Gateway email handler crashes with:
TypeError: build_skills_system_prompt() got an unexpected keyword argument "compact_categories"
Reproduction
Run hermes update on Windows (0.16.0 baseline)
Gateway restarts automatically
Email handler processes incoming mail
Crashes on build_skills_system_prompt(compact_categories=...) call
Expected
The parameter compact_categories exists in agent/prompt_builder.py (line 1121), and tests in tests/agent/test_prompt_builder.py exercise it. It should work.
Suspected Cause
Stale .pyc cache after pip upgrade — the old bytecode may not include the compact_categories parameter that was added in a recent commit. pip install --upgrade does not always clear __pycache__.
I can take a look at this one. I’ll first verify whether this is indeed caused by stale bytecode after upgrade, then trace the Windows update/restart path and propose the smallest fix that prevents the gateway from loading an old implementation. I’ll avoid changing prompt-building behavior unless the code path shows that is actually necessary.
Small correction to my previous comment: the missing function name is build_skills_system_prompt in agent/prompt_builder.py. I’ll verify that specific stale-bytecode premise before proposing a fix.
Thanks for the detailed Windows upgrade report. This is already addressed on current main; automated hermes-sweeper review verified both the API contract and update-path mitigation.
agent/prompt_builder.py:1445-1449 accepts compact_categories, and agent/system_prompt.py:314-318 passes that keyword through the live prompt-building path.
hermes_cli/main.py:4469-4494 removes stale __pycache__ directories; the normal git update path invokes it at hermes_cli/main.py:9898-9905 (the ZIP path does so at 6355-6360).
The update mitigation was introduced by c4cf20f56469f49058791388f68d25fe75fe7c79 (fix: clear __pycache__ during update to prevent stale bytecode ImportError (#3819)), which is contained in release tag v2026.3.30.
tests/agent/test_prompt_builder.py:429-475 covers the compact_categories argument directly.
Activity
szzhoujiarui-sketch commentedon Jun 14, 2026
I can take a look at this one. I’ll first verify whether this is indeed caused by stale bytecode after upgrade, then trace the Windows update/restart path and propose the smallest fix that prevents the gateway from loading an old implementation. I’ll avoid changing prompt-building behavior unless the code path shows that is actually necessary.
szzhoujiarui-sketch commentedon Jun 14, 2026
Small correction to my previous comment: the missing function name is
build_skills_system_promptinagent/prompt_builder.py. I’ll verify that specific stale-bytecode premise before proposing a fix.teknium1 commentedon Jul 14, 2026
Thanks for the detailed Windows upgrade report. This is already addressed on current main; automated hermes-sweeper review verified both the API contract and update-path mitigation.
agent/prompt_builder.py:1445-1449acceptscompact_categories, andagent/system_prompt.py:314-318passes that keyword through the live prompt-building path.hermes_cli/main.py:4469-4494removes stale__pycache__directories; the normal git update path invokes it athermes_cli/main.py:9898-9905(the ZIP path does so at6355-6360).c4cf20f56469f49058791388f68d25fe75fe7c79(fix: clear __pycache__ during update to prevent stale bytecode ImportError (#3819)), which is contained in release tagv2026.3.30.tests/agent/test_prompt_builder.py:429-475covers thecompact_categoriesargument directly.