Skip to content

Harden subagent resource cleanup - #323

Merged
yottadynamics merged 5 commits into
mainfrom
worktree-bright-diving-yak
Sep 10, 2026
Merged

yottadynamics merged 5 commits into
mainfrom
worktree-bright-diving-yak

Conversation

@yottadynamics

Copy link
Copy Markdown
Owner

Summary

Hardens long-running subagent and verification sessions against PID exhaustion, unsafe Go scratch paths, cache ownership drift, and incomplete process cleanup.

  • Adds container init/reaping and bounded descendant cleanup.
  • Fixes dispatch cancellation lifecycle races and background-worker admission checks.
  • Unifies Go scratch/cache environment handling across tests, shell execution, and LSP.
  • Adds typed resource-health failures, doctor diagnostics, and concise non-retryable verification errors.
  • Improves LSP process cleanup and documents recovery guidance.

Testing

  • GOMAXPROCS=1 go test -p=1 ./internal/subagents — passed.
  • git diff --check — passed.
  • Full verification was blocked by the pre-existing session PID exhaustion: fork/exec ... resource temporarily unavailable and newosproc failures. The PR should be revalidated in a fresh session/container.

Notes

The implementation includes regression and integration coverage for dispatch cleanup, execution environments, resource classification, sandbox behavior, cache paths, and process termination.

@yottadynamics
yottadynamics merged commit b03104a into main Sep 10, 2026
13 checks passed
@yottadynamics
yottadynamics deleted the worktree-bright-diving-yak branch September 10, 2026 04:59
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