hermes-source-patching

Patch bugs in local Hermes Agent source and verify fixes without pytest.

2|Updated Oct 20, 2017
One-click install
npx skills add https://github.com/rbudiharso/dotfiles --skill hermes-source-patching-rbudiharso
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hermes-source-patching
Source: https://github.com/rbudiharso/dotfiles/tree/main/hermes/.hermes/skills/software-development/hermes-source-patching
Command: npx skills add https://github.com/rbudiharso/dotfiles --skill hermes-source-patching-rbudiharso

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When Hermes Agent itself crashes or misbehaves, you need a structured way to diagnose tracebacks, patch the local source tree, and verify the fix even though the release venv has no pytest installed. ## Core Features & Use Cases - Traceback-Driven Patching: Read the error location, search for duplicate bug patterns across the source tree, and apply targeted patches to all occurrences. - Verification Without pytest: Escalating checks using ast.parse for syntax, module import for dependency resolution, and pytest only when a dev venv exists. - Use Case: Hermes prints "RuntimeError: Event loop is closed" on quit from MCP server tasks. Use this Skill to locate the cleanup blocks in tools/mcp_tool.py, wrap t.cancel() in the existing try/except, and verify with syntax and import checks. ## Quick Start Fix the asyncio shutdown traceback Hermes printed on exit by patching the MCP server task cleanup in the local source tree.

Frequently Asked Questions about hermes-source-patching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a Hermes Agent traceback from the local source?▼

Read the traceback to identify the file, line, and function, then read the surrounding source and search for the same error pattern elsewhere. Patch the root cause in all matching locations and verify with syntax and import checks before restarting Hermes.

How do I verify a Python patch without pytest installed?▼

Run ast.parse on the modified file with the venv Python to catch syntax errors, then import the affected module to confirm dependencies resolve. Only run the full pytest suite if a venv with pytest actually exists.

Why does Hermes print 'Event loop is closed' on exit?▼

The event loop closes before MCP server task coroutines finish cleanup, so t.cancel() in finally blocks raises RuntimeError on the closed loop. It is harmless stderr noise; fix it by moving t.cancel() inside the existing try/except block.

Why does patch fail with 'Found N matches' in mcp_tool.py?▼

The file contains near-identical cleanup blocks in _wait_for_reconnect_or_shutdown and _run_keepalive, so the patch target is ambiguous. Add surrounding context lines to disambiguate or use replace_all=true to patch every occurrence.

When do Hermes source patches take effect?▼

Source patches take effect only on the next Hermes process start, not mid-session. After verifying the fix with syntax and import checks, restart Hermes to load the patched code.