Repository navigation
docs(agent): add the add-harness skill and document onboarding pitfalls - #5074
Conversation
|
/ok to test e7d2904 |
|
🌿 Preview your docs: https://nvidia-preview-pr-5074-47e2a7337464.docs.buildwithfern.com/nemo/gym |
yaoyu-33
left a comment
There was a problem hiding this comment.
Team review of the add-harness skill and the harness-guide edits. Every command, flag, path, symbol and link the skill names was checked against the code at e7d29040: the CLI flags, the conformance runner and inspector flags, the session-contract symbols, the single_agent_turn_legacy and legacy_agent config shapes, and all 32 links and anchors resolve. No blockers.
Inline: one RISK and four NOTEs. The RISK is the pairing override. In the skill's gym env start + gym eval run --no-serve flow, the pairing check reads the head server's config, so the flag has to go on gym env start.
Lower-confidence points from the same pass, not raised inline:
- The conformance registry key must equal the adapter directory without
_agent. - The probes recognize only certain shell-tool names and argument shapes, and they give the adapter its own local sandbox.
- A server that declares no
allowed_agentsaccepts any harness. - The "Sandboxed harnesses" table covers only sandboxed adapters.
PR hygiene: the body cites #4994, #5008 and #5003 but links no issue and does not say why none is needed (AGENTS.md, "Pull Requests").
|
/ok to test 827b1ce |
|
/ok to test 93d1a55 |
|
/ok to test dc09885 |
|
/ok to test 5611a9f |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40761036239 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40761259556 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40766194414 |
Add a public skill that walks a coding agent through adding or updating a harness adapter: scoping, the session contract, pairing configuration, harness conformance, real pairing runs, and the exit checks before merge. The skill links the harness docs for every contract and command instead of restating them. Fill the doc gaps that two onboarding test drives hit: - when the conformance probes apply (a harness with a shell tool) - what an Evaluation-level adapter's health and evidence look like - `gym eval run --input` needs `--no-serve`, and a config that resolves and validates can still fail when its servers start - a `single_agent_turn_legacy` block names both `resources_server` and `agent_server` Point add-benchmark's harness section at the new skill and list it on the Agent Skills page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Review fixes for the add-harness skill and the harness guide: - With `gym eval run --no-serve`, the pairing check reads the running servers' config, so pass `--allow-unsupported-pairing` to `gym env start`. Treat `allowed_agents` as optional on a Resources Server. - Add the required `--output` to the guide's `--no-serve` smoke command. - Apply the Conformance and Evidence exit checks from the Observability level up; an Evaluation-level adapter records its expected failure. - Explain `unobserved` by the missing input, not only by the level. - Stop citing langchain_deepagents_agent as a model until its `responses()` checks the session; take the close fallback from hermes_agent. - Name the conformance registry-key, shell-tool, and sandbox constraints, and make the catalog tables conditional. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
- Define a pairing (one harness on one benchmark through a single_agent_turn Environment Server) and rename Step 3 to say what is paired. - In Step 4, sort conformance failures by source: harness or adapter failures are fixed in the adapter; a probe that cannot drive the harness's tool gets a provider extension in the same PR; setup failures are fixed in the setup; a wrong check is fixed in a separate PR with a regression test, never to suit one harness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
- Set the TB 2.1 full evaluation to 8 repeats per task, as the benchmark's OpenCode, Terminus 2, and Inkling configs declare; the README's run config declares none. - Note that exporting NEMO_GYM_ALLOW_UNSUPPORTED_PAIRING=1 also works with gym eval run --no-serve. - Link the deepagents session caveat to #5003, which fixes it. - Say in Step 4 that the probes are optional at the Evaluation level. - Replace "very few unhealthy rollouts" with a stated cause for each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
The review of the Copilot CLI adapter (#5082), built by following this skill, found problems the skill and harness guide did not warn about: - Harness guide: set the response status by the harness's own rule for a failed run, and report aggregate usage only when every model call has a usage record, with a gap instead of a subtotal. - Code checklist: stdlib_runner and RUNNER_FILE for sandbox runners, plus the two output rules above. - Unit tests: a background process holding stdout must not block the activation; tolerated errors and missing usage records are covered. - Real runs: a later 422 means replayed response fields; normalize only empty values in nemo_gym/openai_utils.py and keep the rest strict. - Catalog: entries must match the adapter's limits, rejected fields, and token-ID capture. - Pre-commit: the legacy relay migration test checks every config, so session-only or unbound adapters need an exemption in the script; merge current main before the final checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Review of the two most recent add-harness commits against current main: - stdlib runner: `stdlib_runner=True` is set on the `SandboxCommand`, and it protects against `pkill python3` (neutral process name) and `pkill -f '\.py'` (no suffix on RUNNER_FILE), not `pkill -f python3`. - 422 on replay: validation is strict for Chat and Responses requests, and `annotations: null` comes from the harness's SDK, not a Model Server (see the Copilot adapter, #5082). - Legacy relay script: name the two checks in `needs_environment_server` instead of "the matching check". - MCP grants: replace slash-joined terms and "readiness receipt" with what to do, explain the shared MCP timeout, and use "plugin or hook" consistently in the guide and the skill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
204335d to
47e2a73
Compare
|
/ok to test 47e2a73 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40797864725 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40803081619 |
What changed and why
Third-party coding agents that onboard a harness need the same guidance
add-benchmarkgives for benchmarks. This PR adds a publicadd-harnessskill and fills the doc gaps that two onboarding test drives (GitHub Copilot CLI and LangChain DeepAgents) hit.Skill (
.agents/skills/add-harness/, with the usual.claude/skillsand.codex/skillslinks and Codex metadata). The skill links Add or Update a Harness and the other docs for every contract and command. It adds only:allowed_agentsDocs:
add-or-update-a-harness.mdx:unobserved, failed evidence check)gym eval run --inputneeds--no-serve, and that a config that resolves and validates can still fail when its servers startintegrate-existing-agents.mdx: asingle_agent_turn_legacyblock names bothresources_serverandagent_server.contribute/agent-skills.mdx: lists the new skill.add-benchmarknow points its harness section at the new skill.Copilot adapter review lessons. The Copilot CLI adapter (#5082) was built by following this skill. Its review found problems the skill did not warn about, now covered:
add-or-update-a-harness.mdx: set the response status by the harness's own rule for a failed run, so a tolerated subagent error or a recovered model call does not fail it. Report aggregate usage only when every model call has a usage record; otherwise leave it unknown with a gap.stdlib_runnerandRUNNER_FILEfor a sandbox runner, so a task'spkill -f python3cannot stop itnemo_gym/openai_utils.pytest_add_legacy_agent_environment_servers.pychecks every config, so a session-only or unbound adapter needs its type in the migration scriptmainbefore the final checksRelated: #4994 adds the Copilot test drive's lessons to the harness guide, and #5008 makes
gym env validatecheck Environment Server configs. This PR does not repeat either. The DeepAgents lessons come from #5003.Validation
Every relative link and anchor in
add-harness/SKILL.mdandadd-benchmark/SKILL.mdresolves; checked with a script.pre-commit run --all-fileswith the new files staged: clean, including the private-guardwords check.nemo_gym.skills.load_skill_directory(".agents/skills")loads all 12 skills, includingadd-harness.pytest tests/unit_tests/test_skills.py tests/unit_tests/test_session_contract_repo.py: 26 passed.fern check: 0 errors. The one warning is the redirect check, which needs Fern login; no pages moved.TB 2.1 requirement update: reran staged
pre-commit run --all-files, checked all 31 relative links and anchors inadd-harness, and loaded all 12 skills through Gym from the edited checkout.npm run check -- --warningsreports 0 errors and the same authentication warning. The standalone skill-creator validator rejects the existing<CLI>text in the unchanged description on both the original and updated skill; Gym's loader accepts it.Copilot review lessons (
5611a9f7d): stagedpre-commit run --all-filespasses, including the guardwords check. All 34 relative links and anchors inadd-harnessresolve, and Gym loads all 12 skills from the edited checkout.pytest tests/unit_tests/test_skills.py tests/unit_tests/test_session_contract_repo.py: 26 passed.npm run check -- --warnings: 0 errors, the same authentication warning. A trial merge with currentmain(48a58f5a2) is clean. Each claim was checked againstmain:RUNNER_FILEandstdlib_runnerinnemo_gym/agent_utils/sandbox_session.py, the two exemption checks inscripts/add_legacy_agent_environment_servers.py, and the Pi composition test.Blind test drive. A fresh agent with no other context followed the skill in a read-only dry run: add the Aider CLI paired with Terminal-Bench 2.1. It reported gaps, which were checked against the code before being fixed:
--allow-unsupported-pairing, and thatallowed_agentsis checked at dispatchng_testis deprecated; usegym env test +entrypoint=...test_session_contract_repo.pycovers every adapter but isn't found by searching for the adapter's nameOne reported gap was wrong:
langchain_deepagents_agentdoes serve sessions, inherited fromSimpleAgent. The skill keeps it as the framework example and addssimple_agent.MCP grant guidance (
5b88ac6bf):pre-commit run --all-filespassed;PYTHONPATH="$PWD" python -m pytest tests/unit_tests/test_skills.py tests/unit_tests/test_session_contract_repo.py tests/unit_tests/test_fern_docs_links.py -q -o addopts='' -o log_cli=false -p no:cacheproviderpassed (55 tests, 24 subtests).cd fern && npm run check: 0 errors, 1 warning. Gym's skill loader accepts the edited directory; the new relative link and anchor resolve; the JSON example validates againstMCPToolAccess. The standalone skill validator's pre-existing<CLI>frontmatter rejection was reproduced on the unchanged baseline.Rollout evidence
N/A: documentation and agent-skill changes only; no runtime code changes.
🤖 Generated with Claude Code