Say how to finish a failed teardown, and record the probe's real history

A failed --remove told the user to run it again, but that advice could
never work: rm -f has usually taken the marked stub by the time the
failure is judged, and a rerun that finds nothing it owns succeeds
without touching the mise environment it was asked to finish removing.
Spell out the three commands that complete the job by hand instead.

Also correct the story the probe comment told: chat never lost
--oneshot in v0.20 -- no released Hermes defined it there. It lived at
the top level until v0.21 added chat's own, so the old probe was keyed
to a flag no release ever carried under chat, and every install read
as not ready. Recorded straight so a future hermes-desktop bump to
v0.21+, which would make the old probe pass on the desktop path alone,
cannot read as the fix.

Findings from omarchybot's review (Opus 5, with Codex at xhigh).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Spencer BullandClaude Opus 5 committed 2026-09-02 09:40:44 -05:00
1 parent 46cfc4ada5
commit 21470fd1ea
2 files changed
+13 -7

No files matched your search

+11 -5
View File
@@ -100,9 +100,10 @@ help_defines_flag() {
} }
# Probed for the flags omarchy-agent actually passes -- --query to seed the # Probed for the flags omarchy-agent actually passes -- --query to seed the
# session and --tui to keep it interactive -- rather than a flag that merely # session and --tui to keep it interactive -- rather than a marker standing in
# shipped alongside them: the previous marker, --oneshot, was dropped in Hermes # for them: the old probe keyed on chat carrying --oneshot, which no released
# v0.20 and left working installs stranded as "not ready". # Hermes did (it lived at the top level until v0.21 added chat's own), so
# every release read as "not ready".
hermes_prompt_ready() { hermes_prompt_ready() {
local help local help
hermes_runs && hermes_runs &&
@@ -139,9 +140,14 @@ if [[ $mode == "--remove" ]]; then
# rather than by what the commands claimed: the marked stub still answering # rather than by what the commands claimed: the marked stub still answering
# hermes, or mise still resolving the tool, is a CLI still installed no # hermes, or mise still resolving the tool, is a CLI still installed no
# matter how the removal exited. # matter how the removal exited.
# Not "run --remove again": once the stub is gone nothing marks the mise
# environment as ours, so a rerun would find nothing it owns and succeed
# without touching what was left. Only the full commands finish the job.
if ours || mise where "$tool" >/dev/null 2>&1; then if ours || mise where "$tool" >/dev/null 2>&1; then
echo "Could not remove the Hermes CLI Omarchy installed." >&2 echo "Could not remove the Hermes CLI Omarchy installed. Finish by hand:" >&2
echo "Remove ~/.local/bin/hermes and the mise tool '$tool', then run omarchy-install-hermes-cli --remove again." >&2 echo " rm -f ~/.local/bin/hermes" >&2
echo " mise rm -g '$tool'" >&2
echo " mise uninstall --all '$tool'" >&2
exit 1 exit 1
fi fi
fi fi
+2 -2
View File
@@ -499,8 +499,8 @@ chmod +x "$ready_home/.hermes/hermes-agent/venv/bin/hermes"
run_ready_check || fail "--check accepts the app's wrapper once it runs" run_ready_check || fail "--check accepts the app's wrapper once it runs"
pass "readiness runs the app's command rather than trusting its marker" pass "readiness runs the app's command rather than trusting its marker"
# A release whose help lists only the retired --oneshot marker cannot run the # A release whose help lists only the old probe's --oneshot marker cannot run
# seeded --tui --query session omarchy-agent starts, so it is not ready. # the seeded --tui --query session omarchy-agent starts, so it is not ready.
cat >"$ready_home/.hermes/hermes-agent/venv/bin/hermes" <<'SH' cat >"$ready_home/.hermes/hermes-agent/venv/bin/hermes" <<'SH'
#!/bin/bash #!/bin/bash
if [[ ${1:-} == "chat" && ${2:-} == "--help" ]]; then if [[ ${1:-} == "chat" && ${2:-} == "--help" ]]; then