Skip to content

feat(examples): add Claude Code subagent training recipe - #5113

Open
aroshanghias-nvd wants to merge 3 commits into
mainfrom
aroshanghias/claude-subagent-example-20261106
Open

aroshanghias-nvd wants to merge 3 commits into
mainfrom
aroshanghias/claude-subagent-example-20261106

Conversation

@aroshanghias-nvd

@aroshanghias-nvd aroshanghias-nvd commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
  • I, the PR author, have personally reviewed every line of this PR.

What and why

Add a runnable coordinator/child training example using Gym's existing Claude Code harness, a local Nano Omni model, the existing math verifier, and eight bundled synthetic arithmetic tasks. all_captured trains coordinator and child calls with a shared rollout reward; zero lookahead keeps the numerical validation on-policy.

The PR contains configuration, agent profiles, public synthetic data, instructions, and a guide link. It adds no RL production code, harness implementation, dependency pin, or lockfile change. The local subprocess sandbox is intended for these trusted bundled tasks. Background execution, forced compaction, and agent-specific rewards are outside the demonstrated scope.

Refreshed against main after #5432: preserve main's guide changes, use the current token_capture.forest.enabled and .selection_policy keys, and remove the obsolete requirement to patch Gym separately.

Issues

Companion Gym compatibility work: #5771, now included in RL through #5432. Related worker safety/prefix-reuse improvement: #5138.

Convergence / perf / functionality proof

On refreshed head c818878d5, the recipe resolves and passes MasterConfig and SingleController configuration validation against the current forest schema. All eight arithmetic reference answers were independently checked, and Gym YAML/settings parsing passed. W&B remains enabled and the recipe still requests 20 steps. A paired focused run also passed 292 RL CPU regressions plus the new two-turn Messages capture integration test against pinned Gym 91666f9. These checks use the prepared environment (retaining its source/dependency fingerprint warning); no new 20-step training run is claimed.

Earlier paired GPU validation used RL 95095b7124f9b2526c12be772b04fac918ba0a47 and Gym 5911d628c744d0bf43fe1d9ddf3bda72d59b0f9a plus the companion fixes:

  • 20 steps, including 12 nonzero updates and 80 successful rollouts.
  • 357 captured calls, including 175 child calls used in training; 23,785 generated tokens counted exactly once.
  • Raw aggregate TMPE 1.00459, maximum whole-rollout TMPE 1.01936, zero policy lag, and zero numerically masked rows.
  • Maximum physical-row TMPE was 1.16357; the 1.05 masking threshold applies to the token-weighted whole-rollout error, not an individual row maximum.
  • The original audit encountered a deleted temporary child-output symlink. A corrected audit passed separately on the same saved tensors, lineage, and persistent native observations; training was not repeated for audit recovery.

The example README records the setup, topology, qualification evidence and limits. The current-main refresh is not a repeat of that earlier 20-step GPU run.

Needs upstream changes

No additional Gym changes: main's pin now contains #5771 through #5432. This PR leaves the pin and lockfile unchanged.

#5138 adds safety checks and captured-prefix reuse for late system updates; without its gate, Gym starts a new context root for such a suffix. It can be reviewed separately from these example assets.

@copy-pr-bot

copy-pr-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Nov 6, 2026
@terrykong terrykong removed the Documentation Improvements or additions to documentation label Nov 28, 2026
@aroshanghias-nvd
aroshanghias-nvd force-pushed the aroshanghias/claude-subagent-example-20261106 branch from da2d919 to c818878 Compare December 4, 2026 02:15
@github-actions github-actions Bot added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Dec 4, 2026
@aroshanghias-nvd
aroshanghias-nvd marked this pull request as ready for review December 4, 2026 02:16
@svcnvidia-nemo-ci svcnvidia-nemo-ci added complexity:medium Moderate change. Set by Autobot PR classify (skills/pr-classify) convergence-risk:medium May change training results. Set by Autobot PR classify (skills/pr-classify) proof:convergence Needs convergence proof (W&B runs). Set by Autobot PR classify (skills/pr-classify) proof:perf Needs performance proof. Set by Autobot PR classify (skills/pr-classify) labels Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) complexity:medium Moderate change. Set by Autobot PR classify (skills/pr-classify) convergence-risk:medium May change training results. Set by Autobot PR classify (skills/pr-classify) proof:convergence Needs convergence proof (W&B runs). Set by Autobot PR classify (skills/pr-classify) proof:perf Needs performance proof. Set by Autobot PR classify (skills/pr-classify)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants