Please expose a variable inside pipelines, which will have a reference to the parent pipeline, if it's present. Some logic inside a pipeline can be different depending on whether a pipeline is a part of a pipeline chain. Currently it's possible to check this via Harness API "Fetch execution details" call, there's the parentStageInfo property. It would be better to avoid calling the API for this from within a running pipeline.