fix(runner): tell the model its rendered-skills path so it stops guessing - #5904
Conversation
…sing
Live session evidence (2026-08-10): asked about its skills, a model emitted
a fully-formed absolute skills path from pattern memory as its FIRST move —
structurally wrong (one id segment where the mount path has two) — got
ENOENT, then self-corrected by listing its real cwd, costing a failed call
and an approval interruption. The mount guidance names agent-files/ but
nothing named the skills read path.
New skills-read-path appendix states the harness-correct absolute path
(Pi: agents/skills snapshot; others: .{acpAgent}/skills), gated only on
materialized skills.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe sandbox environment now passes harness-specific rendered skill paths to platform guidance. The guidance tells agents to list the resolved directory and not construct its path. Unit tests cover conditional inclusion and existing guidance behavior. ChangesRendered skills path guidance
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
services/runner/tests/unit/platform-guidance.test.ts (1)
56-67: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover the independent skills-path gate.
run()suppliestoolNames: ["commit_revision"]by default. A regression that adds the commit-tool gate toskillsPathwould still pass this test. Add a case withskillsPathandtoolNames: [].Suggested regression test
const withoutSkills = platformGuidanceAppendix(run({})); assert.ok(!withoutSkills?.includes("rendered skill files")); + const withoutCommitTool = platformGuidanceAppendix( + run({ + skillsPath: "/tmp/agenta/mounts/p/s/agents/skills", + toolNames: [], + }), + ); + assert.ok( + withoutCommitTool?.includes("/tmp/agenta/mounts/p/s/agents/skills"), + );
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: dd37c5d1-e838-4a3e-aa3b-a9502710c367
📒 Files selected for processing (3)
services/runner/src/engines/sandbox_agent/environment.tsservices/runner/src/engines/sandbox_agent/platform-guidance.tsservices/runner/tests/unit/platform-guidance.test.ts
Railway Preview Environment
|
Context
In a live session (debugged today), an agent asked about its own skills emitted a fully-formed absolute skills path from pattern memory as its very first tool call. The guess was structurally wrong (one id segment where the real mount path has two), so the read failed with ENOENT; the model then self-corrected by listing its actual working directory, which cost a failed call plus an approval interruption before it found the skill exactly where it had been correctly materialized all along.
The gap: the platform guidance names the durable
agent-files/folder with its real absolute path, but nothing states where the rendered skills live, so the model is left to infer that path and sometimes guesses.Changes
A new
skills-read-pathappendix in the platform guidance states the harness-correct absolute skills directory and says to list it rather than construct paths from memory. The path mirrorsprepareWorkspace's materialization split: Pi reads the immutableagents/skills/<digest>snapshot; other harnesses read.{acpAgent}/skills/<name>. The appendix only appears when the run actually materialized skills.Tests
platform-guidance.test.ts: the path appears when skills are materialized and is absent otherwise. File passes; full runner suite 2117 passed;tsc --noEmitclean.What to QA