Skip to content

feat(coding-agent): restore persisted subagent sessions - #114

Merged
Issacboy123 merged 2 commits into
feat/persist-subagent-lifecyclefrom
feat/restore-persistent-subagents
Aug 28, 2026
Merged

Issacboy123 merged 2 commits into
feat/persist-subagent-lifecyclefrom
feat/restore-persistent-subagents

Conversation

@Issacboy123

Copy link
Copy Markdown
Contributor

Summary

This PR makes saved subagents available again when their parent session is reopened. Finished children return with their recorded results, and children that were still working return as interrupted so users can decide whether to wake them. Reopening remains passive: it does not call a provider, restart work, replay the original task, or deliver an old result again.

This PR is stacked on feat/persist-subagent-lifecycle, which records child histories, lifecycle snapshots, and captured runtime configuration.

Reasoning

Lazy child-session opening keeps parent restoration passive and prevents startup from replaying work. Binding failures to the affected child preserves valid siblings and exposes actionable warnings through the existing runtime-diagnostic path. Wake-time configuration is selected as one complete unit—captured configuration when fully usable, otherwise current parent configuration—to avoid unsupported combinations of models, thinking levels, tools, and harness state.

Changes

  • Restored terminal records and mapped persisted queued or running records to interrupted without starting provider work.
  • Validated child identity and leaf references during restoration and isolated missing, corrupt, duplicate, forked, or imported histories without blocking valid siblings.
  • Opened saved histories lazily on explicit wake and created wake-only replacement sessions for isolated children without replaying the original task.
  • Restored complete captured runtime configuration when usable and applied one complete parent-configuration fallback with a warning otherwise.
  • Preserved captured harness revisions through the provider request for restored children.
  • Added focused restoration, lazy-wake, replacement, diagnostics, configuration-fallback, fork, and import coverage.

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.ts
  • npm run check

@Issacboy123 Issacboy123 added enhancement New feature or request coding-agent labels Aug 25, 2026
@Issacboy123 Issacboy123 self-assigned this Aug 25, 2026
@Pepps233
Pepps233 force-pushed the feat/restore-persistent-subagents branch from 37f6478 to 7543aaf Compare August 25, 2026 14:36
@Pepps233
Pepps233 self-requested a review August 25, 2026 15:07
@Issacboy123
Issacboy123 force-pushed the feat/restore-persistent-subagents branch from 7543aaf to 6af4226 Compare August 27, 2026 10:54
@Issacboy123
Issacboy123 force-pushed the feat/restore-persistent-subagents branch from 6af4226 to 578abbc Compare August 27, 2026 23:11
@Issacboy123
Issacboy123 merged commit 22f6ae5 into main Aug 28, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coding-agent enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants