Skip to content

Give default agents explicit mise packages including Copilot npm - #13611

Closed
AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:cursor/fix-default-agent-packages2-e0d3
Closed

AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:cursor/fix-default-agent-packages2-e0d3

Conversation

@AnPod

@AnPod AnPod commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #13315

Several default-agent branches left agent_package unset or used a short name that is not a valid mise package (notably Copilot), so install failed before the default could be written.

Change

  • Set an explicit agent_package for each mise-backed agent
  • Use npm:@github/copilot for GitHub Copilot
  • Improve install failure messages
  • Update test/shell.d/default-agent-test.sh expectations

Test plan

  • bash test/shell.d/default-agent-test.sh

Branches that relied on an empty package left mise with a blank
spec. Set packages for each agent and use npm:@github/copilot (omacom#13315).

Co-authored-by: AnPod <AnPod@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/fix-default-agent-packages2-e0d3 branch from 84623da to 3172312 Compare September 29, 2026 21:09
@chessing234

Copy link
Copy Markdown
Contributor

the explicit packages look right, especially npm:@github/copilot. one small thing: after agent_package=${agent_package:-$agent} the new empty-check for agent_package can never fire for mise agents — the fallback already filled it. maybe guard before that line, or drop the empty branch as dead.

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds explicit package mappings for default code agents.

The PR should not merge until selecting Copilot and launching it use the same mise package.

Findings

  1. P1 Copilot launcher uses different package ▶

Summary

This PR gives default agents explicit installation sources, maps Copilot to its npm package, improves installation errors, and updates shell tests. The Copilot default-agent mapping is not yet aligned with its provisioned launcher.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Select Copilot] --> B["mise use -g npm:@github/copilot"]
  B --> C[Write default and launch agent]
  C --> D[Provisioned copilot launcher]
  D --> E["mise use -g copilot; mise x copilot"]
Loading

Reviews (1) · Last reviewed commit: "Drop the unreachable agent_package empty..."

Comment thread bin/omarchy-default-agent
agy | antigravity | antigravity-cli | gemini | gemini-cli) agent="agy"; name="Antigravity"; agent_package="antigravity-cli" ;;
hermes) agent="hermes"; name="Hermes"; agent_installer="omarchy-install-hermes-cli" ;;
copilot | github-copilot) agent="copilot"; name="GitHub Copilot" ;;
copilot | github-copilot) agent="copilot"; name="GitHub Copilot"; agent_package="npm:@github/copilot" ;;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Copilot launcher uses different package

When a user selects Copilot on a provisioned system, this code activates npm:@github/copilot and saves Copilot as the default. But install/user/mise.sh creates a copilot launcher that still installs and runs the bare copilot mise package. The saved default can therefore fail to launch because the launcher does not use the package that was just activated. Update the provisioned launcher to use the same package specification.

@omarchybot omarchybot added the bug Something isn't working label Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 2bfba74 against quattro, on a worker built from the Omarchy ISO (mise 2026.9.11).

The bug this fixes does not reproduce on quattro. Agents without an explicit agent_package never reach mise with an empty spec, because agent_package=${agent_package:-$agent} (bin/omarchy-default-agent:51 on quattro) falls back to the agent's own name. Every one of those names is a valid mise registry short name: copilot resolves to aqua:github/copilot-cli, with npm:@github/copilot only as a fallback backend. On the worker, omarchy-default-agent copilot with quattro's script opened the install terminal, --install copilot installed copilot@1.0.91 through mise and wrote copilot as the default, and selecting it again went straight to the launch. That matches what @staruxian found on #13315. So apart from Copilot, the explicit mappings repeat what the fallback already does.

The Copilot change makes things worse for anyone whose Copilot Omarchy installed. install/user/mise.sh:10 provisions Copilot as copilot, and the wrapper it writes at ~/.local/bin/copilot runs mise x "copilot". With this branch on the same worker, Copilot was already installed under that name, yet omarchy-default-agent copilot reopened the install terminal because mise where npm:@github/copilot fails. --install copilot then installed a second copy through npm and added "npm:@github/copilot" beside copilot in ~/.config/mise/config.toml, while the copilot command still runs the aqua copy. Greptile flagged the same mismatch.

It also conflicts with quattro, around Grok: quattro now installs Grok as plain grok (#14004), with a migration moving people off npm:@xai-official/grok. Resolving the conflict by keeping this branch's line would undo that change. Keeping quattro's line while also removing the fallback would make the new guard reject Grok outright.

Tests: test/shell.d/default-agent-test.sh passes on the worker at both quattro (48 passed) and this head (49 passed). The suite mocks mise, so it cannot catch the package mismatch above.

Second opinion: Codex Medium reviewed the same head. It agreed that the empty-package path does not exist on quattro and that the Copilot mapping disagrees with how Copilot is provisioned. Its review was not guaranteed to be independent of this one. It contributed the Grok conflict analysis above.

Nothing was pushed: there is no defect in quattro here for this branch to fix. This now waits on the maintainer, and my recommendation is to close it along with #13315 unless the reporter can show the failure on a current mise.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thank you for this, @AnPod. Closing because the bug it addresses does not occur on quattro, and this would install a second copy of Copilot.

Closed at the maintainer's request. The review comment above has the details; it was done by Claude Opus 5.5 with Codex Medium as a second opinion, whose agreement is not independent.

@omarchybot omarchybot closed this Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants