fn ensure_thread_scope( state: &SessionState, actual: &str, ) -> Result<(), CodexAppServerProtocolError>