Repository navigation
Conversation
…e skills_dir The harbor Environment Server refused a task that declares skills_dir unless the harness set supports_task_tool_context in its seed response, which only mini-SWE and the oracle do. Claude Code and Codex hide the image's skills from the CLI (CLAUDE_CONFIG_DIR, CODEX_HOME and --bare), so a skills task could not run on them as written. Add supports_task_skills to the agent seed response. A harness that sets it has copied the task's skills_dir into the folder its CLI discovers skills in during its seed. The server treats skills_dir as reached for such a harness, and judges MCP servers separately, by grants or supports_task_tool_context. Claude Code and Codex read skills_dir from /tmp/.nemo-gym/task.json inside the sandbox and copy the folder to <CLAUDE_CONFIG_DIR>/skills and <CODEX_HOME>/skills with stage_task_skills. Claude Code runs a session with task skills without --bare, as it does for run-level skills. A missing or unusable skills folder refuses the seed. Run-level skills.path is unchanged. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
A task that declares skills_dir is now taken by a harness that declares supports_task_tool_context or supports_task_skills. Update the pages that described the gate: the agent skills page, the Harbor environment server README and configuration table, the task folder format and patterns pages, the Claude Code and Codex READMEs, and the two SkillsBench READMEs. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
…ills_dir wording The SkillsBench README still said the skills reach the model under /skills and that loading does not depend on the harness. Say where each harness finds them, that the with-skill and no-skill conditions differ by more than the skills on Claude Code (it drops --bare only for a task that declares skills_dir), and that admission is not a validated pairing. A relative skills_dir does not fail the seed: the Environment Server makes it absolute before it writes task.json. Only a path a shell resolves (~ or $) is refused, so say that in the skills page, both harness READMEs and the helper's docstring, and note that a declared but empty folder is copied too. Point the harness-selection page at Claude Code and Codex for a task whose only tool declaration is skills_dir. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
…lder with no skills An agent-owned Codex sandbox must not read task.json: with the guard dropped, every existing Codex test still passed, while Claude Code already had this test. Add it, and pin that a declared skills_dir holding no skills (the baseline arm of a skills comparison) is still copied and counts as declared. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
…w Codex differs "Loading does not depend on the harness" read as a claim about every harness, next to the paragraph that now has two ways a harness takes skills. Scope it to harnesses that read task.json, and say Codex needs no bare-style setting for a paired comparison. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
Claude Code and Codex are admitted to a skills_dir task because they copy the folder that /tmp/.nemo-gym/task.json names at their seed. The server wrote the file once, at episode seed, while a fresh session seeds every step: the previous step's agent or verifier, or the step's setup.sh, could remove it, and the next step's harness would copy nothing and run without its skills while the gate, which reads the harness's declaration, still admitted it. Each step's preparation now ends by writing the file again, which also keeps mini-SWE's task MCP servers in reach on later steps. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
…covers test_the_copy_quotes_both_paths only pinned the literal cp command, so a harmless rewrite of the command would fail it. The local-sandbox test with a space, ';' and '$(...)' in both paths already checks the copy and that nothing was injected. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
/ok to test 579a1bc |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
No runtime correctness defects found. One non-blocking NOTE asks the multi-step regression test to enforce setup → context rewrite → session seed.
I inspected all 25 changed files and traced the affected admission, staging and activation paths. This was a static review; I did not run tests or reproduce the author-reported rollouts.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| writes = [i for i, call in enumerate(sandbox.execs) if "/tmp/.nemo-gym/task.json" in call["command"]] | ||
| assert all('"skills_dir": "/app/.skills"' in sandbox.execs[i]["command"] for i in writes) | ||
| # Step two's harness starts from a task.json written after step one's turn, not only from the episode seed's. | ||
| assert len(activations) == 2 and any(activations[0] <= i < activations[1] for i in writes) |
There was a problem hiding this comment.
NOTE, suggestion: check the rewrite before session seed, not only before activation.
The test currently passes if the rewrite happens after /v1/agent_sessions but before /v1/responses. The fake client's hook records activation, but Claude Code and Codex read the context during seed. There is also no step-two setup.sh, so moving the rewrite before setup would still pass. The production ordering is correct; this is a regression-coverage gap.
Could you add step-two setup and sample the exec position at session seed? A small change in this test would protect the required ordering without introducing a filesystem-aware fake:
# Before multi_turn_server(...), so the fixture is included in the task digest:
step_workdir = tmp_path / "datasets/ds/hello/steps/two/workdir"
step_workdir.mkdir(parents=True)
(step_workdir / "setup.sh").write_text("#!/bin/bash\nrm -rf /tmp/.nemo-gym\n")
# Replace activations and the turn_hooks registration:
seed_positions: list[int] = []
post = type(server.server_client).post
async def record_seed(client, server_name, url_path, **kwargs):
if url_path == "/v1/agent_sessions":
seed_positions.append(len(sandbox.execs))
return await post(client, server_name, url_path, **kwargs)
monkeypatch.setattr(type(server.server_client), "post", record_seed)
# Replace the final ordering assertion:
setup_index = next(
i for i, call in enumerate(sandbox.execs)
if call["command"] == "bash /app/setup.sh"
)
assert len(seed_positions) == 2
assert any(setup_index < i < seed_positions[1] for i in writes)Keep the existing assertions that both turns score 1.0 and that the rewritten JSON names /app/.skills. Proposed acceptance: the current implementation passes, while moving the rewrite before step-two setup or after its session seed fails. FakeSandbox records rather than executes the setup, so this checks ordering, not filesystem restoration. I have not executed this suggested change.
There was a problem hiding this comment.
Done in 09c0ff5: step two now has a setup.sh that removes /tmp/.nemo-gym, and the test records where each agent seed falls among the sandbox execs and asserts a task.json write between step two's setup and its seed. Checked that it fails when the per-step rewrite is removed.
… setup and the session seed Gives step two a setup.sh that removes /tmp/.nemo-gym and records where each agent seed falls among the sandbox execs, so moving the rewrite before the step's setup or after its seed fails the test (review suggestion). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
/ok to test 09c0ff5 |
|
/review reset=true |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM, no concerns found.
I reviewed all 25 changed files and traced Harbor admission, skills staging and CLI activation through their affected contracts and failure paths.
The earlier test-coverage NOTE is resolved. The multi-step regression test now requires a context write after step two's setup and before its session seed. It checks ordering, not filesystem restoration.
This was a static review. I did not run tests or independently reproduce the reported model rollouts.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
One conflict, the _build_command call in claude_code_agent/app.py: main added instruction_on_stdin (the prompt argument is None when the instruction goes on stdin) and this branch turns skills on for staged task skills. Both kept. Signed-off-by: Adil Asif <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dbox_id Main now reads sandbox.sandbox_id when a session seeds its own sandbox, which the fake sandbox of the task-skills seed tests lacks. Signed-off-by: Adil Asif <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged Conflict in Test fix ( Not changed by the merge: on Tests on the new head (
|
|
/ok to test 6406bf6 |
|
/review reset=true |
|
Merged Conflict: one, the Tests on the head (
|
|
/ok to test b952949 |
|
/review reset=true |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
HOLD
One BLOCKER: the capabilities endpoint breaks compatibility with an older Environment Server even for harnesses that do not support task skills. Same-version deployments are unaffected.
I reviewed all 25 changed files and traced Harbor admission, multi-step context restoration, shared staging, both CLI integrations and cleanup. I compared against review 6033264612, which reported no findings. Its claimed setup → context rewrite → session seed coverage is still present. The compatibility finding below was already present at that review’s commit but was not reported; this is a full RESET review.
Execution: I used 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:main-offline, the default-branch CI image, with Python 3.13.14. Purpose-built probes under /workspace/review-probes/ exercised:
skills_behavior_probe.py: real shell copies, independent session snapshots, symlink contents, quoting, dotfiles, empty folders and invalid inputs passed.shared-skills-1/wire_probe.py: reproduced the compatibility failure below.failure_probe.pyconfirmed read/copy error classification.cli-integration-1/probe.py: seed/activation wiring and borrowed-sandbox cleanup passed with fake transport and execution.harbor-lifecycle-1/probe.py: eight admission cases passed; context restoration worked through two turns. Substituting only base’s_prepare_turnreproduced the missing-context failure this PR fixes.
These probes imported the admitted head. They did not execute real CLIs, provider identity switching or models. I read the author’s smoke-rollout evidence but did not independently reproduce it. Existing repository suites were left to CI.
CI: Checks attached to b9529493 show lint, four core shards, eight server shards, combined coverage, sandbox tests, session routing and Nemo_CICD_Test passed. Changed-server tests were skipped. Job logs show the suites executed synthetic merge 1dbc5847ca44b55897060fc6529b850651fd01ff, not the admitted head alone. The overall workflow failed on non-blocking diagnostics: Claude Code and Terminus conformance report failures also reported on base, mini-SWE timed out and was unavailable on both, and compliance flags the adapters’ pre-existing run() methods. This is not an all-checks-green claim.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| model_config = ConfigDict(extra="forbid") | ||
|
|
||
| supports_task_tool_context: bool = False | ||
| supports_task_skills: bool = False |
There was a problem hiding this comment.
BLOCKER: Omit the false capability from the wire response.
Could this response omit supports_task_skills when false, as AgentSeedSessionResponse already does? Adding the field here makes GET /v1/agent_sessions/capabilities emit "supports_task_skills": false for every unchanged harness. The base Environment Server parses that response with the strict base model. Upgrading an agent server independently therefore breaks ordinary turn_sessions: continue tasks on a continuing harness such as OpenCode, even when the task declares no skills.
The route/model probe shared-skills-1/wire_probe.py reproduced extra_forbidden on supports_task_skills; removing only that false key made the base model accept the same continuation response. This extends the documented Claude Code/Codex compatibility boundary to unrelated harnesses.
Please apply false-field omission to this model without weakening unknown-field validation or changing continuation metadata. Acceptance checks: a false-support GET response retains its previous wire keys and parses with the base model, including non-null continuation; a true-support response still emits the key and round-trips through the head model; seed serialization stays unchanged.
There was a problem hiding this comment.
Fixed in bd23ef419c. The capabilities reply now omits supports_task_skills unless it is true, so a harness that stages no task skills answers as before, and an Environment Server that predates the field still accepts the reply. Test: test_the_capabilities_reply_sends_supports_task_skills_only_when_declared, which checks the reply against a copy of the earlier model with extra="forbid".
… when declared The capabilities reply now carried "supports_task_skills": false for every harness. An environment server whose reply model predates the field forbids unknown keys, so upgrading only the agent server broke ordinary continuing runs on harnesses that stage no skills. The reply drops the field when it is false, as the seed reply already does; a harness that stages task skills still sends it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
Addressed the BLOCKER in |
|
/ok to test bd23ef4 |
|
/review reset=true |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
One RISK: copying read-only skill directories makes non-root Claude Code and Codex sessions fail cleanup. I reproduced it in both adapters. No BLOCKER found.
I reviewed all 25 changed files, including connected admission, staging, activation and cleanup paths, with three delegated reviewers. This was a full RESET review. The new finding existed at the previous review’s commit but was not reported then.
Previous finding: Review 6093801598 is resolved. Eight HTTP/model combinations confirmed that false-support capabilities responses now parse with the actual base models, including non-null continuation. True-support responses still emit the field and round-trip through the current models. Their documented coordinated-upgrade requirement is unchanged.
Execution: I used 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:main-offline, the default-branch CI image, with Python 3.13.14. Probes imported the admitted head and covered:
- Real-shell copies, quoting, dotfiles, executable modes, symlink contents and independent session snapshots.
- HTTP error classification and failed-seed cleanup.
- Twenty-four Harbor admission combinations and two-step task-context restoration. Substituting base’s
_prepare_turnreproduced the missing-context regression this PR fixes. - Both adapters’ seed/activation wiring and borrowed-sandbox cleanup. A non-root read-only-directory probe reproduced the finding below; I reran it independently and confirmed that making only copied directories writable permits cleanup.
Existing repository suites were left to CI. No live CLI/model or remote-provider run was performed. I read the author’s representative smoke-rollout evidence but did not independently reproduce it.
CI: Lint, four core shards, eight server shards, combined coverage, sandbox tests, session routing, Unit tests / Test, Unit tests / Server suite and Nemo_CICD_Test passed. Changed-server tests were skipped. The job log shows CI tested synthetic merge 47afb9f82d168bf8e83a972aa78d84fe5b4ae5a0, not the admitted head alone. Non-blocking conformance and compliance aggregates are red. The conformance summary reports the same Claude Code and Terminus failures on base; compliance flags the adapters’ pre-existing run() methods. This is not an all-checks-green claim.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| source, target = shlex.quote(skills_dir), shlex.quote(destination) | ||
| copied = await sandbox.exec( | ||
| f"[ -d {source} ] || {{ echo 'not a folder in the sandbox' >&2; exit 2; }}; " | ||
| f"mkdir -p -- {target} && cp -RL -- {source}/. {target}/", |
There was a problem hiding this comment.
RISK: Keep copied skill directories removable by the session owner.
Could the staged copy keep its directories owner-writable? With a non-root [agent].user and a readable skill subdirectory with mode 0555, cp -RL succeeds but creates a non-writable copied directory. Both Claude Code and Codex then fail repeated session closes with Could not remove ... session files: rm -rf cannot unlink SKILL.md.
Borrowed-session cleanup removes the tree before disconnecting, so the client is not released. Harbor closes before verification, so an otherwise valid rollout can become a cleanup failure instead of reaching its verifier.
I reproduced this using the real helper, adapter seed/close methods and a non-root shell: /opt/nemo_gym_venv/bin/python /workspace/review-probes/cli-integration-2/readonly_probe.py. Both adapters failed two closes with Permission denied; making only the copied directories writable let their unchanged close paths succeed.
Please normalize directory permissions on the adapter-owned copy, including partial-copy failure paths, or harden its disposal equivalently. Preserve the original staging error, source permissions/content, executable files and borrowed-sandbox ownership. Acceptance checks: non-root seeding from a 0555 skill directory remains readable and closes successfully; a copy that fails after creating such a subtree also cleans up; both cases disconnect without stopping the environment’s sandbox.
There was a problem hiding this comment.
Fixed in 0f55ba11f1; details are in the PR comment on that commit. The copy runs chmod -R u+rwX on the destination after the copy, including after a copy that failed part way. The interrupted case raised in the later threads is handled in c76735324d, which repairs the destination before a copy, and in 62b22fc43a, which repairs it at close.
cp gives the copy of a task's skills_dir the modes of the task's files. A
non-root agent user can copy skills an image ships read-only, but the copy
then holds folders it cannot write, and the session's close fails to remove
them ("Could not remove ... session files"), so a borrowed session never
disconnects and the episode fails at cleanup.
After the copy, and after a copy that failed part way, the staging command
now gives the owner read and write on every entry of the copy and search on
every folder (chmod -R u+rwX). Executable files stay executable, the task's
folder is not touched, and the copy's own exit status and message are what a
refusal reports.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
|
Confirmed and fixed in Cause. Without Change ( [ -d SRC ] || { echo 'not a folder in the sandbox' >&2; exit 2; }; mkdir -p -- DEST && cp -RL -- SRC/. DEST/; copy_status=$?; chmod -R u+rwX -- DEST 2>/dev/null; exit $copy_status
Tests.
Results (
Not covered. Suppose a copy times out and the provider kills it before the chmod runs. That copy can still leave The OpenCode, Hermes and Pi task-skills PR (#6351), which is stacked on this one, now has the same change through a |
|
/ok to test 0f55ba1 |
|
/review reset=true |
…py before copying again A copy that times out can be stopped after it copied read-only skills and before its chmod. A retried seed then copies into the same destination, and cp cannot write over those files, so the retry was refused. The copy command now makes an existing destination owner-writable before the copy, and still repairs the copy after it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
One RISK remains from review 6094083643: an interrupted skills copy can still leave non-root sessions unable to close. Completed copies and ordinary copy failures now clean up correctly. No BLOCKER or separate new finding found.
I reviewed all 25 changed files and connected callers, activation paths and cleanup code with three delegated reviewers. This was a full RESET review, including comparison with bd23ef419ce98ae9a3283b432b0ac0ac3a324768.
Execution: I used 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:main-offline, the default-branch CI image, with Python 3.13.14. Purpose-built probes covered:
- Real-shell copies, quoting, dotfiles, executable permissions, symlink contents and independent session snapshots.
- Both adapters’ seed, activation configuration and repeated close paths, including successful read-only copies and ordinary partial-copy failures.
- Capability serialization and schema preservation, 24 Harbor admission combinations, two-step metadata restoration and four metadata-refresh failure cases.
Those checks passed. A separate interrupted-copy probe reproduced the remaining cleanup failure in both adapters. I independently reran the real LocalProvider reproduction and confirmed that changing only copied-directory permissions lets the unchanged close succeed. The reproduction accelerates the timeout and uses a blocking copy shim; it does not claim a live remote-provider failure.
Existing repository suites were left to CI. I read the author’s representative model-rollout evidence but did not independently run either CLI with a model.
CI: Lint check, four core shards, eight server shards, combined coverage, sandbox tests, session routing, Unit tests / Test, Unit tests / Server suite and Nemo_CICD_Test passed. Changed-server tests were skipped. The core job log shows CI tested synthetic merge 110c31846e22149afb4dfcf3f190e86451a630a7, not the admitted head alone. Non-blocking conformance and compliance aggregates are red. Base evidence shows the same Claude Code and Terminus conformance failures and unavailable OpenClaw/mini-SWE results; compliance flags pre-existing run() methods. This is not an all-checks-green claim.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| copied = await sandbox.exec( | ||
| f"[ -d {source} ] || {{ echo 'not a folder in the sandbox' >&2; exit 2; }}; " | ||
| f"mkdir -p -- {target} && cp -RL -- {source}/. {target}/; copy_status=$?; " | ||
| f"chmod -R u+rwX -- {target} 2>/dev/null; exit $copy_status", |
There was a problem hiding this comment.
RISK: Keep timed-out skill copies removable too.
Could permission repair also cover an interrupted copy? The chmod runs only after cp returns in the same bounded exec. If the provider kills that exec after copying a restrictive subtree, chmod never runs. This leaves the interruption case of review 6094083643 unresolved, although successful and ordinary failed copies are fixed.
I reproduced this as uid 65532 with the real helper, LocalProvider and session close: PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=/workspace/review/source /opt/nemo_gym_venv/bin/python /workspace/review-probes/shared-skills-3/timeout_probe.py. A shim copies a 0555 subtree, then blocks; an accelerated 0.5-second timeout kills the exec. Two closes report Could not remove native-timeout session files, with zero disconnects. Both real adapter seed/close paths reproduce the failure too. Making only copied directories writable permits cleanup.
Borrowed close removes files before disconnecting, so affected Claude Code and Codex sessions retain their client and fail repeated cleanup.
Please repair permissions on the adapter-owned copy during disposal independently of the interrupted command, or avoid creating restrictive copied directories. Preserve the original timeout/copy error, source content and modes, executable files, and borrowed-sandbox ownership. Acceptance: a non-root copy interrupted after creating a read-only subtree can close repeatedly, remove its session files and disconnect without stopping the environment’s sandbox; keep the successful-copy and ordinary-copy-error cases green.
There was a problem hiding this comment.
Fixed in 62b22fc43a, with a symlink guard in 8d55720755; the head is now ccd9a44181. Details are in the PR comment on those commits. The repair now happens at disposal, independently of the interrupted copy.
remove_session_directory()still retires the session folder withmvfirst. Ifrm -rfon the retired folder fails, it runschmod -R u+rwXon that folder (skipped when the retired path is a symlink) and removes it once more. That covers both the original path and a.closedfolder that an earlier failed close left. A normal close is unchanged. If the second removal fails as well, the close still raises and keeps.closedfor a retry.- Claude Code's and Codex's failed-seed paths close without copying again. That close now removes the read-only leftovers and then disconnects the borrowed sandbox without stopping it. The seed's original timeout or copy error is still what is raised.
- Tests, real local shell, run as non-root:
test_a_session_whose_skills_copy_was_stopped_before_its_repair_still_closes: the task's read-only skills sit in the session as a stopped copy leaves them. A borrowed, seeded session closes with no copy in between. The session folder and.closedare gone,disconnectis awaited once,stopis not awaited, and the source modes do not change.test_removal_makes_folders_its_owner_cannot_write_removable[seed|earlier close]: removal from the session path and from a.closedfolder that an earlier close left.- All three fail without the change with
Could not remove test session files.
- The direct-retry case is unchanged:
test_a_retry_copies_over_read_only_skills_an_interrupted_copy_left, fromc76735324d.
… copies over So the test also shows the retry wrote over what the interrupted copy left, not only that it no longer fails. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
Added
|
|
/ok to test 45c7a5d |
|
/review reset=true |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
One prior RISK remains: interrupted skill copies can still prevent non-root sessions from closing. The new pre-copy chmod fixes direct helper retries, but neither adapter reaches that repair after failed setup. No BLOCKER or separate new finding found.
I reviewed all 25 changed files and connected callers with three delegated reviewers. This was a full RESET review, including comparison with prior review 6094780773 at 0f55ba11f1e68e630531cd82c85e4f0dcc728efe.
Execution: I used 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:ba3eeeb0a60df9a7cd3bb9d2c1f36cabb0a493b5, the successful default-branch CI image because this head’s container build was skipped. Python was 3.13.14, running as uid 65532.
- My
leader-4/retry_copy.pycomparison confirmed that overwriting a restrictive partial copy fails at the prior revision and succeeds at this head, preserving content, source modes and executable bits. - My
leader-4/copy_timeout.pyreproduced failed repeated cleanup at both revisions. Changing only copied-directory permissions let cleanup succeed. - Delegated probes covered real-shell staging, capability serialization, eight adapter activation/cleanup scenarios, 24 Harbor admission combinations, two-step metadata restoration and four metadata-refresh failure cases. Those checks passed. Both adapters’ public seed paths separately reproduced the interrupted-copy defect and rejected identical retries with
409: Agent session is closing.
The interruption probes use a blocking copy shim and an accelerated timeout, not an observed remote-provider incident. Runtime installation, CLI execution and network services were mocked. I read the author’s model-rollout evidence but did not independently run either CLI with a model. Existing repository suites were left to CI.
CI: Lint check, four core shards, eight server shards, combined coverage, sandbox tests, session routing, Unit tests / Test, Unit tests / Server suite and Nemo_CICD_Test passed. Changed-server tests and the container build were skipped. The core log shows CI tested synthetic merge 6ca96bf30e8c21b11ae86f4def6417ddc82648e0, not the admitted head alone. Non-blocking conformance and compliance aggregates are red. Base results show the same Claude Code/Terminus conformance failures and unavailable OpenClaw/mini-SWE results; compliance flags run() methods already present on base. This is not an all-checks-green claim.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| # runs after a failed copy too. Their own errors are dropped, so a refusal reports the copy's. | ||
| copied = await sandbox.exec( | ||
| f"[ -d {source} ] || {{ echo 'not a folder in the sandbox' >&2; exit 2; }}; " | ||
| f"mkdir -p -- {target} && {{ chmod -R u+rwX -- {target} 2>/dev/null; cp -RL -- {source}/. {target}/; }}; " |
There was a problem hiding this comment.
RISK: Repair interrupted copies during disposal, not only before another copy.
Could permission repair also cover failed-seed disposal? Both chmod operations still run inside the same bounded exec. If it is killed after copying a read-only subtree, the trailing chmod never runs. Claude Code and Codex immediately close instead of copying again. Cleanup retires the directory to .closed, then fails before disconnecting.
The new pre-copy repair is not reached through normal recovery: the failed seed is marked closing, so identical seed retries return 409: Agent session is closing. This leaves review 6094780773’s interrupted-copy finding unresolved.
I independently reproduced this on the head and prior revision with PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=/workspace/review/source /opt/nemo_gym_venv/bin/python /workspace/review-probes/leader-4/copy_timeout.py. Real LocalProvider timeout handling stops a copy shim after it creates a restrictive subtree. Two closes report Could not remove leader-timeout session files, with zero disconnects. Delegated public-seed probes reproduce it in both adapters. Making only copied directories writable permits cleanup.
Please repair the adapter-owned copy during disposal independently of the interrupted command, or avoid leaving restrictive copied directories. Preserve the original timeout/copy error, source content and modes, executable files, and borrowed-sandbox ownership. Acceptance: interrupt a non-root copy before post-copy repair, then close without another staging call; repeated close must remove original and retired session paths, disconnect once and never stop the borrowed sandbox. Keep successful-copy, ordinary-copy-error and direct-retry coverage green.
There was a problem hiding this comment.
Fixed in 62b22fc43a, with a symlink guard in 8d55720755; the head is now ccd9a44181. Details are in the PR comment on those commits. The repair now happens at disposal, independently of the interrupted copy.
remove_session_directory()still retires the session folder withmvfirst. Ifrm -rfon the retired folder fails, it runschmod -R u+rwXon that folder (skipped when the retired path is a symlink) and removes it once more. That covers both the original path and a.closedfolder that an earlier failed close left. A normal close is unchanged. If the second removal fails as well, the close still raises and keeps.closedfor a retry.- Claude Code's and Codex's failed-seed paths close without copying again. That close now removes the read-only leftovers and then disconnects the borrowed sandbox without stopping it. The seed's original timeout or copy error is still what is raised.
- Tests, real local shell, run as non-root:
test_a_session_whose_skills_copy_was_stopped_before_its_repair_still_closes: the task's read-only skills sit in the session as a stopped copy leaves them. A borrowed, seeded session closes with no copy in between. The session folder and.closedare gone,disconnectis awaited once,stopis not awaited, and the source modes do not change.test_removal_makes_folders_its_owner_cannot_write_removable[seed|earlier close]: removal from the session path and from a.closedfolder that an earlier close left.- All three fail without the change with
Could not remove test session files.
- The direct-retry case is unchanged:
test_a_retry_copies_over_read_only_skills_an_interrupted_copy_left, fromc76735324d.
A skills copy stopped by a timeout before it repaired its modes leaves read-only folders in the session. A seed that fails that way closes its session without copying again, and rm -rf, run as the non-root agent user, cannot empty those folders: the close failed before it released the sandbox, and every retried close failed on the retired copy the same way. When the removal fails, the close now makes the retired folder owner-writable and removes it once more. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
…s removable GNU chmod -R follows a symlink named on its command line. A retired path that is a symlink the close could not unlink would have had its target made writable. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
Added
|
|
/ok to test 8d55720 |
|
/review reset=true |
Root unlinks the link from a folder it cannot write, so the removal succeeds and the fallback the test is about is never reached. CI runs the core tests as root. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
/ok to test ccd9a44 |
|
/review reset=true |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM. No material concerns found.
I reviewed all 27 changed files and connected callers with three delegated reviewers. This was a full RESET review, including comparison with review 6094922862 at 45c7a5d2bab752f797790587f65ca43b70d7b2a4.
The prior interrupted-copy RISK is fixed. The disposal path repairs restrictive copied directories independently of the interrupted staging command. My non-root differential probe reproduced two failed closes on the previous revision; both closes succeeded on this head, with one disconnect, no borrowed-sandbox stop and unchanged source modes. Delegated probes confirmed recovery through both adapters’ public seed paths, including identical seed retry and replay.
Execution: All probes used 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:ba3eeeb0a60df9a7cd3bb9d2c1f36cabb0a493b5, the successful default-branch CI image because this head’s container build was skipped. Python was 3.13.14, running as uid 65532.
leader-6/copy_timeout.pyconfirmed the cleanup fix against the previous revision using realLocalProvidertimeout handling and a blocking copy shim.- Filesystem probes passed for restrictive permissions, partial copies, retry, quoted paths and symlink containment.
- Eight adapter integration scenarios passed. Capability serialization and skills-plus-MCP configuration probes also passed.
- Harbor probes passed 24 admission combinations and four metadata-refresh failure cases. A shell-backed two-step probe verified restored metadata before each seed; substituting base’s preparation method reproduced the missing-metadata failure.
Runtime installation, CLI execution and network services were mocked. I read the author’s model-rollout evidence but did not independently run either CLI with a model. Existing repository suites were left to CI.
CI: Lint check, four core shards, eight server shards, sandbox tests, combined coverage, session routing, Unit tests / Test, Unit tests / Server suite and Nemo_CICD_Test passed. Changed-server tests and the container build were skipped. The core log records synthetic merge d9ba293995722d930fb53e5be447d56e3af6d10d, not the admitted head alone.
The non-blocking conformance and compliance aggregates are red. Base shows the same Claude Code and Terminus conformance failures; other diagnostic failures are not fully attributed. Compliance flags run() methods already present on base. This is not an all-checks-green claim.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
What does this PR do?
Claude Code and Codex now run Harbor tasks that declare
[environment] skills_dir, and the model finds the skillsthrough the CLI's own skill mechanism. Before, the
harborEnvironment Server refused these tasks for any harnesswithout
supports_task_tool_context(only mini-SWE and the oracle). Deletingskills_dir, as SkillEvaluator doestoday, passes the gate but leaves the skills hidden from the CLI.
Refs #5639 (Harbor tasks that declare
skills_dirare refused for Claude Code, Codex and OpenCode; Linear GYM-1268).It stays open for OpenCode: its default profile denies skills on purpose, and overriding that is a maintainer decision.
supports_task_skillscapability on the seed response and capabilities route. With it, the Harborserver counts
skills_diras reached; MCP servers are judged as before.stage_task_skills(nemo_gym/agents/utils/task_skills.py) copies the folder named in/tmp/.nemo-gym/task.jsonwith one quoted
exec. It refuses the seed for a failed copy, atask.jsonthat is not a JSON object, a~or$path, or a missing folder; an exec with no exit code is retryable.
<CLAUDE_CONFIG_DIR>/skillsand drops--barefor that session; Codex copies to<CODEX_HOME>/skills. Only a task sandbox the Environment Server lent is staged.task.jsonafter each step'ssetup.sh, so later fresh sessions still findthe skills.
It conflicts with the always-grant-MCP PR (#6292) in the refusal block of
environment_servers/harbor/app.pyand in the Harbor docs; whichever merges second needs a small rebase. That PR alsodrops the refusal's
task_mcp_grantshint.Validation
At head
6406bf6a6(mainmerged at51630ce4fina1770981d, with one conflict, the_build_commandcall inclaude_code_agent/app.py, wheremain'sinstruction_on_stdinprompt argument and this PR'sskills_activebothstay;
0a7de79f5gives the task-skills fake sandboxmain'ssandbox_id; thenmainmerged at15adc2254in6406bf6a6with no conflicts), withgym env test(serial) and root tests at-n 2:environment_servers/harbor: 732 passedclaude_code_agent: 304 passedcodex_agent: 635 passed, 9 skipped, 1 failed:test_sandbox_runner.py::test_task_descendants_survive_until_owner_teardown[natural], a process-timing test this PR does not touch, while the host was under heavy load from other work;test_sandbox_runner.pythen passed 16 of 16 twice on this head and twice onmain15adc22542tests/unit_tests/agents: 853 passed, 5 failed; all 5 also fail onmain15adc22542in a dev venv built from the same lock: 3 outcome-policy upload-evidence tests needcloudpickleand 2sandbox_pythonarchive-owner tests depend on the host's gid mappingEarlier, at head
579a1bc34(origin/maincd899cad5merged in):pre-commit run --all-files: passed, no files changed, before the last commit (two lines in one docs page).cd environment_servers/harbor && pytest tests -n 8: 732 passed.pytest tests/unit_tests/agents tests/unit_tests/test_public_api_facades.py responses_api_agents/claude_code_agent/tests responses_api_agents/codex_agent/tests -n 8: 2450 passed, 6 skipped,6 failed, none in changed code (missing
cloudpickleoropensandboxin that venv, and a host-specific uid/gidassertion).
pytest responses_api_agents/harbor_oracle_agent/tests responses_api_agents/opencode_agent/tests -n 8: 1016 passed,24 skipped; both assert their exact seed reply, which is unchanged.
origin/main's sources).stage_task_skillstests use a real shell for dotfiles, shell characters in paths (nothing injected), an emptyfolder, a bad
task.jsonor path, and a missing folder. Failed-copy and no-exit-code cases are scripted.Rollouts
A hosted GPT model behind an OpenAI-compatible Responses API endpoint, through Gym's
openai_modelserver (ClaudeCode via Gym's converter). OpenSandbox, Claude Code 2.1.292, Codex 0.144.4. The task's
demoskill says "The magicword is pineapple.";
test.shchecks the final answer. Single-step cases ran at56fb4c586(before the multi-stepfix, which does not affect them), two-step cases at
579a1bc34.Skill {"skill": "demo"}; answeredpineappleAbracadabra<CODEX_HOME>/skills/demo/SKILL.md; answeredpineapplesetup.shmoves/tmp/.nemo-gymawaytask.jsonand uses the skillCodex:
--agent codex_agent, with...codex_agent.codex_version=0.144.4as its only override.Without a model: on
origin/main, Claude Code is refused with "does not support (skills_dir)". With skills plus anMCP server, Claude Code is refused for the MCP server only, and Codex under
task_mcp_grants=requiredpasses the seed(a stub MCP server saw
initializeandtools/list). An empty skills folder seeds, and Claude Code runs without--bare.Compatibility and benchmark impact
skills_dir.True, so other harnesses' replies are unchanged. An older Environment Serverforbids unknown seed keys and would reject every Claude Code and Codex seed reply, so they ship together. An older
Claude Code or Codex on a newer server is refused skills tasks as before.
--barefor a task that declares skills and keeps it for one that does not, so forSkillsBench-style comparisons set
bare: falseon both arms (documented).~/$path now fails the seed. Multi-step tasks with skills orMCP servers run one more
execper step. No new configuration knobs.The rollouts above ran before the merge with
mainat51630ce4f. After it, a combined branch of this PR with theother SkillEvaluator-related PRs on that
mainran SkillEvaluator's calculator, task-list and magic-mcp tasks: ClaudeCode's
Skilltool loaded the staged skill 7 times across the with-skill rows (baseline rows got "Unknown skill"),and Codex's skill listing named the staged
SKILL.mdin 8 of 8 with-skill rows and 0 of 8 baseline rows.Not tested: Codex with skills plus a real MCP server on this PR alone, a non-root
[agent].user, the full unitsuite after the merge, and the mini-SWE and Terminus suites.
Checklist
pre-commit run --all-files), before the last, docs-only commit.git commit -s).🤖 Generated with Claude Code