#7470·hive

[Bug]: On Windows the skills catalog read rule terminal_exec("cat <location>") fails (backslash location under Git Bash)

Author: MediumatorCreated Sep 19, 2026Updated Sep 20, 2026

Describe the Bug

On Windows, a queen cannot read a skill by following the skills catalog's own rule.

framework/skills/catalog.py tells the model to read a skill with terminal_exec("cat <location>") (header lines 29-33 and 48-52), and renders <location> from skill.location (line 155), which is a native Windows path with backslashes. terminal_exec routes every command through Git Bash on Windows (tools/src/terminal_tools/exec.py:165-179, common/limits.py:140-159), where an unquoted backslash is an escape character. Applied verbatim, the rule fails:

cat C:\AI\aden-hive\core\framework\skills\_default_skills\pdf\SKILL.md
cat: 'C:AIaden-hivecoreframeworkskills_default_skillspdfSKILL.md': No such file or directory   (exit 1)

We see exactly this in real queen sessions (Qwen3.6-35B-A3B served locally): the model emits cat C:\...\SKILL.md unquoted, gets exit 1, and the skill body never reaches the context.

To Reproduce

On Windows with Git for Windows installed, from core/:

python
from fastmcp import FastMCP
from terminal_tools.exec import register_exec_tools
from framework.skills.catalog import SkillCatalog
from framework.skills.parser import ParsedSkill

loc = r"C:\AI\aden-hive\core\framework\skills\_default_skills\pdf\SKILL.md"
prompt = SkillCatalog([ParsedSkill(name="pdf", description="d", location=loc,
                                   base_dir=loc.rsplit("\\", 1)[0], source_scope="framework", body="b")]).to_prompt()
location = prompt.rsplit("<available_skills>", 1)[1].split("<location>", 1)[1].split("</location>", 1)[0]

mcp = FastMCP("repro"); register_exec_tools(mcp)
terminal_exec = mcp._tool_manager._tools["terminal_exec"].fn
print(terminal_exec(command=f"cat {location}")["exit_code"])   # 1

Double-quoted, single-quoted and forward-slash forms of the same path all read the file (6 of 6 runs over 2 skills); only the form the catalog prescribes fails (2 of 2).

Expected Behavior

terminal_exec("cat <location>"), as written in the catalog header, reads the skill on every platform the terminal tools support.

Proposed fix (tested locally, not a PR)

Render the location with forward slashes, which Git Bash, PowerShell and Python all accept on Windows, and which is a no-op on POSIX:

diff
--- a/core/framework/skills/catalog.py
+++ b/core/framework/skills/catalog.py
@@ import logging
+from pathlib import Path
 from xml.sax.saxutils import escape
@@ def _render_xml(cls, skills, *, compact):
-            lines.append(f"    <location>{escape(skill.location)}</location>")
+            lines.append(f"    <location>{escape(Path(skill.location).as_posix())}</location>")

With two new tests (location rendered with /, and the catalog rule read end to end through terminal_exec): both fail before the change for the reason above and pass after it. The existing skill and route suites (tests/test_skill*.py and tests/test_routes_skills.py, 15 files) give 235 passed / 2 skipped both before and after.

Environment

  • OS: Windows 11 (Git for Windows bash selected by _windows_shell_spec)
  • Python: 3.11 (project venv)
  • aden-hive: 6193aea7 (current main at the time of writing)

Additional Context

Related, same subsystem: the queen skill listing reports tombstoned skills as enabled. _effective_enabled in server/routes_skills.py says it "mirrors SkillsManager._apply_overrides so the UI's enabled column matches what the queen actually sees", but _apply_overrides first drops names in deleted_ui_skills and _effective_enabled does not. After a queen skill is deleted via DELETE /api/queen/{id}/skills/{name} (which tombstones the name), any SKILL.md later placed under that name without going through upsert stays out of the prompt catalog while GET /api/queen/{id}/skills lists it with enabled: true. We lost several debugging runs to this. A two-line guard fixes it and a test reproducing the mismatch goes red→green:

diff
     # master switch.
+    if queen_store is not None and skill.name in queen_store.deleted_ui_skills:
+        return False
     if queen_store is not None:

For reference, the Agent Skills integration guide recommends activating skills with the agent's file-read tool (https://agentskills.io/integrate-skills), and the skill-content compaction protection (is_skill_content, tool_result_handler.py:442-461) currently applies only to view_file, not to the terminal_exec cat read the catalog prescribes.

Full patch with both tests available on request.