Skip to content

Give spawn_agent worktree, allowlist, and nested spawn - #684

Merged
TheGreatAxios merged 3 commits into
mainfrom
fleet-spawn-parity
Aug 25, 2026
Merged

Give spawn_agent worktree, allowlist, and nested spawn#684
TheGreatAxios merged 3 commits into
mainfrom
fleet-spawn-parity

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • spawn_agent honors a parent spawn allowlist and refuses skywalker.
  • A maySpawn director is launched with nestedDispatch so it can spawn its allowlisted children.
  • useWorktree isolates the worker cwd the same way task() does, and fails closed when the dispatcher is not a git repo.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • New tests cover skywalker refusal, allowlist, nestedDispatch, allowOrchestrator false, and worktree isolation

@TheGreatAxios
TheGreatAxios changed the base branch from main to fleet-send-input August 25, 2026 14:52
@TheGreatAxios
TheGreatAxios force-pushed the fleet-send-input branch 2 times, most recently from 0aa128b to 99c8780 Compare August 25, 2026 16:02
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
TheGreatAxios changed the base branch from fleet-send-input to main August 25, 2026 16:11
@TheGreatAxios
TheGreatAxios merged commit aaf61de into main Aug 25, 2026
6 of 10 checks passed
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.
@TheGreatAxios
TheGreatAxios deleted the fleet-spawn-parity branch August 28, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant