Skip to content

fix: close child subagents on shutdown#46

Open
interpreteragent wants to merge 1 commit into
HazAT:mainfrom
interpreteragent:fix/subagent-shutdown-cleanup
Open

fix: close child subagents on shutdown#46
interpreteragent wants to merge 1 commit into
HazAT:mainfrom
interpreteragent:fix/subagent-shutdown-cleanup

Conversation

@interpreteragent
Copy link
Copy Markdown
Contributor

@interpreteragent interpreteragent commented May 2, 2026

Summary

  • Close and abort tracked subagents during session_shutdown, while tolerating individual close failures.
  • Track launch/resume surfaces early and cleanly reject them if shutdown starts mid-launch.
  • Add targeted regression coverage for shutdown cleanup and launch-race cleanup.

Verification

  • Targeted committed tests passed for session_shutdown cleanup and launch/shutdown race handling.
  • Non-disruptive mocked bulk validation passed: 30 tracked subagents closed/aborted, close failures tolerated, running map cleared, and late launch surfaces closed/rejected.
  • Source-order validation passed: launch surfaces are registered before the shell-ready wait, and session_shutdown invokes cleanup.
  • Diff hygiene checked: PR touches only pi-extension/subagents/index.ts and test/test.ts; whitespace checks passed.
  • npm test and npm run test:integration are blocked before execution by the existing Node .ts loader issue, ERR_UNKNOWN_FILE_EXTENSION.
  • No real manual multi-pane shutdown was run; real multiplexer closure was intentionally not exercised.

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