fn ensure_scopes(
state: &SessionState,
thread_id: &str,
turn_id: &str,
) -> Result<(), CodexAppServerProtocolError>fn ensure_scopes(
state: &SessionState,
thread_id: &str,
turn_id: &str,
) -> Result<(), CodexAppServerProtocolError>