ShellToolMiddleware leaks subprocess and temp directory when agent is interrupted and never reaches after_agent
ShellToolMiddleware creates a persistent shell subprocess, reader threads, and optionally a temp directory in before_agent, but only cleans them up in after_agent. On interrupt paths (HITL, GraphBubbleUp, checkpointer pause, worker crash, or abandoned thread), after_agent is never called, and the live resources remain referenced in checkpointed state, preventing garbage collection and weakref.finalize cleanup. This leads to zombie processes, leaked temp directories, and orphaned shells accepting commands.