Repository navigation
feat(coding-agent): add durable subagent state storage - #120
Merged
Merged
Conversation
Pepps233
force-pushed
the
feat/persist-subagent-state
branch
from
August 25, 2026 14:36
92dfa94 to
db07c97
Compare
Pepps233
approved these changes
Aug 25, 2026
Issacboy123
force-pushed
the
feat/persist-subagent-state
branch
from
August 27, 2026 10:54
db07c97 to
45aaa94
Compare
Issacboy123
force-pushed
the
feat/persist-subagent-state
branch
from
August 27, 2026 23:11
45aaa94 to
3b34cb7
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
This PR lays the storage groundwork for subagents to survive when a saved parent session is closed and reopened. It gives each parent a safe place for child histories and records which subagents belong to the currently selected session branch. It also validates saved data so one damaged or conflicting child record does not prevent other children from being recovered later.
Reasoning
Storing complete snapshots as reserved parent-session entries reuses existing JSONL branch semantics and lets the newest entry, including an empty reset barrier, fully mask older state. Keeping child files beneath a parent-owned namespace prevents them from appearing in normal session discovery, while independent record validation allows usable siblings to survive corrupt or conflicting data. The child-header durability seam remains internal because it exists only to support dependent work admission.
Changes
diffex.subagentsroster codec with strict field validation and additive-field tolerance.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