Sangho implemented similar but more advanced recycling for sessions ids in the optee shim. Maybe we can move this kind of code to some common crate? _Originally posted by @wdcui in https://github.com/microsoft/litebox/pull/663#discussion_r2801482013_