[nu-demo] uv (Python script runner) not in hero_skills installer — python_exec tool fails silently in hero_agent #170
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
On a fresh herodemo VM installed via
hero_skills service_install_all, the AI Assistant toolpython_execdoesn't actually execute. It hallucinates execution — the LLM narrates what it "would do" but no subprocess runs. When the user asks the AI to run a Python script, the answer includes phrases like:uv --versionreturnscommand not found.Root cause
hero_skills/tools/modules/installers/installers.nuapt-dep list + tool-install logic doesn't installuv(the Astral Python script runner). The hero_agent_tools crate'spython_exectool wrapsuv run --script <file>, so withoutuvpresent, the tool errors on invocation — but the LLM often hallucinates successful execution rather than surfacing the error as a tool_result to the user.Fix
Add to hero_skills installer:
This matches the pattern for other single-binary tools (typst, nu).
Demo workaround (applied on herodemo 2026-04-24)
Manual download:
Verified:
uv 0.11.7runs Python scripts correctly.Adjacent improvement: python_exec should NOT hallucinate execution
Currently when the
python_exectool fails (uv missing, sandbox-blocked, etc.), some LLMs make up a plausible execution output rather than faithfully reporting the tool error. The tool wrapper should:{tool_error: true, stderr: "..."}that the LLM cannot mistake for success.python_execifwhich uvreturns nothing at agent startup.Related
Signed-off-by: mik-tf
Partially closed by hero_skills #125 (commit
1379cc0)The apt-side gap is now codified in
install_base: libssl-dev, pkg-config, wget, jq, sqlite3, libsqlite3-dev, python3, python3-pip, python3-venv, python3-openpyxl.Note: this issue mentions multiple specific gaps. Some are now resolved upstream; others (e.g.
uvinstall, ONNX runtime, Chrome) are tracked in the same Phase 2 effort and will land in a follow-up PR — see home#185 for the master tracker.Signed-off-by: mik-tf
Deploy-side resolved:
ORT_PREFER_DYNAMIC_LINK=1is now wired into bothhero_voice_serverandhero_voice_uiactions in service_voice.nu. Upstream ort/ort-sys static-link issue still tracked separately.Part of:
lhumina_code/hero_skills@7c823d1(PR lhumina_code/hero_skills#126).Tracker: #185.
Fixed in hero_skills
tools/modules/installers/installers.nu.install_py(L221+) installs uv on first run via the canonical Astral installer script:(L223-233.) The mechanism differs from the tarball-extract suggested in the issue body, but the outcome is the same —
uvends up on$PATH, and^uv python installplus^uv tool install ipythonfollow at L233-245.install_pyis wired intoinstall_coreat L386, so a freshservice_install_all-style bring-up reaches the uv install before any hero_agent / python_exec invocation.Verified end-to-end during the herodemo deploy work —
python_execruns real subprocesses now, no more LLM hallucination of execution.Signed-off-by: mik-tf