mirror of
https://github.com/obra/superpowers.git
synced 2026-11-11 09:13:22 +00:00
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 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_bootstrap.py | ||
| test_plugin.py | ||