Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(scripts): prompt:report measures with an empty HOME

M3gA-Mind3192d0503b09
diff --git a/scripts/prompt-report.sh b/scripts/prompt-report.sh
index c2244fb28e..5e959e2aa9 100755
--- a/scripts/prompt-report.sh
+++ b/scripts/prompt-report.sh
@@ -45,10 +45,13 @@ if [[ -n "$REAL_WORKSPACE" ]]; then
else
# `--hermetic` puts config.toml beside the workspace dir (its parent), so the
# workspace must be a child of the temp dir — see check-prompt-budget.sh.
+ # HOME is emptied for the same reason as there: `--hermetic` does not stop
+ # skill discovery scanning ~/.openhuman/skills.
TMP="$(mktemp -d "${TMPDIR:-/tmp}/openhuman-prompt-report.XXXXXX")"
trap 'rm -rf "$TMP"' EXIT
+ mkdir -p "$TMP/home"
echo "[prompt-report] measuring against hermetic workspace $TMP" >&2
- measured="$(RUST_LOG=error "$BIN" agent prompt-size --workspace "$TMP/workspace" --hermetic --json)"
+ measured="$(HOME="$TMP/home" RUST_LOG=error "$BIN" agent prompt-size --workspace "$TMP/workspace" --hermetic --json)"
fi
python3 - "$measured" <<'PY'