Skip to content

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

fix(scripts): pin tool dispatcher to auto in prompt-size measurement

Steven Enamakel1244f2c016b3
diff --git a/scripts/prompt-size-measure.sh b/scripts/prompt-size-measure.sh
index d9bd6f8ade..88e6a1a22b 100755
--- a/scripts/prompt-size-measure.sh
+++ b/scripts/prompt-size-measure.sh
@@ -20,6 +20,12 @@ else
TMP="$(mktemp -d "${TMPDIR:-/tmp}/openhuman-prompt-size.XXXXXX")"
trap 'rm -rf "$TMP"' EXIT
mkdir -p "$TMP/home" "$TMP/workspace"
+ # Pin the native tool dialect: under a text dialect (`python`, the default
+ # since #6436) the tool catalogue is rendered into the system prompt and
+ # would be counted twice, once as prompt bytes and once in the tools column.
+ # The prompt column is the prose the agent pays for regardless of dialect;
+ # the tools column tracks the catalogue.
env -u OPENHUMAN_HOME HOME="$TMP/home" RUST_LOG=error \
+ OPENHUMAN_TOOL_DISPATCHER=auto \
"$BIN" agent prompt-size --workspace "$TMP/workspace" --hermetic --json
fi