Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

fix(runner): the agent doc gives each skill's folder, absolutely

richard-epsilla5e0c216ba20a
diff --git a/runner/server.py b/runner/server.py
index a0caf467..43aacdf3 100644
--- a/runner/server.py
+++ b/runner/server.py
@@ -766,13 +766,18 @@ def _write_agent_doc(cwd: str, backend: str, agent_doc: str | None, skills_meta:
if skills_meta:
lines += ["## Available skills", "",
"These skills are installed in this workspace. When a task matches one, read its "
- "SKILL.md first and follow its instructions and bundled scripts. A skill's own "
- "files sit BESIDE its SKILL.md, so a bare filename in a skill (`test.py`, "
- "`scripts/run.sh`) means that skill's directory, not this workspace's root: run "
- "it by its full path, or change into that directory first.", ""]
+ "SKILL.md first and follow its instructions and bundled scripts. Every path a "
+ "skill mentions (`test.py`, `scripts/run.sh`) is relative to THAT SKILL'S "
+ "FOLDER below, never to this workspace: prefix it with the folder, or cd there "
+ "first. The folder is where its bundled scripts and data already are.", ""]
for s in skills_meta:
d = f" — {s['desc']}" if s.get("desc") else ""
- lines.append(f"- **{s['name']}**{d} (`{s['entry']}`)")
+ # ABSOLUTE, and the directory rather than the file: a skill that says "run test.py"
+ # is then one join away from a command that works, with nothing to infer. The
+ # relative path this replaced left the model to compose a path from two places, and
+ # a weaker one ran the bare filename in the workspace root instead (2026-08-23).
+ folder = os.path.dirname(os.path.join(cwd, s["entry"]))
+ lines.append(f"- **{s['name']}**{d} — files in `{folder}/` (start with `SKILL.md` there)")
lines.append("")
block = "\n".join(lines).rstrip("\n") + "\n" + _AGENTS_END + "\n"
body = ((base + "\n\n") if base else "") + block
diff --git a/runner/tests/test_session_uids.py b/runner/tests/test_session_uids.py
index 07515afa..95530789 100644
--- a/runner/tests/test_session_uids.py
+++ b/runner/tests/test_session_uids.py
@@ -154,5 +154,6 @@ def test_the_agent_doc_says_a_skill_s_files_sit_beside_its_skill_md(tmp_path):
{"path": "test.py", "content": "print('hi')"}]}], "codex")
server._write_agent_doc(str(tmp_path), "codex", "", installed)
doc = (tmp_path / "AGENTS.md").read_text()
- assert "BESIDE its SKILL.md" in doc
- assert "`.harness/skills/test-skill/SKILL.md`" in doc
+ assert "relative to THAT SKILL'S FOLDER" in doc
+ # the folder is absolute and complete: a bare filename in the skill is one join from working
+ assert f"files in `{tmp_path}/.harness/skills/test-skill/`" in doc