From e69b04ea86448be22a7aa726425975806fd7809b Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 3 Sep 2026 13:33:22 -0700 Subject: [PATCH] =?UTF-8?q?simplify(compat):=20system=5Fprompt=20=E2=80=94?= =?UTF-8?q?=20finish=20dropping=20the=20=5Fra()=20`=5Fr`=20parameter=20thr?= =?UTF-8?q?eading=20(3=20call=20sites=20missed=20by=202a957919926)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/system_prompt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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.