Summary
kbagent's startup self-update check triggered in the middle of a session
where kbagent was being actively invoked repeatedly (an AI agent running
several kbagent data-app/kbagent storage commands back to back). The
update printed:
Updating kbagent v0.94.0 -> v0.95.0 in the background; it applies once every kbagent process has exited.
...and the next kbagent invocation (a few seconds later) failed outright:
kbagent: command not found
Unlike #771 (where a failed auto-update leaves the old version working),
here the tool disappeared entirely — not just stale, but gone.
Diagnostics performed (nothing found)
which kbagent / where.exe kbagent (both Git Bash and PowerShell): not found anywhere in PATH.
uv tool list: no kbagent/keboola-cli/keboola-agent-cli entry at all.
ls "$(uv tool dir)": no corresponding directory (only an unrelated, unaffected tool is present).
pip show kbagent / pipx list / python -m kbagent: nothing.
- No
~/.kbagent or similar config/log directory found anywhere under the user profile or AppData.
- No files found under AppData modified in the ~40-minute window around the failure (aside from Claude Code's own session files).
So the self-update appears to have removed the existing uv tool entry as
part of the upgrade attempt, then failed to complete installing the new
one — leaving nothing behind, with no error surfaced and no log to
diagnose from afterward.
Why this matters for agent use specifically
This CLI is explicitly designed to be driven by AI agents (per
for-agents docs). An agent mid-task has no way to notice "an update is
about to happen" ahead of time, no way to defer it, and — per this
report — no way to recover afterward except waiting and hoping, since
there's no local trace to act on. A background self-update firing between
two commands in the same session is a plausible way to hit this on any
long-running agent session, not just an edge case.
Suggested fixes
- Never trigger the self-update while
kbagent is being actively
invoked in a session (e.g. gate it to only check/apply on the first
invocation after a period of inactivity, or require an explicit
kbagent update, not an implicit one during normal command use).
- Make the update atomic: never remove/unlink the currently-working
version until the new one is confirmed installed and runnable. Right
now a failed update can apparently leave zero working versions, which
is strictly worse than doing nothing.
- Log the update attempt somewhere durable (even just stdout/stderr
of the update step itself, or a small log file) so a failure like this
is diagnosable without needing to forensically search the filesystem.
Environment
- Windows 11, Git Bash (MSYS) + PowerShell
kbagent v0.94.0 -> v0.95.0 (self-update)
- Installed via
uv tool install (inferred; no local trace survived to confirm the exact original install path)
- Used inside an AI agent session (Claude Code) issuing repeated
kbagent commands
Related but distinct: #771 (auto-update fails but stale version keeps
working). This report is the case where the update fails AND the working
version is also gone.
Summary
kbagent's startup self-update check triggered in the middle of a sessionwhere
kbagentwas being actively invoked repeatedly (an AI agent runningseveral
kbagent data-app/kbagent storagecommands back to back). Theupdate printed:
...and the next
kbagentinvocation (a few seconds later) failed outright:Unlike #771 (where a failed auto-update leaves the old version working),
here the tool disappeared entirely — not just stale, but gone.
Diagnostics performed (nothing found)
which kbagent/where.exe kbagent(both Git Bash and PowerShell): not found anywhere in PATH.uv tool list: nokbagent/keboola-cli/keboola-agent-clientry at all.ls "$(uv tool dir)": no corresponding directory (only an unrelated, unaffected tool is present).pip show kbagent/pipx list/python -m kbagent: nothing.~/.kbagentor similar config/log directory found anywhere under the user profile or AppData.So the self-update appears to have removed the existing
uv toolentry aspart of the upgrade attempt, then failed to complete installing the new
one — leaving nothing behind, with no error surfaced and no log to
diagnose from afterward.
Why this matters for agent use specifically
This CLI is explicitly designed to be driven by AI agents (per
for-agentsdocs). An agent mid-task has no way to notice "an update isabout to happen" ahead of time, no way to defer it, and — per this
report — no way to recover afterward except waiting and hoping, since
there's no local trace to act on. A background self-update firing between
two commands in the same session is a plausible way to hit this on any
long-running agent session, not just an edge case.
Suggested fixes
kbagentis being activelyinvoked in a session (e.g. gate it to only check/apply on the first
invocation after a period of inactivity, or require an explicit
kbagent update, not an implicit one during normal command use).version until the new one is confirmed installed and runnable. Right
now a failed update can apparently leave zero working versions, which
is strictly worse than doing nothing.
of the update step itself, or a small log file) so a failure like this
is diagnosable without needing to forensically search the filesystem.
Environment
kbagentv0.94.0 -> v0.95.0 (self-update)uv tool install(inferred; no local trace survived to confirm the exact original install path)kbagentcommandsRelated but distinct: #771 (auto-update fails but stale version keeps
working). This report is the case where the update fails AND the working
version is also gone.