superpowers/tests/hermes
Jesse Vincent 76b0f89dec fix(hermes): skip the controller bootstrap for delegate_task children (#2536)
pre_llm_call returned the using-superpowers bootstrap whenever
is_first_turn was true. Hermes computes is_first_turn from an empty
conversation history, and a delegate_task child always starts empty, so
every child's first turn got the same 5.7k-char controller bootstrap as
the parent and had to rely on <SUBAGENT-STOP> to ignore it. Live Hermes
delegations on #2536 show children opening with skill_view / read_file on
Superpowers skills instead of their assigned work.

Hermes builds delegate_task children with platform="subagent"
(tools/delegate_tool.py) and forwards that as the hook's platform
argument, so gate injection on it. parent_session_id is not a safe
signal: Hermes also sets it on the continuation session it creates on
context compression.

Verified against a real Hermes install (hermes-agent 484de065) by running
its plugin discovery and agent.turn_context._collect_pre_llm_call_context
for a parent and a subagent first turn: 5757/5757 chars before, 5757/0
after.

Co-authored-by: Twot <twotnguyen@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
2026-10-22 20:52:29 +00:00
..
__init__.py feat(hermes): Hermes Agent harness support, rebased to a Hermes-only diff 2026-07-23 12:18:13 -07:00
conftest.py fix(hermes): pass each skill's frontmatter description to register_skill 2026-09-26 19:37:44 -07:00
test_bootstrap.py test(hermes): realign suite with the pre_llm_call mechanism; slim docs to the README section 2026-07-23 16:05:54 -07:00
test_plugin.py fix(hermes): skip the controller bootstrap for delegate_task children (#2536) 2026-10-22 20:52:29 +00:00