Skip to main content

Module parallel_edit

Module parallel_edit 

Source
Expand description

Active-dispatch fork sub-agent tool.

Replaces the prior PASSIVE flow where the agent loop parsed the model’s plan text, inferred edit intent via keyword soup, and dispatched fork sub-agents without asking. That design forced a brittle keyword gate, mis-fired on planning/exploration turns, and gave the model no way to reason about cross-file invariants (each sub-agent saw only its assigned file plus a 30-line skeleton of siblings).

With active dispatch, the model invokes parallel_edit_files as a tool when it judges parallel edit is the right move. The framework does no inference. The tool’s args carry:

  • files: [{path, instruction}, ...] — ≥2, ≤12
  • contract: "" — cross-file invariants (shared trait/type/interface contracts) injected verbatim into every sub-agent’s user message

Each sub-agent sees its own file content + the contract, runs through the existing SubAgentPool resilience layer, and returns a status row. After all settle, a build-marker probe (Cargo / npm / mvn / go) runs once to catch cross-file dep regressions; failures are surfaced verbatim so the model can fix without reverse-engineering.

Structs§

ParallelEditTool