Addressed in 12bacdf09 — added a one-shot `let cleaned = false` guard so `cleanup()` is idempotent across the `error`+`close` sequence, and also wrapped `spawn` in a try/catch so the temp dir is removed if spawn throws synchronously. Covered by new ask-ai tests (sandbox-removed-after-close, cleanup-one-shot, sync-throw-rejects).
