feat: coordinate isolated subagent dispatch#670
Merged
Conversation
nikolap
force-pushed
the
feat/subagent-dispatch-strategy
branch
from
July 16, 2026 06:39
56401ce to
2255982
Compare
added 2 commits
July 16, 2026 07:08
- attach_handle no longer re-inserts a handle for a task that already finished (notify races ahead of attach on a multi-thread runtime), which was leaking phantom running slots and wedging the 4/4 cap. - A panic or early return in a coordinated subagent closure now marks the task Failed via a drop guard (notify_if_running) instead of leaving it stuck Running forever and stalling the batch barrier. - cancel_all reports retained (dirty/committed) writer worktree paths and branches before dropping coordinator state, so salvaged work isn't orphaned without a pointer.
…rent writers Worktree write-isolation only confines the writer's shell when a real OS sandbox (bwrap) is active; without it (macOS / sandbox off) the writer's bash could escape the worktree via ../ or absolute paths. Gate worktree isolation on Sandbox::confines_writes() — an explicit Worktree mode errors, Auto falls through to a serialized parent-checkout run. A serialized writer running in the parent checkout is now refused when that checkout is dirty (it would clobber the user's uncommitted work via edits / git add -A). Covers both the gated-off path and the auto-fallback after a failed worktree creation. Docs updated to match.
Collaborator
|
Reviewed and merging. Thanks @nikolap — the core design is solid: file-tool isolation via I pushed two fix commits addressing issues the review found: Coordination robustness
Isolation + data-loss
Deferred as follow-ups (filed internally): worktree writers not honoring profile |
allen-munsch
pushed a commit
to allen-munsch/dirge
that referenced
this pull request
Jul 18, 2026
Defer the critic on a parent turn waiting for coordinated subagents, and normalize blank task retry ids (dirge-code#679). Also backfill CHANGELOG: coordinated subagent dispatch (dirge-code#670) under 0.19.10 and the OpenCode reasoning fix (dirge-code#671) under 0.19.9, which shipped but weren't recorded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds coordinated subagent dispatch with optional worktree isolation for read-write subagents, plus the lifecycle hardening identified during review. Resolves #660
readonlyandreadwriteagent profiles.automode warns and serializes writers in the parent checkout.docs/subagent-dispatch-strategy.md.Validation