Skip to content

The agent that grows with you

fix(skills): unloadable-copy note names the tier, not one directory

kshitijk4poor1d85eaa240ef
diff --git a/agent/prompt_builder.py b/agent/prompt_builder.py
index 228d9d48d01..d522e771fc1 100644
--- a/agent/prompt_builder.py
+++ b/agent/prompt_builder.py
@@ -1445,7 +1445,7 @@ def _render_skills_index(
compact_categories: "frozenset[str] | None", available_tools: "set[str] | None", unloadable: "list[str]" = (),
) -> str:
"""Render the ## Skills block; "" when there is nothing to list. *unloadable* names (different skills
- sharing a name AND path in one tier) get a rename note instead of a row skill_view would refuse."""
+ sharing a name AND relative path within one tier — one root or several) get a rename note instead of a row skill_view would refuse."""
if not skills_by_category:
return ""
# Demoted categories collapse to one names-only line. NEVER drop entries — agent-created skills are the
@@ -1458,7 +1458,8 @@ def _render_skills_index(
) if demoted else ""
if unloadable:
hidden_note += (f"\n(A copy of {', '.join(unloadable)} is not listed: it shares both its name and its path "
- "with a different skill in the same skills directory, so skill_view cannot load it — rename one.)")
+ "with a different skill in the same skills directory tier (e.g. another external_dirs entry), "
+ "so skill_view cannot load it — rename one.)")
# Don't name web_search when the session has no web tools (dangling reference).
_basic_tools = "terminal" if available_tools is not None and "web_search" not in available_tools else "web_search or terminal"
index_lines = []
diff --git a/tests/agent/test_org_skill_namespace.py b/tests/agent/test_org_skill_namespace.py
index 39a396c8ab2..0b10bcb0ad7 100644
--- a/tests/agent/test_org_skill_namespace.py
+++ b/tests/agent/test_org_skill_namespace.py
@@ -141,7 +141,7 @@ class TestListingCollisionsAndLabels:
# root-level personal copy (whose only path IS the bare name, so nothing can load it) is called out.
assert "- _org/org-1/k8s-debug: [name collision" in out
assert "- k8s-debug:" not in out
- assert "A copy of k8s-debug is not listed" in out
+ assert "A copy of k8s-debug is not listed" in out and "same skills directory tier" in out
def test_no_collision_flag_when_unique(self, tmp_path, monkeypatch):
skills, pb = self._render(tmp_path, monkeypatch)