Session-scoped log file management for CLI runs.
@spec with_session_log(String.t() | nil, (-> term())) :: term()