When the orchestrator async thread crashes or dies, there is no notification to the user and no error logging. The subprocess becomes a zombie and the user never knows what happened.
1. Orchestrator spawns pi-code.sh subprocess 2. pi-code.sh runs pi and completes successfully 3. Subprocess exits but becomes zombie (parent didn't wait) 4. No Telegram notification of completion or failure 5. User left wondering what happened
The Async.async thread that runs the orchestrator can die silently. Even with try/catch inside, if something goes wrong between spawning and the try block, or if there's an async exception, it won't be caught.
1. Wrap entire async body in try/catch with logging 2. Use Async.withAsync or link the async to ensure exceptions propagate 3. Add finally block to always unregister and notify on exit 4. Add periodic heartbeat logging so we can see the thread is alive