From d27386ee56e2a93cc2a28a56f51ac17d93c196d7 Mon Sep 17 00:00:00 2001 From: Anton Nekipelov <226657+anton-107@users.noreply.github.com> Date: Wed, 11 Nov 2026 13:53:02 +0000 Subject: [PATCH] aitools: raise the plugin probe timeout from 5s to 20s `databricks aitools install` runs ` plugin --help` to check that the agent's CLI can install plugins. Agent CLIs are large Node/Rust binaries, and a cold start (first run, antivirus scan, slow container disk) can take several seconds. When the probe times out, the agent is reported as unavailable. ```diff // libs/aitools/installer/plugin.go -pluginProbeTimeout = 5 * time.Second +pluginProbeTimeout = 20 * time.Second ``` The same constant also bounds ` plugin marketplace list`. Changelog fragment: `.nextchanges/cli/aitools-plugin-probe-timeout.md`. Co-authored-by: Isaac --- .nextchanges/cli/aitools-plugin-probe-timeout.md | 1 + libs/aitools/agents/detect.go | 5 +++-- libs/aitools/installer/plugin.go | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .nextchanges/cli/aitools-plugin-probe-timeout.md diff --git a/.nextchanges/cli/aitools-plugin-probe-timeout.md b/.nextchanges/cli/aitools-plugin-probe-timeout.md new file mode 100644 index 00000000000..2a0460a6d18 --- /dev/null +++ b/.nextchanges/cli/aitools-plugin-probe-timeout.md @@ -0,0 +1 @@ +* `databricks aitools install` and `databricks aitools update` now wait up to 20 seconds instead of 5 for a coding agent's CLI to answer the plugin capability check, so a slow first start is less likely to report the agent as unavailable. ([#7472](https://github.com/databricks/cli/pull/7472)) diff --git a/libs/aitools/agents/detect.go b/libs/aitools/agents/detect.go index 4b7edbf4dd1..53ae8d085f8 100644 --- a/libs/aitools/agents/detect.go +++ b/libs/aitools/agents/detect.go @@ -16,8 +16,9 @@ import ( var lookPath = exec.LookPath // pluginProbeTimeout bounds the ` plugin --help` capability probe so a -// hung agent CLI cannot stall install. -const pluginProbeTimeout = 5 * time.Second +// hung agent CLI cannot stall install. It matches the probe timeout in +// libs/aitools/installer, which leaves headroom for a slow agent CLI cold start. +const pluginProbeTimeout = 20 * time.Second // DisplayState describes how an agent should be presented in the install // picker. It combines the two cheap presence signals (binary on PATH and diff --git a/libs/aitools/installer/plugin.go b/libs/aitools/installer/plugin.go index 12081a171c0..107b0b5b6e5 100644 --- a/libs/aitools/installer/plugin.go +++ b/libs/aitools/installer/plugin.go @@ -20,7 +20,13 @@ var lookPath = exec.LookPath const ( // pluginProbeTimeout bounds the ` plugin --help` capability check. - pluginProbeTimeout = 5 * time.Second + // Agent CLIs are large Node/Rust binaries whose cold start (first run, + // antivirus scan, slow container disk) can take several seconds, and a probe + // that times out reports the agent as unavailable, so leave headroom. + // It also bounds ` plugin marketplace list` in marketplaceRegistered, + // where a timeout means the marketplace is assumed already registered, so + // install does not record it and uninstall leaves it registered. + pluginProbeTimeout = 20 * time.Second // pluginCmdTimeout bounds an install/update/uninstall command, which may // clone the marketplace repo, so it gets more headroom than the probe. pluginCmdTimeout = 60 * time.Second