Skip to content

Auto-update permanently broken for installs made under the old keboola-agent-cli package name (executable conflict, cause swallowed) #771

Description

@jordanrburger

Summary

On an install made under the old package name (keboola-agent-cli), auto-update can never succeed. Every kbagent invocation prints the same two lines to stdout and then silently continues on the stale version:

Updating kbagent v0.58.0 -> v0.94.0...
Auto-update failed; continuing with current version.

No cause is surfaced — not with --verbose, not in --json mode (the banner is also emitted above the JSON document, which breaks naive parsers).

Root cause

The distribution was renamed keboola-agent-cli → keboola-cli, but both ship the same kbagent executable. uv therefore treats the upgrade as a new tool rather than an upgrade of the existing one: it resolves and builds keboola-cli==0.94.0 successfully, then refuses at the executable-link step because kbagent is still owned by the keboola-agent-cli tool entry.

Running the exact upgrade_command that kbagent --json version reports shows the error the auto-updater swallows:

$ uv tool install --upgrade git+https://github.com/keboola/cli
...
 + keboola-cli==0.94.0 (from git+https://github.com/keboola/cli@b5ac882)
...
error: Executable already exists: kbagent (use `--force` to overwrite)

uv tool list confirms the two entries are distinct:

keboola-agent-cli v0.58.0
- kbagent

So the upgrade_command advertised in version --json is itself non-functional for every user who installed before the rename — the advice is self-defeating, and the auto-updater hides why.

Reproduction

  1. Install under the old name: uv tool install git+https://github.com/keboola/cli at a pre-rename commit (tool entry is named keboola-agent-cli).
  2. Run any command, e.g. kbagent --json version.
  3. Observe the "Auto-update failed" banner, with the version pinned at the old release indefinitely.

Workaround that works

uv tool uninstall keboola-agent-cli
uv tool install git+https://github.com/keboola/cli

Config is preserved — ~/Library/Application Support/keboola-agent-cli/config.json is still the path the renamed package reads, and all 24 registered projects survived. (Worth confirming that is intentional and not a second latent rename waiting to strand people's configs.)

Suggested fixes

  1. Surface the error. "Auto-update failed" with no cause is the real cost here; a stale CLI ran for an unknown number of releases without anyone knowing why. Print the underlying stderr at least under --verbose.
  2. Make upgrade_command correct for legacy installs — either emit --force, or detect a keboola-agent-cli tool entry and emit the uninstall-then-install pair.
  3. Add a doctor check for a legacy keboola-agent-cli tool entry, since that is exactly the population that is silently frozen.
  4. Keep the banner off stdout in --json mode — it currently precedes the JSON document.

Environment

  • macOS (Darwin 25.5.0), arm64
  • uv 0.12.1
  • kbagent 0.58.0 → 0.94.0
  • Installed via uv tool install (no install_channel in version --json)

Related but distinct: #353 (auto-update falsely reporting failure due to a 120s timeout on WSL). This one is not a timeout — it fails instantly and deterministically.

🤖 Generated with Claude Code

Activity

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