fix(P1+P2): marker names skill_view(name='X') + DEDUP rule for repeated [SKILL_PRUNED] markers
Surgical reapply of the marker-alignment and dedup-guidance halves of PR #44166 commits 52341f6ca3 / 3d8a31432d / ae07412e4b onto current main: - the [SKILL_PRUNED: ...] marker embeds the exact reload call skill_view(name='<skill>') so the model can act without guessing - SKILLS_GUIDANCE Skill Safety Rule gains rule 4 (DEDUP): after one reload, remaining markers for the same skill are historical artifacts Fixes #32106 (part).
This commit is contained in:
committed by
Teknium
parent
5faef80a43
commit
6816f2f02c
@@ -894,7 +894,7 @@ def _summarize_tool_result_unguarded(tool_name: str, tool_args: str, tool_conten
|
||||
if tool_name == "skill_view":
|
||||
name = args.get("name", "?")
|
||||
if content_len > 5000:
|
||||
return f"[skill_view] name={name} ({content_len:,} chars) [SKILL_PRUNED: content lost in compression; reload with skill_view before relying on it]"
|
||||
return f"[skill_view] name={name} ({content_len:,} chars) [SKILL_PRUNED: content lost in compression; reload with skill_view(name='{name}')]"
|
||||
return f"[skill_view] name={name} ({content_len:,} chars)"
|
||||
|
||||
if tool_name in {"skills_list", "skill_manage"}:
|
||||
|
||||
@@ -197,7 +197,8 @@ SKILLS_GUIDANCE = (
|
||||
"## Skill Safety Rule\n"
|
||||
"1. **UNAVAILABLE** — If a skill placeholder contains `[SKILL_PRUNED]`, the skill content was lost in compression and is inaccessible.\n"
|
||||
"2. **RELOAD** — Before performing any action that depends on a skill, re-check its content with `skill_view(name='...')` if it shows `[SKILL_PRUNED]`.\n"
|
||||
"3. **WAIT** — If a skill is loading or was just pruned, wait for the reload confirmation before proceeding."
|
||||
"3. **WAIT** — If a skill is loading or was just pruned, wait for the reload confirmation before proceeding.\n"
|
||||
"4. **DEDUP** — After reloading a pruned skill, **ignore any remaining `[SKILL_PRUNED]` markers for that same skill** — they are historical artifacts from previous compactions and do not need further action."
|
||||
)
|
||||
|
||||
KANBAN_GUIDANCE = (
|
||||
|
||||
Reference in New Issue
Block a user