diff options
| author | JJ Liebig <jonathan.liebig@gmail.com> | 2026-09-12 15:52:18 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-12 13:52:18 +0200 |
| commit | a5d5f6f654a32b27b2bd4dd8edd82f6795359269 (patch) | |
| tree | 0b54a0fb4c1a136dff8224de617c8403756df19a /src/integration/assets/omp | |
| parent | cc36a2943e85134768631d6d289e331c0edb940d (diff) | |
fix: ignore nested OMP session reports (#3994)
refs #2593
Diffstat (limited to 'src/integration/assets/omp')
| -rw-r--r-- | src/integration/assets/omp/herdr-agent-state.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/integration/assets/omp/herdr-agent-state.ts b/src/integration/assets/omp/herdr-agent-state.ts index 0e493787..fce62106 100644 --- a/src/integration/assets/omp/herdr-agent-state.ts +++ b/src/integration/assets/omp/herdr-agent-state.ts @@ -2,7 +2,7 @@ // managed by herdr; reinstalling or updating the integration overwrites this file. // add custom hooks/plugins beside this file instead of editing it. // HERDR_INTEGRATION_ID=omp -// HERDR_INTEGRATION_VERSION=9 +// HERDR_INTEGRATION_VERSION=10 // @ts-nocheck import net from "node:net"; @@ -14,9 +14,13 @@ const socketEndpoint = process.platform === "win32" && socketPath ? `\\\\.\\pipe\\${socketPath}` : socketPath; const paneId = process.env.HERDR_PANE_ID; const source = "herdr:omp"; +// OMP marks every shell it spawns with OMPCODE=1. A nested `omp` launched from +// a parent session's shell inherits it, so that process is not the pane's root +// agent and must not report its short-lived session over the parent's. +const nestedOmpSession = process.env.OMPCODE === "1"; function enabled() { - return HERDR_ENV === "1" && !!socketPath && !!paneId; + return HERDR_ENV === "1" && !!socketPath && !!paneId && !nestedOmpSession; } let requestQueue = Promise.resolve(); |
