<recommended_plugins>
Here is a list of plugins that are available but not installed. If the user's query would benefit from one of these plugins, use the request_plugin_install tool to suggest that they install it. Pass the parenthesized ID as plugin_id. For example, suggest the Google Drive plugin if the query could possibly be better answered with access to Google Drive.
AGENTS.md instructions for /Users/jdx/.codex/worktrees/7d59/mise
Create GitHub pull requests ready for review. Never create draft pull requests unless the user explicitly requests a draft.
--- project-doc ---
Repository Agent Guide
This file provides guidance to AI coding agents when working with code in this repository. It keeps the CLAUDE.md filename for compatibility with existing tooling, and AGENTS.md symlinks to it for other agents.
Registry Submissions: READ THIS FIRST
Most registry PRs from agents get rejected. Before adding anything to registry/, understand the rules:
mise does not host self-written, personal, niche, or low-popularity tools. The registry is curated for tools that are already widely used. "It works" or "it has tests" is not the bar.
Tools that aren't VERY popular will be rejected without explanation. Per contributing.md: "@jdx won't explain why a given tool wasn't accepted." There is no appeal, no checklist, no second chance — the PR is closed and that's it.
Wasted PRs are the default outcome for tools the agent or user has not vetted against this bar. Do not submit one speculatively.
Required pre-submission check
Before touching registry/, ALWAYS do the following:
Ask the user: "Is this tool already widely used outside your own projects?" — if it's the user's own tool, a fork, an internal/company tool, or something with a small audience, stop and tell them the PR will be rejected. Do not submit.
Actively check popularity for every registry PR — no exceptions. Look up real numbers; do not guess. Useful sources:
Whether the project shows up in third-party docs, awesome-lists, or other tools
Apply the bar. Rough signals — very low numbers are disqualifying:
GitHub stars in the thousands, not hundreds
Active maintenance (recent releases, not abandoned)
Real third-party usage (referenced in docs, blog posts, other tools, package registries)
Recognizable in its ecosystem
Include the popularity data in the PR description. Every registry PR body MUST contain a short section like:
code
## Popularity
- GitHub: 12.3k stars, 480 forks, last release 2026-04-12
- crates.io: 1.2M downloads
- Used by: <project A>, <project B>
This is non-negotiable — it lets the maintainer evaluate the submission without re-doing the research. PRs without it look speculative and are more likely to be rejected.
If the tool is borderline or numbers are low, warn the user clearly that the PR is likely to be rejected without reason, and ask if they still want to proceed. Do not soften this — users have repeatedly been surprised when their PR was closed, and the agent should have warned them up front.
Suggest the alternative: users can install any tool themselves via explicit backend syntax (mise use aqua:owner/repo, mise use github:owner/repo, mise use cargo:name, mise use npm:name, etc.) or by writing a tool plugin. The registry is only for shorthand convenience for popular tools — not for enabling installation.
Backend choice: aqua (preferred) or github
For registry entries the backend tiers are:
Tier 1 — preferred:aqua:, github:, and gitlab:. These are the routinely accepted backends.
Prefer aqua: when the tool is in the aqua registry. Better UX, SLSA verification, and per-version logic.
Use github: when the tool isn't in aqua but ships GitHub releases.
Use gitlab: for tools released through GitLab.
Tier 2 — high bar, but lower than tier 3:conda:. Potentially acceptable when the tool can't be supported via aqua/github. The bar is lower than tier 3 because the conda backend in mise does not require a separately-installed package manager — mise downloads and extracts packages directly from anaconda.org via rattler, so users don't need conda/mamba on PATH. Still requires a popular, well-maintained tool.
Tier 3 — extremely high bar, almost never accepted:npm:, pipx:, gem:, cargo:, go:, dotnet:. These all rely on a separately-installed runtime/toolchain being present on PATH (node, python, ruby, cargo, go, dotnet), which is fragile — the wrong version, a missing install, or PATH ordering quirks all break them. npm:/pipx:/gem: are particularly painful because tools installed via them silently bind to whichever node/python/ruby was on PATH at install time. Don't reach for these for a registry PR unless the user has explicitly confirmed @jdx wants it that way for this specific tool.
Not accepted at all:
New asdf: plugins — supply-chain security. Use aqua/github instead.
New vfox: plugins — same reason. Use aqua/github instead.
ubi: is deprecated and will not be accepted under any circumstances.
Users can still install via any backend themselves with explicit syntax (mise use vfox:..., mise use cargo:..., etc.) — they just don't get a registry shorthand for it.
Development Commands
Building and Testing
mise run build or mise run b - Build the project with cargo
target/debug/mise - Run the built binary directly
mise run test or mise run t - Run all tests (unit + e2e)
mise run test:unit - Run unit tests only
mise run test:e2e - Run end-to-end tests only
mise run snapshots - Update test snapshots with cargo insta
Debugging
Use MISE_DEBUG=1 or MISE_TRACE=1 environment variables to enable debug output (not RUST_LOG)
Code Quality and Testing
mise run lint - Run all linting tasks
mise run lint-fix - Run linting and automatically fix issues
mise run format - Format code (part of CI task)
mise run ci - Run format, build, and test
mise run test:e2e [test_filename]... - Run specific e2e tests (use this instead of executing test files directly)
mise --cd crates/vfox run test - Run tests for the vfox crate
mise --cd crates/vfox run lint - Run linting for the vfox crate
mise --cd crates/vfox run lint-fix - Run linting and fix issues for the vfox crate
mise task ls - List all available tasks
Documentation and Generation
mise run render - Generate all documentation and completions
mise run render:usage - Generate CLI usage documentation
mise run render:completions - Generate shell completions
mise run docs - Start documentation dev server
mise run docs:build - Build documentation
Development
mise run install-dev - Install development version locally
mise run clean - Clean cargo build artifacts
Code Architecture
High-Level Structure
Mise is a Rust CLI tool that manages development environments, tools, tasks, and environment variables. The codebase follows a modular architecture:
Core Components:
src/main.rs - Entry point and CLI initialization
src/cli/ - Command-line interface implementation with subcommands
src/config/ - Configuration file parsing and management
registry: - Any changes to registry/ (no scope needed, use for both new tools and fixes)
Scopes:
For command-specific changes, use the command name: install, activate, use, exec, etc.
For subsystem changes: config, backend, env, task, vfox, python, github, release, completions, http, schema, doctor, shim, core, deps, ci
Use task (not run) for task-related changes, even if the code lives in src/cli/run.rs or src/cmd.rs
Description Style:
Use lowercase after the colon
Use imperative mood ("add feature" not "added feature")
Keep it concise but descriptive
Examples:
fix(install): resolve version mismatch for previously installed tools
feat(activate): add fish shell support
feat(vfox): add semver Lua module for version sorting
feat(env): add environment caching with module cacheability support
docs(contributing): update hk usages
chore: release 2026.1.6
chore(ci): add FORGEJO_TOKEN for API authentication
registry: add miller
Pre-commit Process
Run hk install --mise once to set up pre-commit hooks (runs hk fix automatically on commit)
Run mise run lint-fix and git add any lint fixes before committing
Use mise run test:e2e [test_filename]... for running specific e2e tests
Never run e2e tests by executing them directly - always use the mise task
Deprecation Policy
When deprecating a feature or backend:
Immediately: Mark as deprecated in docs (add warning banner)
6 months later (warn_at): Display deprecation warning in CLI using deprecated_at! macro from src/output.rs
12 months after warn (remove_at): debug_assert! in deprecated_at! fires, signaling the code should be removed
Use mise version format for dates (e.g., deprecated_at!("2026.10.0", "2027.10.0", "id", "message")).
If the replacement has been available for a long time, the CLI warning can start immediately (set warn_at to the current version).
Important Implementation Notes
Backend System
When implementing new tool backends, follow the pattern in src/backend/mod.rs. Each backend must implement the Backend trait with methods for listing versions, installing tools, and managing tool metadata.
DO NOT ASSUME SEMVER
Do not assume tool versions follow semver or any other orderable scheme. mise manages hundreds of tools with wildly different versioning conventions:
Tool-specific meanings of latest (e.g. some exclude pre-releases, some don't)
Rules:
Do not call versions::Versioning::new(...) (or any other semver comparator) at a new call site to pick the "newest" version, "resolve latest", or sort a version list. That crate silently returns None / arbitrary ordering for non-semver strings, which means wrong versions get chosen for many tools.
To resolve a version request (latest, a prefix, a channel name), delegate to the backend via Backend::latest_version, Backend::latest_installed_version, Backend::list_versions_matching, or ToolRequest::resolve — the backend knows what "latest" means for its tool.
To list installed versions in a meaningful order, use Backend::list_installed_versions_matching or the toolset's resolved versions. Do not reorder them yourself.
Lockfile version strings must be treated as opaque — compare with ==, never with a version ordering. Never write a non-concrete string (latest, lts/*, a prefix) into the lockfile; resolve first.
A few existing call sites (e.g. runtime symlinks) do use Versioning ordering today, but that's legacy behavior and arguably also wrong — do not point at them to justify new semver assumptions.
If you think you need to pick "the newest installed version" at a new call site, stop and ask — that call almost always belongs on the backend, not inline.
Plugin Development
Core tools are implemented in src/plugins/core/
External plugins use ASDF or vfox compatibility layers
Plugin metadata is defined in mise.plugin.toml files
Configuration Parsing
The configuration system supports multiple file formats and environment-specific configs. Changes to settings require updating settings.toml and running mise run render:schema.
Testing Strategy
E2E tests are organized by feature area (cli/, config/, backend/, etc.)
Use snapshot testing for CLI output verification
Backend-specific tests verify tool installation and version management
Slow tests (marked with _slow suffix) test actual tool compilation/installation
Cross-Platform Considerations
Windows-specific implementations in files ending with _windows.rs
Platform-specific tool installation logic in core plugins
Shim system varies by platform (especially Windows)
we don't chmod mise e2e tests to be executable
GitHub Interactions
When posting comments on GitHub PRs or discussions, always include a note that the comment was AI-generated (e.g., "This comment was generated by an AI coding assistant.").
Documentation
URL Structure
When referencing mise documentation URLs, use the correct path structure based on the docs/ directory layout:
Dev tools & backends: mise.en.dev/dev-tools/backends/<backend>.html (e.g., mise.en.dev/dev-tools/backends/s3.html)
Configuration: mise.en.dev/configuration/...
Tasks: mise.en.dev/tasks/...
Environments: mise.en.dev/environments/...
CLI reference: mise.en.dev/cli/...
Do NOT use shortened paths like mise.en.dev/backends/... - always include the full path matching the docs/ directory structure.
Ran 10 commands, read 2 files
Good timing on this one — the discussion is from March 2025 and the original problem (shims hitting the network for bin paths, blocking shell startup) is basically fixed at this point, but there's a comment from pdecat today showing one path that still hurts. Here's my read:
Where things stand
The original report's failure modes are handled now: shims force PREFER_OFFLINE (shims.rs:53), resolution prefers installed versions before touching the network (tool_version.rs:399-405, 467-475), and offline/prefer_offline settings exist. So the "plane scenario" with everything installed works fine offline today.
The remaining case (pdecat's comment)
A fuzzy pin (latest or a prefix like fzf@0.7) where no installed version satisfies it. Then the installed-version fast path can't help, prefer_offline's fully-qualified skip at tool_version.rs:526 doesn't apply (0.7 has one dot), and resolution must go remote. With DNS blackholed, the failure takes ~45s because:
A stalled resolver eats the full connect timeout per attempt (~6s in their setup)
is_transient at http.rs:1106 treats all connect errors — including DNS lookup failures — as retryable, so each URL gets http_retries=3 attempts with backoff
Multiple endpoints get tried in sequence (mise-versions.jdx.dev, api.github.com releases list, then the tags endpoint), each with its own full retry cycle
To their two questions directly: (1) no, a shim does not hit the network when a satisfying version is installed — their repro specifically had no installed match, so remote resolution is genuinely required there; the bug is only how long failure takes. (2) The levers today are MISE_OFFLINE=1, http_retries=0, and http_timeout, but nothing automatic.
What I'd actually change
Roughly in order of value:
Stop retrying DNS lookup failures. "failed to lookup address information" is not transient the way a 502 is — retrying 2s later in the same process almost never helps and just multiplies wall time by http_retries. This alone cuts ~45s to ~15s. Needs a bit of care extracting DNS-vs-connection-refused from the reqwest error chain, but it's doable.
Per-process circuit breaker per host. After the first hard DNS/connect failure to a host, mark it dead for the rest of the process. The original report's logs show the same registry.yaml URLs fetched 3× each in one invocation — resolving N tools offline shouldn't cost N× the timeout. This collapses the whole failure to one timeout (~6s).
Underprefer_offline and possibly a shorter connect timeout. The contract of a shim is "don't block the shell" — retrying flaky infra is the wrong trade there.
A cross-process "network is down" marker file with a short TTL (so each shim invocation doesn't re-probe) is the more aggressive fourth option, but 1–3 probably make it unnecessary, and it has cache-invalidation footguns (captive portals, VPN flaps).
Assistant
I’ll implement all three network-failure safeguards, add focused tests, run the relevant checks, then post an AI-labeled reply to discussion #4598 summarizing the behavior and changes. I’m using the GitHub workflow skill because the final step modifies a live GitHub discussion.
Assistant
The live report matches the earlier diagnosis. One important detail in the current tree: prefer_offline already shortens HTTP timeouts, but retry count still remains global; I’m treating item 3 as completing that policy by suppressing ordinary network retries in fast-path commands while preserving internal auth refresh behavior. Next I’m mapping the request layers so the host circuit breaker applies once per process without poisoning valid HTTP status failures.
Assistant
I’ve settled the boundaries: DNS resolver errors become non-retryable; the circuit opens only for DNS failures or non-timeout connect failures, keyed by host and port so HTTP→HTTPS fallback still works; and prefer_offline uses zero retries plus a three-second cap only for remote-version lookups (artifact downloads keep their normal timeout). I’m applying this centrally so shims, hook-env, and mise x get the same behavior.
Assistant
The implementation is in place and formatting is clean. The targeted HTTP test module is compiling now; because this checkout had no built test artifacts, the first run is doing a full Rust dependency build.
Assistant
Compilation has reached the final mise test binary/link stage. No compiler errors have appeared; I’m waiting on the large workspace link before I inspect failures or expand verification.
Assistant
The first test run found a test-design edge case, not a compiler error: an explicit-port HTTP request tried the existing HTTPS fallback, and the circuit key treated both schemes as identical. I’m refining the key to the network origin (scheme + host + port), which preserves that fallback while still collapsing repeated calls to api.github.com:443. The first panic poisoned the suite’s shared settings lock, causing the cascade of unrelated failures shown after it.
Assistant
All 37 HTTP-focused tests now pass, including the three new regressions. I’m moving through repository-required generation and lint checks next; after that I’ll review the final diff and only then post the discussion reply with concrete test results.
Assistant
Repository generation and the full lint suite have passed. The all-features unit suite is at its final link/run stage now; once it completes I’ll post the GitHub response, explicitly noting it was AI-generated as this repository requires.
Assistant
Verification is complete: 1,727 all-features unit tests passed, as did mise run lint-fix and schema generation. I’m now posting to jdx/mise discussion #4598, replying to pdecat’s July 16 report with the implemented behavior, current workaround context, and a note that the response was AI-generated.
I’ll publish the verified changes as a ready-for-review PR. I’m using the GitHub publish workflow skill to confirm the diff, create a codex/ branch, commit with the required conventional format, push, and open the PR.
Assistant
The publish skill normally defaults to draft PRs, but this repository explicitly requires ready-for-review PRs, so I’ll open it as ready. The four modified files are all part of the network fail-fast change; I’m confirming authentication and the final patch before staging them explicitly.
Assistant
Scope is clean and staged: only the HTTP policy, settings documentation, sigstore retry integration, and regression tests. I created codex/fail-fast-offline-http; next I’m committing with fix(http): fail fast when network is unavailable, then I’ll push and open the ready PR against main.
I’ll inspect PR #11066 for unresolved review feedback and current checks, then implement any actionable fixes, rerun relevant validation, push updates, and resolve addressed review threads. I’m using the PR-feedback skill first, then the CI-debugging skill for any failing checks.
Assistant
PR #11066 has one failing GitHub Actions job (windows-unit); Linux, macOS, Windows build/e2e, docs, and external checks are passing, while lint and benchmark are still running. The bundled inspection scripts initially hit this environment’s missing python alias, so I’m rerunning them with python3 to retrieve thread state and the Windows failure log.
Assistant
There is one unresolved inline review thread: preserve HTTP→HTTPS fallback even when the HTTP origin is already circuit-broken. The Windows failure is also in the new circuit-breaker test; its panic poisons the shared settings lock and causes the other 18 failures. I’m extracting the first Windows panic and the full thread text now, then I’ll make a focused test-safe/fallback-safe change.
Assistant
All four unresolved threads are valid enough to address together:
Recognize circuit-open errors structurally so HTTP→HTTPS fallback still runs.
Restrict the permanent circuit to prefer_offline fast paths; normal installs retain retries and recovery.
Add a real reqwest .invalid DNS regression instead of only a synthetic string error.
Replace the Windows-fragile free-port/rebind test with deterministic circuit/fallback coverage and panic-safe cleanup, while retaining the original failure cause in circuit errors.
This also fixes the windows-unit root failure rather than merely masking the poisoned-lock cascade.
Assistant
The code compiles after one local naming fix. The focused HTTP suite is linking now; the new tests avoid free-port rebinding entirely and exercise the real reqwest DNS chain plus the HTTP→HTTPS fallback path.
Assistant
The focused 39-test HTTP suite and the full lint/check suite pass. The all-features unit suite is in its final link stage; after it passes I’ll commit and push the fix, then reply to and resolve each of the four review threads with the required AI disclosure.
Assistant
Commit 424b5bd34 is pushed with all four feedback fixes. I’m replying to each review thread with the specific resolution and AI disclosure, then marking those threads resolved; after that I’ll inspect the fresh CI run and wait for actionable failures rather than treating pending jobs as failures.
Assistant
All four review threads are replied to and resolved. The new CI run has no failures yet; windows-unit is actively running, with the remaining GitHub jobs queued or in progress. I’m monitoring the test workflow through completion so I can inspect any new failure immediately.
Assistant
The replacement Windows test is now running in CI; it has passed checkout/cache setup and is in cargo test. No new failure has appeared. The other platform jobs are beginning as runners become available.
Assistant
CI is still clean. The Windows build has completed compilation successfully; windows-unit remains in its test step, and macOS/Linux compilation is progressing.
Assistant
The review fixes are pushed and the previously fragile Windows test has been replaced. I’m staying on the fresh CI run until the remaining checks settle, then I’ll do one final pass for any new review feedback.
Assistant
The formerly failing windows-unit job now passes, along with Windows/Ubuntu builds and macOS unit tests. The slower e2e, lint, and nightly jobs are still running; I’m checking those for regressions and watching for fresh bot feedback.
Assistant
Two new bot findings arrived after the push, and both are valid: the fast-path timeout can be frozen when the lazy client is first initialized, and cached error text may retain a request URL. I’m fixing those before letting CI finish.
Assistant
The follow-up fixes now pass the full local suite: 1,730 unit tests, focused HTTP tests, and the complete lint/check set. I’m committing and pushing them now, then I’ll resolve the two new threads and monitor the replacement CI run.
Assistant
Both new threads are resolved with the follow-up commit 634451405; there are currently no unresolved review threads. GitHub has started a clean replacement CI run, so I’m waiting on that run rather than reporting the superseded checks.
Assistant
The replacement run is progressing normally with no failures so far. The important Windows unit job is executing against the latest commit; the earlier run already confirmed that platform-specific regression is fixed, and this run is validating the two final review changes.
Assistant
The latest commit has now passed Ubuntu build, macOS tests, and the nightly toolchain suite. No failures have appeared; Windows and the e2e/lint fan-out are the remaining substantive checks.
Assistant
The replacement windows-unit job now passes as well, confirming the original failing check is fixed on the final commit. Several e2e shards have passed; the remaining shards, Windows e2e, and lint are still running with no failures.
Assistant
All e2e shards and Windows e2e now pass. Only the long lint job remains in the main test workflow; its formatting, rendering, dependency audit, and early checks have passed so far.
Assistant
The complete main CI workflow is green: builds, unit tests, nightly, lint, all eight Linux e2e shards, and Windows e2e. There are no unresolved review threads or failed checks; only the independent performance benchmark is still running.
One nit on their repro: mise x fzf@0.7 is ToolSource::Argument, which deliberately disables prefer_offline (tool_version.rs:393) — so the CLI repro isn't quite the shim path, though it ends the same way since nothing installed matches.
Want me to implement any of these (1+2 feel like the right scope for one PR), or draft a reply to the discussion first?