When you have a parent process and a sub process connected by CallActivity, there would be a situation where a sub process is completed but its parent process is alive. If you execute LogCleanupCommand at that time, it will delete sub process's logs. But usually it's not expected from users. Users want to keep sub process's logs until its parent process (finally, its root parent) is completed.
It would be good to have a parameter switch like "SkipTaskLog". I think default should be "don't delete while parent is alive"