Proof Portal

Project overview

Omarchy

ProbeLabs65 findings · 95 requirements

A proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.

Inbox
ReportR-79GitHub issuePublicDecided· Out of scope

omarchy default agent fails for 8 of 13 agents: empty agent_package makes mise use -g "" always fail

Reported by NickGV · filed Sep 26, 2026 · open at source

Decided: Out of scope — decided by agents · verified 3 days ago.

At a glance

1 · What is claimed?
Only the report text below — no validator has restated it as checkable claims yet.
2 · What does it affect?
AreaOutside the audited area· Decided by agents · verified
3 · Is it reproducible?
No validation has been run yet.
4 · What remains unclear?
  • Not validated yet: no claims, no reproducer.
5 · What happens next?
Decided by agents and verified by a second, independent agent — see the decision.

Original report

omarchy default agent fails for 8 of 13 agents: empty agent_package makes mise use -g "" always failrevision 1 · captured 2026-09-28 21:23 UTC via poll

Summary

omarchy default agent <name> fails for 8 of the 13 selectable agents. The command exits 1, prints a confusing mise error, and — importantly — never writes the default agent file, so the selection is silently not applied.

Affected: pi, opencode, claude, codex, gemini, copilot, crush, cursor-agent

Working: omp, grok, muse (via agent_package), openclaw, hermes (via agent_installer)

Steps to reproduce

Pick any agent from the affected list that is not already installed as a non-mise binary in ~/.local/bin:

omarchy default agent gemini

Actual behavior

A floating terminal opens, mise fails, and the command exits 1:

mise ERROR  not found in mise tool registry
Could not install Gemini with mise

~/.config/omarchy/defaults/agent is left unchanged. The same failure occurs through the menu, since the menu action is literally omarchy-default-agent <name>.

Expected behavior

Selecting an agent should set it as the default, and either install it or tell the user how to install it. Re-selecting an agent that is already the default should not fail.

Root cause

omarchy-default-agent resolves an install through exactly two mechanisms: agent_installer (a dedicated script) and agent_package (a mise spec). Eight branches set neither, so both variables are empty:

# /usr/share/omarchy/bin/omarchy-default-agent
grok)   agent="grok";   name="Grok";   agent_package="npm:@xai-official/grok" ;;
gemini | gemini-cli) agent="gemini"; name="Gemini" ;;      # <-- no agent_package
claude | claude-code) agent="claude"; name="Claude Code" ;; # <-- no agent_package

The presence check and the install both then run mise with an empty spec:

agent_present() { user_install || mise where "$agent_package" &>/dev/null; }   # mise where ""
agent_install() { user_install || mise use -g "$agent_package"; }              # mise use -g ""

mise where "" and mise use -g "" always fail (not found in mise tool registry), and because the install check runs before the file write, the command exits without persisting anything:

if ! agent_install; then
  ...
  exit 1
fi

printf '%s\n' "$agent" >"$agent_file"   # never reached

Why user_install() does not cover this

user_install() deliberately rejects mise shims:

# A mise copy would only shadow it, since the mise shims precede ~/.local/bin on PATH.
user_install() {
  [[ -x $HOME/.local/bin/$agent ]] &&
    { [[ -L $HOME/.local/bin/$agent ]] || ! grep -q '^mise use -g' "$HOME/.local/bin/$agent"; }
}

So for these 8 agents, mise is not a supported install path, and a non-mise install is required. That leaves two dead ends:

  1. Agent installed via mise — user_install() returns false, agent_package is empty, both mechanisms fail. The default can never be set.
  2. Agent not installed at all — same failure, and the error blames mise for an agent that was never meant to go through mise.

The result is that the "lazy-installed on first use" behaviour described for the default agent cannot work for these 8.

Suggested fix

Either give each branch a agent_package (mise short names resolve fine — mise search gemini returns a valid entry), or fail early with an actionable message when neither mechanism is available:

if [[ -z "${agent_package:-}" && -z "${agent_installer:-}" ]] && ! user_install; then
  echo "$name is not installed. Install it yourself, then re-run this command." >&2
  exit 1
fi

A defensive guard in agent_install() against an empty agent_package would also prevent the confusing mise error regardless of which branch is hit.

System details

  • Omarchy 4.0.4-1
  • mise 2026.9.12
  • Reproduced on both a fresh selection and re-selecting an agent that is already the default
View raw text
## Summary

`omarchy default agent <name>` fails for 8 of the 13 selectable agents. The command exits 1, prints a confusing mise error, and — importantly — **never writes the default agent file**, so the selection is silently not applied.

Affected: `pi`, `opencode`, `claude`, `codex`, `gemini`, `copilot`, `crush`, `cursor-agent`

Working: `omp`, `grok`, `muse` (via `agent_package`), `openclaw`, `hermes` (via `agent_installer`)

## Steps to reproduce

Pick any agent from the affected list that is not already installed as a non-mise binary in `~/.local/bin`:

```bash
omarchy default agent gemini
```

## Actual behavior

A floating terminal opens, mise fails, and the command exits 1:

```
mise ERROR  not found in mise tool registry
Could not install Gemini with mise
```

`~/.config/omarchy/defaults/agent` is left unchanged. The same failure occurs through the menu, since the menu action is literally `omarchy-default-agent <name>`.

## Expected behavior

Selecting an agent should set it as the default, and either install it or tell the user how to install it. Re-selecting an agent that is already the default should not fail.

## Root cause

`omarchy-default-agent` resolves an install through exactly two mechanisms: `agent_installer` (a dedicated script) and `agent_package` (a mise spec). Eight branches set neither, so both variables are empty:

```bash
# /usr/share/omarchy/bin/omarchy-default-agent
grok)   agent="grok";   name="Grok";   agent_package="npm:@xai-official/grok" ;;
gemini | gemini-cli) agent="gemini"; name="Gemini" ;;      # <-- no agent_package
claude | claude-code) agent="claude"; name="Claude Code" ;; # <-- no agent_package
```

The presence check and the install both then run mise with an empty spec:

```bash
agent_present() { user_install || mise where "$agent_package" &>/dev/null; }   # mise where ""
agent_install() { user_install || mise use -g "$agent_package"; }              # mise use -g ""
```

`mise where ""` and `mise use -g ""` always fail (`not found in mise tool registry`), and because the install check runs *before* the file write, the command exits without persisting anything:

```bash
if ! agent_install; then
  ...
  exit 1
fi

printf '%s\n' "$agent" >"$agent_file"   # never reached
```

## Why `user_install()` does not cover this

`user_install()` deliberately rejects mise shims:

```bash
# A mise copy would only shadow it, since the mise shims precede ~/.local/bin on PATH.
user_install() {
  [[ -x $HOME/.local/bin/$agent ]] &&
    { [[ -L $HOME/.local/bin/$agent ]] || ! grep -q '^mise use -g' "$HOME/.local/bin/$agent"; }
}
```

So for these 8 agents, mise is not a supported install path, and a non-mise install is required. That leaves two dead ends:

1. **Agent installed via mise** — `user_install()` returns false, `agent_package` is empty, both mechanisms fail. The default can never be set.
2. **Agent not installed at all** — same failure, and the error blames mise for an agent that was never meant to go through mise.

The result is that the "lazy-installed on first use" behaviour described for the default agent cannot work for these 8.

## Suggested fix

Either give each branch a `agent_package` (mise short names resolve fine — `mise search gemini` returns a valid entry), or fail early with an actionable message when neither mechanism is available:

```bash
if [[ -z "${agent_package:-}" && -z "${agent_installer:-}" ]] && ! user_install; then
  echo "$name is not installed. Install it yourself, then re-run this command." >&2
  exit 1
fi
```

A defensive guard in `agent_install()` against an empty `agent_package` would also prevent the confusing mise error regardless of which branch is hit.

## System details

- Omarchy 4.0.4-1
- mise 2026.9.12
- Reproduced on both a fresh selection and re-selecting an agent that is already the default

Validation

Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.

Linked

  • Related PRpr/8450· confirmed

Decision

Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.

  • Out of scopeDecided by agents · verified · 2026-10-09 18:37 UTC