pollForCompletion exited immediately when session went idle before agent created TODOs or registered children (0 todos + 0 children = vacuously complete). Add consecutive stability checks (3x500ms debounce) and currentTool guard to prevent premature exit. Extract pollForCompletion to dedicated module for testability.