Give spawn_agent worktree, allowlist, and nested spawn - #684
Merged
Conversation
TheGreatAxios
force-pushed
the
fleet-spawn-parity
branch
from
August 25, 2026 14:52
1f243e4 to
606a86a
Compare
TheGreatAxios
force-pushed
the
fleet-send-input
branch
2 times, most recently
from
August 25, 2026 16:02
0aa128b to
99c8780
Compare
TheGreatAxios
force-pushed
the
fleet-spawn-parity
branch
from
August 25, 2026 16:03
032bfb3 to
61ef1d0
Compare
spawn_agent could not isolate a cwd, honor a parent spawn matrix, or mount fleet verbs on maySpawn directors. Those gaps kept task() as the only complete dispatch path. spawn_agent now carries the same isolation and spawn-matrix surface for closed directors.
task() correlated Agents-strip progress with the parent tool call by using that call id as the session id. spawn_agent minted a fresh id, so a task() wrapper would break that correlation.
A retained or interrupt_agent keep-alive session still needs its cwd for followup_task. Cleaning the worktree in the run's finally removed that path too early; reclaim it from the close handle instead, matching run.ts's persisting gate.
TheGreatAxios
force-pushed
the
fleet-spawn-parity
branch
from
August 25, 2026 16:11
61ef1d0 to
05ad41f
Compare
TheGreatAxios
added a commit
that referenced
this pull request
Aug 27, 2026
* Give spawn_agent worktree, allowlist, and nested spawn spawn_agent could not isolate a cwd, honor a parent spawn matrix, or mount fleet verbs on maySpawn directors. Those gaps kept task() as the only complete dispatch path. spawn_agent now carries the same isolation and spawn-matrix surface for closed directors. * Reuse the parent tool call id as the spawn session id task() correlated Agents-strip progress with the parent tool call by using that call id as the session id. spawn_agent minted a fresh id, so a task() wrapper would break that correlation. * Defer spawn_agent worktree cleanup while the session is retained A retained or interrupt_agent keep-alive session still needs its cwd for followup_task. Cleaning the worktree in the run's finally removed that path too early; reclaim it from the close handle instead, matching run.ts's persisting gate.
TheGreatAxios
added a commit
that referenced
this pull request
Aug 27, 2026
* Give spawn_agent worktree, allowlist, and nested spawn spawn_agent could not isolate a cwd, honor a parent spawn matrix, or mount fleet verbs on maySpawn directors. Those gaps kept task() as the only complete dispatch path. spawn_agent now carries the same isolation and spawn-matrix surface for closed directors. * Reuse the parent tool call id as the spawn session id task() correlated Agents-strip progress with the parent tool call by using that call id as the session id. spawn_agent minted a fresh id, so a task() wrapper would break that correlation. * Defer spawn_agent worktree cleanup while the session is retained A retained or interrupt_agent keep-alive session still needs its cwd for followup_task. Cleaning the worktree in the run's finally removed that path too early; reclaim it from the close handle instead, matching run.ts's persisting gate.
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
spawn_agenthonors a parent spawn allowlist and refusesskywalker.maySpawndirector is launched withnestedDispatchso it can spawn its allowlisted children.useWorktreeisolates the worker cwd the same waytask()does, and fails closed when the dispatcher is not a git repo.Verification
bun run typecheck,bun run build, andbun run testpass