aboutsummaryrefslogtreecommitdiff
path: root/src/integration/assets/codex/herdr-agent-state.ps1
diff options
context:
space:
mode:
authorJJ Liebig <jonathan.liebig@gmail.com>2026-07-28 03:13:35 +0200
committerGitHub <noreply@github.com>2026-07-28 04:13:35 +0300
commit1491b7dd9c992ef0ad2b763f3e450befaf25c47f (patch)
treec2dac451236c0f59c34f8d850ef042d41bb6f32f /src/integration/assets/codex/herdr-agent-state.ps1
parentb499e611b6a983ce6077da555ad55c1fd58b1387 (diff)
fix: ignore nested codex session reports (#1927)
* fix: ignore nested codex session reports refs #1789 * test: cover matching codex thread id --------- Co-authored-by: Can Celik <ogulcancelik@gmail.com>
Diffstat (limited to 'src/integration/assets/codex/herdr-agent-state.ps1')
-rw-r--r--src/integration/assets/codex/herdr-agent-state.ps14
1 files changed, 3 insertions, 1 deletions
diff --git a/src/integration/assets/codex/herdr-agent-state.ps1 b/src/integration/assets/codex/herdr-agent-state.ps1
index d837b78a..b578e7b9 100644
--- a/src/integration/assets/codex/herdr-agent-state.ps1
+++ b/src/integration/assets/codex/herdr-agent-state.ps1
@@ -2,7 +2,7 @@
# managed by herdr; reinstalling or updating the integration overwrites this file.
# add custom hooks beside this file instead of editing it.
# HERDR_INTEGRATION_ID=codex
-# HERDR_INTEGRATION_VERSION=6
+# HERDR_INTEGRATION_VERSION=7
param([string]$Action = "")
@@ -21,6 +21,8 @@ if ($payload.hook_event_name -and $payload.hook_event_name -ne "SessionStart") {
$sessionId = $payload.session_id
if ([string]::IsNullOrWhiteSpace($sessionId)) { exit 0 }
+if ([string]::IsNullOrWhiteSpace($payload.transcript_path)) { exit 0 }
+if (-not [string]::IsNullOrWhiteSpace($env:CODEX_THREAD_ID) -and $env:CODEX_THREAD_ID -ne $sessionId) { exit 0 }
$seq = [DateTimeOffset]::UtcNow.ToUnixTimeMilliseconds()
try {