Skip to content

[Bug]: Periodic provider status check triggers mise on-demand download loop for uninstalled lazy CLIs, exhausting disk space #33415

Closed

Description

@h45sh

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. On Linux, use a tool manager like mise that provides on-demand / lazy shims for agent CLIs (e.g. claude = { version = "latest", lazy = true }, where the shim exists on $PATH, but the binary is not yet downloaded/installed).
  2. Start T3 Code (Desktop / Server).
  3. T3 Code runs checkClaudeProviderStatus every 60 seconds, which attempts to run claude --version.
  4. Because the CLI is declared as lazy, invoking the wrapper causes mise to immediately begin downloading the ~156 MB package archive into ~/.cache/mise/invocation-downloads/.tmp<random>/.
  5. T3 Code's version probe (CLAUDE_VERSION_CHECK_TIMEOUT_MS = 20_000) times out or aborts the subprocess after 20 seconds before the download completes.
  6. The abort leaves an incomplete .tmp* directory behind in ~/.cache/mise/invocation-downloads/.
  7. This cycle repeats every 60 seconds indefinitely.

Expected behavior

  • Provider binary health checks should not repeatedly trigger blocking network downloads or run in an unbacked-off loop if a probe fails or times out.
  • Suggestions:
    1. Inhibit on-demand downloads during health probes: When spawning --version or capability checks, pass environment variables that tell package/tool managers not to auto-install (e.g. MISE_AUTO_INSTALL: "false").
    2. Implement exponential backoff or pause automated polling when a provider probe times out or reports missing/failed status, rather than retrying every 60 seconds.

Actual behavior

  • A new partial download is spawned and abandoned every 60 seconds.
  • Over a few days, 943 orphaned .tmp* directories accumulated in ~/.cache/mise/invocation-downloads/, silently consuming 35 GB of disk storage.

Impact

Major degradation or frequent failure

Version or commit

0.1.7

Environment

  • OS: Arch Linux (x86_64)
  • App: T3 Code 0.1.7 AppImage (linux-x64)
  • Tool Manager: Mise

Logs or stack traces

Server trace logs showing checkClaudeProviderStatus firing every 60 seconds:

{"type":"effect-span","name":"checkClaudeProviderStatus","durationMs":668,"startTimeUnixNano":"1794236868052404508","endTimeUnixNano":"1794236868686574731"}
{"type":"effect-span","name":"checkClaudeProviderStatus","durationMs":619,"startTimeUnixNano":"1794236928688746279","endTimeUnixNano":"1794236929308046895"}

Leftover download artifact metadata in ~/.cache/mise/invocation-downloads/.tmp*/.artifact.mise-part.json:

{"version":3,"request_hash":"0d46a06e...","total_size":156577140,"effective_filename":"fc708f01..."}

Workaround

Explicitly run mise install claude so the binary is present and --version responds immediately, or remove lazy shims from $PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions