Skip to content

fix(sandbox): give every harness the built-in visual-aspect-analyzer - #3535

Merged
yannickmonney merged 4 commits into
mainfrom
fix/built-in-skills-every-harness
Sep 27, 2026
Merged

yannickmonney merged 4 commits into
mainfrom
fix/built-in-skills-every-harness

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The runtime image bakes the built-in visual-aspect-analyzer under /opt/agents/skills, but the session entrypoint linked it only into Claude Code's user skill directory (~/.claude/skills). OpenCode happens to read that directory too. Codex, Gemini CLI, Qwen Code, Pi, OpenClaw and Cursor read ~/.agents/skills, and Hermes reads $HERMES_HOME/skills, so none of them ever listed the skill.

The repository-over-bake rule was also already broken on main. The per-turn reconcile that removed the baked link when the workspace repository shipped a skill of the same name went away in #2857. Claude Code ranks user skills above project skills, so on main it listed the baked copy over the repository's own.

Change

  • runnerd owns the links (services/sandbox-runtime/daemon/src/baked-skills.ts). The entrypoint no longer does it. runnerd links every baked skill into .claude/skills, .agents/skills and .hermes/skills under the session HOME. It does this at boot and again before every exec (ExecManager's new beforeSpawn hook).
  • Repository first: while /agent/workspace/.claude/skills/<name>/SKILL.md exists, runnerd withdraws the baked <name> link from .claude/skills under HOME. The same rule applies to .agents/skills. A withdrawn link comes back once the repository drops its copy. Because the check runs before every exec, a repository cloned during one turn decides the next one.
  • Only runnerd's own links are touched. A directory or a live link someone else put at a link's place is kept, and a dangling link is replaced. A directory that cannot be reconciled is logged and skipped, and the other directories are still handled. The reconcile never fails an exec.
  • Each directory was checked against the CLI the Dockerfile pins: Claude Code 2.1.283, Codex 0.142.5, Gemini CLI 0.49.0, Qwen Code 0.23.3, Pi 0.80.3, OpenClaw 2026.6.11, OpenCode 1.17.3 and Hermes 0.18.0. Cursor runs only on bring-your-own credentials, so it was checked against its source only.
  • README.md → Built-in skills documents the guarantee: which directory each harness reads, and which copy each harness lists beside a repository skill of the same name.
  • User docs (platform/agents/harnesses, EN/DE/FR): every runtime finds the built-in skill without anyone equipping it, and a repository copy of the same name takes its place.
  • Manual layer: box TASK-F35 (a live model, run on a non-Claude harness and on Claude Code), its pin, and an automation.md row.

Repository copy vs. baked copy

With a same-named skill in the workspace's .claude/skills and .agents/skills:

Harness This PR main
Claude Code the repository's copy the baked copy
Codex, Gemini CLI, Qwen Code, Pi, OpenClaw the repository's copy the repository's copy (they never saw the bake)
OpenCode the repository's copy either copy: its loader keeps whichever finishes loading last
Hermes the baked copy: it reads no project-level skills no copy

Verification

  • daemon/src/baked-skills.test.ts (11 cases) runs the real reconcile against temporary roots. It covers:

    • links in all three directories
    • a second run is a no-op
    • withdrawal beside a repository copy, and only in the matching directory
    • a repository directory without a SKILL.md withdraws nothing
    • the link is restored once the repository drops its copy
    • someone's own skill is kept
    • a dangling link is replaced
    • one broken directory does not stop the others
    • an empty or missing bake creates nothing

    exec-manager.test.ts checks that the hook runs before each child spawns. Both fail against main's daemon: the module is missing, and the hook never runs.

  • tests/integration/container-sandbox-runtime-test.ts, section "built-in skills reach every harness" runs in CI's "Validate images" job. It checks:

    • every registry harness has a table row
    • every link exists
    • every managed harness's managed-model-opus golden exec, run through runnerd's /execs as a platform turn is, against a request-recording stub, names the skill in its first model request
    • with a repository copy present, the links are withdrawn (Hermes keeps its link), and each harness lists the copy in the table
    • the links come back once the repository copy is removed
  • Local runs:

    • The full test built the real image from this branch: 87 passed, 0 failed.
    • The same image with main's entrypoint and runnerd: 14 failed. The failures: the .agents/.hermes links are missing, six harnesses do not list the skill, Claude Code lists the baked copy beside the repository's, and the withdraw/restore checks fail.
  • Other checks:

    • oxlint --type-aware on every changed TS file
    • tsc --noEmit for the daemon and the platform
    • the daemon bun test
    • the docs vitest suite: 34 files, 166 tests
    • bun run lint:manual
    • check-guide.ts on tasks.md
    • opengrep and oxfmt through the pre-commit hook
  • Locally, two daemon tests fail the same way on main: the file-ops stalled-URL deadline and the main.test.ts partial exec body. They are macOS-environment failures.

Open

  • When a repository ships the skill in only one of the two directories, a harness that does not read that directory keeps the baked copy (for example, Claude Code does not read .agents/skills). OpenCode reads both directories, so in that case it may still list either copy. The README says so.
  • The existing "entrypoint creates every harness state root" guard in container-sandbox-runtime-test.ts checks nothing. It reads env.base at the top of harness.yml, but the key lives under exec.env. This PR leaves that guard alone.

Closes #2790

The session entrypoint linked the image-baked skills (/opt/agents/skills)
into Claude Code's user skill directory only. OpenCode reads that directory
too, but Codex, Gemini CLI, Qwen Code, Pi, OpenClaw and Cursor read
~/.agents/skills and Hermes reads $HERMES_HOME/skills, so none of them ever
listed the built-in visual-aspect-analyzer.

link_baked_skills now links each baked skill into .claude/skills,
.agents/skills and .hermes/skills under the session HOME, keeping a
directory or live link someone already put there. The runtime README states
the directories and which copy each harness lists when the workspace
repository ships a same-named skill; the image conformance test holds both
tables: every link, and every managed harness's golden exec run against a
request-recording stub model.

Refs #2790
Linking the baked skills into every harness's user-level skill directory
made the repository-over-bake rule depend on each loader: Claude Code
ranks user skills above project skills, Codex lists both copies and
OpenCode keeps whichever finishes loading last. The per-turn reconcile
that withdrew the baked link went away in #2857.

runnerd now owns the links (daemon/src/baked-skills.ts) instead of the
entrypoint. It reconciles at boot and before every exec: while the
workspace ships <name>/SKILL.md in .claude/skills or .agents/skills,
the baked link of that name leaves the same directory under HOME, and
it comes back once the repository drops the skill. A directory or live
link of someone's own is still never touched.

The image conformance test now runs every managed harness's golden exec
through runnerd: with a repository copy in both directories every
harness lists that copy (Hermes, which reads no project skills, keeps
the baked one), and the links are withdrawn and restored.

Refs #2790
yannickmonney added a commit that referenced this pull request Sep 27, 2026
TASK-F34 now names the description mentions box that #3519 landed, and open
#3535 claims TASK-F35, so the box for a connector running for the run's
starter becomes TASK-F36, and TASK-B10 points at it. The suite's cost and
the readme's tasks row and total are re-derived from the merged suite.

The registers follow the run-bound caller: the automation row names the
run_ended refusal, the auto-retry pin and the relayed connector refusals,
the error-codes row adds run_ended, and B10 and its pin name Cancel run
before a new start. BL-2 records the remaining exposure: two runs of one
agent share its session and user, so a live run's token can be read by its
sibling.
…very-harness

# Conflicts:
#	services/platform/tests/manual/suites/tasks.md
@yannickmonney
yannickmonney merged commit c51128a into main Sep 27, 2026
53 checks passed
@yannickmonney
yannickmonney deleted the fix/built-in-skills-every-harness branch September 27, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Ensure visual-aspect-analyzer is available to all sandbox agents

1 participant