Skip to content

Terminate complete stack process trees during tool indexing #17

Description

@rudijetson

Problem

Tool discovery can return after signaling only the direct stack process. An uncooperative wrapper or descendant MCP server can survive a successful discovery or timeout, leaving stale index process trees behind.

Scope

  • launch POSIX stack servers in dedicated process groups
  • converge success, error, exit, and timeout paths on one bounded cleanup routine
  • close RPC resources, terminate the complete process group, wait, and escalate when needed
  • validate timing options and handle invalid or already-exited child PIDs safely
  • add behavior-level process-tree tests

Acceptance

  • success returns only after parent and descendants exit
  • timeout returns only after parent and descendants exit
  • focused and full CLI tests pass
  • generated bundle is reproducible
  • debt scan, package dry run, and diff checks pass

The Admin Mac already proved the runtime behavior in docs/swe-compliance/2026-08-06-admin-mac-rudi-cleanup.md; this issue publishes the source repair on the current CLI stack.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions