Skip to content

fix(tier3): make native NeMo Gym Claude Code runs reach the policy model and discover skills - #581

Merged
chrisknvidia merged 4 commits into
mainfrom
fix/christopherk/nemo-gym-claude-code-config
Nov 15, 2026
Merged

chrisknvidia merged 4 commits into
mainfrom
fix/christopherk/nemo-gym-claude-code-config

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

skillevaluator tier3 evaluate --backend nemo-gym --agents claude-code failed in both arms before any model call. Gym's claude_code_agent template requires anthropic_api_key, and the adapter never set it. tier3 doctor still passed:

Error: Config value
'harbor_with_agent.responses_api_agents.claude_code_agent.anthropic_api_key'
references 'anthropic_api_key', which is not set after merging.

With that key set, the template's other defaults still sent Claude Code to a direct provider route instead of Gym's policy model server. They also left the runtime version unpinned and kept bare: true, which turns off native skill discovery, so the with-skill arm could not see the skill.

For claude-code only, gym_eval_command now passes these overrides:

  • anthropic_api_key=EMPTY: a placeholder. In model-server mode Gym uses its own dummy client credential, and the policy key stays in the model-server environment.
  • model_server set to policy_model, and model set to the selected policy model.
  • bare=false.
  • claude_code_version pinned to the same version Harbor uses (PINNED_RUNTIME_VERSIONS["claude-code"]).

Gym gives Claude Code a private CLAUDE_CONFIG_DIR, so stage_for_gym also copies the staged skills into <workdir>/.claude/skills/ in the task image. The baseline image gets the same copy, which holds no target skill.

Scenario Before After
--backend nemo-gym --agents claude-code, paired run Both arms fail before any model call; 0/4 attempts scored 4/4 attempts scored, all verifiers exit 0
With-skill skill discovery Off (bare: true, private config dir) On; the trajectory shows a Skill tool call to the staged skill

Verification

  • pytest tests/test_nemo_gym_backend.py tests/test_nemo_gym_main_integration.py tests/cli/test_nemo_gym_autopilot_preflight.py -q: 193 passed

  • ruff check and ruff format --check on the changed files: pass

  • Live paired run on Gym built from NVIDIA-NeMo/Gym@792fa142f58277aecff05d402061d647e9a92acf (reports 0.7.0rc0), Docker sandbox, calculator reference skill, 2 cases × 1 attempt: execution_status: succeeded, 4/4 scored, both arms' rollouts.jsonl present, verifier artifacts collected.

  • make lint, make build: pass

  • make test (full suite, 4 workers): 33,353 passed, 89 skipped, 48 failed. The same 48 tests fail on unmodified main in this environment (local LLM-client, plugin-dependency and secure-fs tests unrelated to Gym), so this change does not cause them.

  • I am familiar with the Contributing Guidelines

  • Added or updated focused tests

  • Updated documentation for user-visible changes

  • Ran make lint

  • Ran make test

  • Ran make build

  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Devin Review

Supply the model-server placeholder required by the Claude agent template, reuse the pinned runtime version, and enable project skill discovery in both arms despite isolated Claude configuration directories. Add regression coverage for command credentials and paired skill projections.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Override the Claude template's direct-provider defaults so the sandbox uses the configured Gym model server and selected policy model rather than an external credential route.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
@chrisknvidia
chrisknvidia merged commit d0113bd into main Nov 15, 2026
27 checks passed
@chrisknvidia
chrisknvidia deleted the fix/christopherk/nemo-gym-claude-code-config branch November 15, 2026 04:23
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.

1 participant