From 95c6dd146fab081760120fcced072c4ee4a4b298 Mon Sep 17 00:00:00 2001 From: jessemcnew <247455081+jessemcnew@users.noreply.github.com> Date: Mon, 3 Aug 2026 16:08:12 -0500 Subject: [PATCH] fix(cli): preserve OMP identity inside Herdr --- packages/coding-agent/scripts/omp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/scripts/omp b/packages/coding-agent/scripts/omp index ef7a82b96..82721c719 100755 --- a/packages/coding-agent/scripts/omp +++ b/packages/coding-agent/scripts/omp @@ -36,7 +36,16 @@ mkdir -p "$launch_dir" OMP_LAUNCH_CWD=$PWD export OMP_LAUNCH_CWD cd "$launch_dir" +# Herdr 0.7.5 validates the foreground process name. The macOS shell can +# preserve OMP's identity while still running the development CLI through Bun. +run_bun() { + if [ "${HERDR_ENV:-}" = 1 ] && [ "$(uname -s)" = Darwin ]; then + exec -a omp bun "$@" + fi + exec bun "$@" +} + if [ -n "${PI_TIMING:-}" ]; then - exec bun --preload "$preload" --preload "$timing_preload" "$cli" "$@" + run_bun --preload "$preload" --preload "$timing_preload" "$cli" "$@" fi -exec bun --preload "$preload" "$cli" "$@" +run_bun --preload "$preload" "$cli" "$@"