Remove same-cwd spawn refusal; bound fleetRecords memory - #617
Merged
Conversation
TheGreatAxios
enabled auto-merge (squash)
August 24, 2026 10:10
CL-6992: delete the write-lane refusal on spawn_agent — multiple agents in one worktree is allowed by design, and the refusal was guarding against self-resolving churn, not corruption. CL-6990: bound fleetRecords' in-memory reports. Past MAX_FLEET_RECORDS, the oldest already-collected report is compacted to a status-only tombstone pointing at read_agent_trace, never evicting an uncollected report ahead of a collected one.
TheGreatAxios
force-pushed
the
cl-6992-remove-spawn-agents-same-cwd-refusal
branch
from
August 24, 2026 10:30
ee3dbad to
8d3d623
Compare
TheGreatAxios
added a commit
that referenced
this pull request
Aug 27, 2026
CL-6992: delete the write-lane refusal on spawn_agent — multiple agents in one worktree is allowed by design, and the refusal was guarding against self-resolving churn, not corruption. CL-6990: bound fleetRecords' in-memory reports. Past MAX_FLEET_RECORDS, the oldest already-collected report is compacted to a status-only tombstone pointing at read_agent_trace, never evicting an uncollected report ahead of a collected one.
TheGreatAxios
added a commit
that referenced
this pull request
Aug 27, 2026
CL-6992: delete the write-lane refusal on spawn_agent — multiple agents in one worktree is allowed by design, and the refusal was guarding against self-resolving churn, not corruption. CL-6990: bound fleetRecords' in-memory reports. Past MAX_FLEET_RECORDS, the oldest already-collected report is compacted to a status-only tombstone pointing at read_agent_trace, never evicting an uncollected report ahead of a collected one.
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_agentno longer refuses a second concurrent implement-intent spawn against the same cwd — multiple agents working in one worktree is allowed by design. Removed the write-laneMap<cwd, Set<agentId>>, the refusal, and its three tests.concurrent-lane-overlapin task-tool.ts is untouched.fleetRecordsnow caps in-memory report payloads atMAX_FLEET_RECORDS(200). Past the cap, the oldest already-collected report is compacted to a status-only tombstone namingread_agent_tracefor recovery; an uncollected report is never evicted ahead of a collected one.Test plan
bun test src/subagent/agent-fleet.test.tsbun run check(lint, typecheck, build, full test suite) — all greenNote: CL-6943 (session persistence / close_agent / resume_agent) also touches agent-fleet.ts and session-store.ts — expect a rebase; flag if retention semantics need reconciling.