Problem
The current ForgePairNode processes workers sequentially within its batch. Even though the registry defines multiple worker slots (e.g. forge-1, forge-2), only one worker runs at a time. The batch loop in ForgePairNode::post_batch iterates workers but awaits each pair lifecycle to completion before starting the next.
Expected Behaviour
When NEXUS assigns multiple tickets, all available FORGE workers should run in parallel — each in its own worktree with its own SENTINEL — so that the total throughput scales with the number of workers.
Suggested Approach
- Use
tokio::join! or futures::join_all to run multiple ForgeSentinelPair::run() calls concurrently inside the batch handler.
- Ensure each pair's
WorkspaceManager and ProcessManager are independent (they already are per the current design).
- Consider a configurable max-concurrency limit to avoid resource exhaustion.
Related Code
crates/agent-forge/src/lib.rs — ForgePairNode::post_batch (the sequential loop)
crates/pair-harness/src/pair.rs — ForgeSentinelPair::run (the per-worker lifecycle)
.agent/registry.json — worker slot definitions
Problem
The current
ForgePairNodeprocesses workers sequentially within its batch. Even though the registry defines multiple worker slots (e.g.forge-1,forge-2), only one worker runs at a time. The batch loop inForgePairNode::post_batchiterates workers but awaits each pair lifecycle to completion before starting the next.Expected Behaviour
When NEXUS assigns multiple tickets, all available FORGE workers should run in parallel — each in its own worktree with its own SENTINEL — so that the total throughput scales with the number of workers.
Suggested Approach
tokio::join!orfutures::join_allto run multipleForgeSentinelPair::run()calls concurrently inside the batch handler.WorkspaceManagerandProcessManagerare independent (they already are per the current design).Related Code
crates/agent-forge/src/lib.rs—ForgePairNode::post_batch(the sequential loop)crates/pair-harness/src/pair.rs—ForgeSentinelPair::run(the per-worker lifecycle).agent/registry.json— worker slot definitions