Repository navigation
feat(coding-agent): delete child sessions with their parent - #118
Merged
Issacboy123 merged 2 commits intoAug 28, 2026
Merged
Issacboy123 merged 2 commits into
Issacboy123 merged 2 commits into
Conversation
Pepps233
force-pushed
the
feat/delete-owned-subagent-sessions
branch
2 times, most recently
from
August 25, 2026 16:42
779a494 to
f847a7e
Compare
Pepps233
self-requested a review
August 25, 2026 16:44
Pepps233
approved these changes
Aug 25, 2026
Pepps233
left a comment
Contributor
There was a problem hiding this comment.
This is needed, thank you
Issacboy123
force-pushed
the
feat/delete-owned-subagent-sessions
branch
from
August 27, 2026 10:54
f847a7e to
90a3467
Compare
Issacboy123
force-pushed
the
feat/delete-owned-subagent-sessions
branch
from
August 27, 2026 23:11
90a3467 to
101a69e
Compare
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
Prevents saved child sessions from being left behind when their parent session is deleted. Diffex now moves the selected parent's child-session directory to trash before deleting the parent. It keeps the parent when child cleanup is unsafe or fails, and clearly reports when the child data was removed but the parent could not be deleted.
Reasoning
Deleting owned child data before the parent prevents an otherwise unreachable namespace from being orphaned. Deriving the target from the validated parent header, proving containment, and rejecting link-like components prevents deletion from escaping the selected parent's ownership boundary. Reusing the session selector's trash behavior keeps cleanup recoverable; failing closed before parent deletion preserves the user's entry point when child cleanup cannot be verified.
Changes
Testing
node ../../node_modules/vitest/dist/cli.js --run test/suite/subagent-persistence.test.ts test/suite/subagent-services.test.ts test/suite/subagent-registration.test.ts test/suite/agent-session-harness-version.test.ts test/session-manager/fork-branch.test.ts test/session-selector-path-delete.test.tsnpm run check