summaryrefslogtreecommitdiff
path: root/.hermes-plugin/__init__.py
diff options
context:
space:
mode:
authorDrew Ritter <drew@primeradiant.com>2026-11-02 13:31:53 -0800
committerDrew Ritter <drew@primeradiant.com>2026-11-02 13:31:53 -0800
commit38fd8323e43f4b13e8bdc9d62b85ca1ed524a3f8 (patch)
tree335eecee026317ef5699bf6f0a0da7104cffed7b /.hermes-plugin/__init__.py
parent80b085cfb36c0dfe5f6740a3a4764d16429a8228 (diff)
parent587f04636d67a32d2edf65550085cdf2d70260a4 (diff)
Merge dev into the OpenCode compaction bootstrap fixfix/2391-opencode-compaction-bootstrap
Drew requested resolution of the merge conflict in obra/superpowers PR #2601. Merge current dev into the existing PR branch without rewriting its history. Resolve the V2 bootstrap hunk by keeping #2601's shared handler registered on context, compaction, and generate, and incorporating #2600's exact BOOTSTRAP_MARKER prefix guard. This preserves injection for prompts that merely mention EXTREMELY_IMPORTANT while preventing duplicate bootstrap parts. All other dev changes merge without manual edits. Validation: bash tests/opencode/run-tests.sh passed all five suites, including hook registration, tag-mention regression coverage, child-session suppression, caching, and skill registration. git diff --cached --check passed and the index contains no unresolved paths. Live OpenCode integration sessions were not rerun for this conflict-only repair. Tracking: PRI-3674
Diffstat (limited to '.hermes-plugin/__init__.py')
-rw-r--r--.hermes-plugin/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/.hermes-plugin/__init__.py b/.hermes-plugin/__init__.py
index 7d4e1f5..3c5a207 100644
--- a/.hermes-plugin/__init__.py
+++ b/.hermes-plugin/__init__.py
@@ -108,7 +108,9 @@ def register(ctx):
# pre_llm_call returning {"context": ...} is the documented injection path
# (on_session_start return values are ignored, and ctx.inject_message
# refuses from that hook — verified empirically 2026-07-23). The context is
- # appended to the first turn's user message.
+ # appended to the first turn's user message. delegate_task children run
+ # with platform="subagent" and an empty history, so every child's first
+ # turn would otherwise get the controller bootstrap too.
def pre_llm_call(
session_id=None,
user_message=None,
@@ -118,7 +120,7 @@ def register(ctx):
platform=None,
**kwargs,
):
- if is_first_turn:
+ if is_first_turn and platform != "subagent":
return {"context": bootstrap}
return None