diff --git a/agent/system_prompt.py b/agent/system_prompt.py index 6b1229fa29..3c47a66340 100644 --- a/agent/system_prompt.py +++ b/agent/system_prompt.py @@ -595,14 +595,14 @@ def build_system_prompt_parts(agent: Any, system_message: Optional[str] = None) _cc_len = getattr(getattr(agent, "context_compressor", None), "context_length", None) _ctx_len = _cc_len if isinstance(_cc_len, int) and _cc_len > 0 else None # ── Stable tier ──────────────────────────────────────────────── - stable_parts, _soul_loaded = _identity_parts(agent, _r, _ctx_len) + stable_parts, _soul_loaded = _identity_parts(agent, _ctx_len) # The skill_view() pointer dangles without skill tools OR without the # hermes-agent skill installed, so the variant is chosen after the skills # index is built; this slot holds its position. _help_guidance_slot = len(stable_parts) stable_parts.append(HERMES_AGENT_HELP_GUIDANCE_NO_SKILLS) stable_parts.extend(_guidance_parts(agent)) - skills_prompt = _skills_prompt(agent, _r) + skills_prompt = _skills_prompt(agent) # Skill-pointer variant requires BOTH skill_view AND the hermes-agent skill # in the rendered index (pure string check — inherits the index's stability). if "skill_view" in (agent.valid_tool_names or set()) and "- hermes-agent:" in skills_prompt: @@ -623,7 +623,7 @@ def build_system_prompt_parts(agent: Any, system_message: Optional[str] = None) # ephemeral_system_prompt is injected at API-call time only, never cached. if system_message is not None: context_parts.append(system_message) - context_parts.extend(_context_files_part(agent, _r, _ctx_len, _soul_loaded)) + context_parts.extend(_context_files_part(agent, _ctx_len, _soul_loaded)) # ── Volatile tier (most likely to differ on a rebuild; kept last so the stable prefix stays reusable) ── # Skills are runtime-mutable, so the index leads the volatile band: on a longest-prefix # backend an unchanged index stays inside the reused prefix; a changed one re-prefills from here.