Support shared-policy multi-agent RL training on the context-compaction capture path
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start by reading the linked NeMo-RL and NeMo-Gym context-compaction work in PRs #4124 and #3368, then compare the ancestry and shared-ancestor ideas in RL #4285. Use the acceptance criteria as the completion target: deterministic multi-context reconstruction, complete call accounting, once-only eligible-action loss, correct GRPO ownership, and a learner update containing worker actions.
Written by the indexing model from the issue text.
Description
Need
Agent harnesses can delegate work to subagents with independent contexts. Training only the parent omits the workers’ generated actions. Training both requires reconstructing each agent’s actual conditioning, assigning loss to the intended actions, and keeping every training row associated with the task attempt that produced its reward.
Support both parent-only and parent-plus-worker training with one shared policy. Each agent may compact its context independently.
Foundation
Build on:
These changes already separate one logical rollout from its physical training rows, capture actual generation tokens and model inputs, verify continuation versus context rewrite, identify accepted generations, and preserve rollout-level reward/advantage semantics.
Multi-agent support should generalize that path. Harnesses retain responsibility for delegation, communication, scheduling, and compaction; NeMo-RL owns training reconstruction.
Proposed approach
- Identify accepted and training-eligible calls across agents. Extend shared ingestion to handle multiple sessions through ordinary outputs and stable call references. Distinguish accepted actions from retries, discarded branches, and auxiliary calls.
- Reconstruct a forest of contexts. Replace sequential segment grouping with traversal of verified parent links. Find endpoints among selected calls and reconstruct their ancestry. Support independent roots, interleaved continuations, compaction, and shared-prefix branches.
- Preserve unique action ownership. Shared ancestors may appear as conditioning in several rows, but each eligible generation receives loss exactly once. Worker answers inserted into the parent’s context remain masked observations.
- Enable concurrent capture. Replace the attempt-wide sequential admission restriction with independent context reservations and per-call accounting. Preserve checks for ambiguous ancestry, stale continuations, and unresolved acknowledgements.
- Close the whole episode safely. Reconcile admitted calls before publishing rows or cleaning up staging. A parent response finishing must not silently discard outstanding worker calls.
- Reuse logical-owner training. All physical rows retain their task’s ownership. Compute one reward contribution per logical rollout in GRPO and distribute its advantage to eligible actions.
Initial scope and milestones
- Establish a parent-only baseline using an existing harness.
- Add deterministic reconstruction tests for multiple contexts and shared ancestors.
- Qualify concurrent capture, delayed results, cancellation, and episode closure.
- Demonstrate parent-plus-worker training with OpenCode.
- Qualify a second harness, such as LangGraph, to test the generality of the integration.
- Exercise compaction within a worker and preserve existing single-agent/CC behavior.
Initial scope is one shared trainable policy and one task-level reward. Separate policies, agent-specific credit assignment, and decoder prefix-sharing optimizations can follow independently.
Acceptance criteria
A controlled episode should include a parent, two overlapping workers, parent resumption, reversed worker completion order, and compaction in one worker. Verify:
- Exact conditioning, captured tokens, masks, and behavior logprobs.
- Complete accounting of admitted calls.
- Once-only loss for eligible actions.
- One logical-rollout contribution to the GRPO baseline.
- Loss/gradient agreement with an independently constructed per-call reference.
- A real learner update containing worker actions.
Related work
RL #4285 provides relevant ancestry traversal and shared-ancestor masking. Adapt those ideas to CC’s accepted-call selection and logical-owner machinery.
RL #4286 addresses shared-prefix computation and can remain a separate optimization.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 612
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 267
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA-NeMo/RL
-
bbox_giou_reward is unbounded: reversed-corner or NaN boxes score far above 1 (RefCOCO env)Possibly taken @jimmy-holdout claimed this 3 days ago. Openbug community-request
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
NVIDIA-NeMo/RL#4871 ·
Maintainers usually reply within 2 days
-
Use Gym’s exported server-type keysPossibly taken @kwistzzqq-byte claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA-NeMo/RL#4800 ·
Maintainers usually reply within 2 days
-
r0.8.0: pyrefly rejects captured optional config in make_policy_factory, blocking CIPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA-NeMo/RL#4599 ·
Maintainers usually reply within 2 days
-
Feature
Difficulty 2/5 Half a day Newbie friendliness 78/100
NVIDIA-NeMo/RL#4016 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA-NeMo/RL#2948 ·
Maintainers usually reply within 2 days
Similar issues
-
Link Checker ReportOpenautomated issue linkchecker report
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
QuantEcon/lecture-python.myst#1098 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
podly-pure-podcasts/podly_pure_podcasts#279 ·
Maintainers usually reply within 1 day
-
template-proposal
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
OpenShot/openshot-qt#6230 ·
Maintainers usually reply within 1 day