Skip to content

aitools: auto-install requires explicit or inferred consent - #8135

Merged
anton-107 merged 2 commits into
mainfrom
aitools-auto-install-consent
Nov 27, 2026
Merged

anton-107 merged 2 commits into
mainfrom
aitools-auto-install-consent

Conversation

@anton-107

Copy link
Copy Markdown
Contributor

Changes

Automatic installation of the Databricks AI tools now runs only after explicit or inferred consent, and it no longer asks anything after a command.

  • Explicit consent comes from databricks aitools auto-install enable, a global-scope databricks aitools install, or a "yes" to the skills prompt of databricks apps init.
  • Inferred consent comes from an existing global installation that the CLI made, meaning one that has install state. A run that finds one stores the consent. Skills without install state and project-scope installations don't count, and neither does a run in CI or one where DATABRICKS_AITOOLS_AUTO_INSTALL turns auto-install off.
  • With no consent stored, Decide returns a new reason, no_consent. This check runs after the CI and opt-out checks, so those still settle the version and are reported. A no_consent run doesn't look up the gate, installs nothing, sends no auto-install event and leaves the version unsettled, so the first run after consent can install.
  • The install prompt and its supporting code are gone: ask, decline, skipUnaskable, canAsk, the container check, State.AcceptedVersion and State.InstalledWithoutConsent. The helpers in libs/cmdio that only the prompt used are gone too: IsLinePromptSupported, SupportsLinePrompt, MarkStdinReadInBackground, DiscardInput and the per-OS foreground-process checks.
  • AutoInstallsFor, which decides whether the agent install hint moves to the end of a command, applies the same inferred-consent check without writing anything. This keeps the hint in step with what the run actually does.
  • The notice after an install or update now also names the removal command: Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall.
  • The DECLINED and UNANSWERED telemetry outcomes are kept in the proto but documented as no longer sent. The telemetry README is updated to match.
  • The auto-install help text and the enable short description describe the new behavior.

Why

Before this change, a run with no coding agent asked before the first install. A coding agent's run installed without asking anyone. This change replaces both paths with one rule: install only once consent is stored, whether given explicitly or inferred from a CLI-made global installation.

Without the prompt, a lot of fragile terminal handling also goes away. That code dealt with detecting the foreground process group, discarding typed-ahead input, background stdin readers and containers whose terminal never delivers an answer.

Tests

  • Unit tests in cmd/aitools and libs/aitools/autoinstall cover installing with consent, skipping without it, and installing on the same version once consent is given. They also cover inferred consent from a CLI-made global installation and the new no_consent reason in Decide. The prompt tests and container tests are removed.
  • New acceptance test acceptance/cmd/aitools/auto-install/no-consent: a coding agent's call with no consent installs nothing, leaves the stored state unchanged, sends no auto-install event, doesn't read the manifest, and still shows the agent the install hint. After databricks aitools auto-install enable, the next command of the same version installs.
  • The existing auto-install acceptance cases (agent-hint, first-run, no-terminal, retries, skipped, upgrade) now run auto-install enable before the cases that install, and their outputs are regenerated. skipped checks that CI and the opt-outs are still reported before any consent exists. upgrade adds a case where a global installation made by an earlier CLI counts as consent.
  • Changelog fragment: .nextchanges/cli/aitools-auto-install-consent.md.

## Changes

Automatic installation of the Databricks AI tools now runs only after explicit or inferred consent, and it no longer asks anything after a command.

- **Explicit consent** comes from `databricks aitools auto-install enable`, a global-scope `databricks aitools install`, or a "yes" to the skills prompt of `databricks apps init`.
- **Inferred consent** comes from an existing global installation that the CLI made, meaning one that has install state. A run that finds one stores the consent. Skills without install state and project-scope installations don't count, and neither does a run in CI or one where `DATABRICKS_AITOOLS_AUTO_INSTALL` turns auto-install off.
- With no consent stored, `Decide` returns a new reason, `no_consent`. This check runs after the CI and opt-out checks, so those still settle the version and are reported. A `no_consent` run doesn't look up the gate, installs nothing, sends no auto-install event and leaves the version unsettled, so the first run after consent can install.
- The install prompt and its supporting code are gone: `ask`, `decline`, `skipUnaskable`, `canAsk`, the container check, `State.AcceptedVersion` and `State.InstalledWithoutConsent`. The helpers in `libs/cmdio` that only the prompt used are gone too: `IsLinePromptSupported`, `SupportsLinePrompt`, `MarkStdinReadInBackground`, `DiscardInput` and the per-OS foreground-process checks.
- `AutoInstallsFor`, which decides whether the agent install hint moves to the end of a command, applies the same inferred-consent check without writing anything. This keeps the hint in step with what the run actually does.
- The notice after an install or update now also names the removal command: `Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall`.
- The `DECLINED` and `UNANSWERED` telemetry outcomes are kept in the proto but documented as no longer sent. The telemetry README is updated to match.
- The `auto-install` help text and the `enable` short description describe the new behavior.

## Why

Before this change, a run with no coding agent asked before the first install. A coding agent's run installed without asking anyone. This change replaces both paths with one rule: install only once consent is stored, whether given explicitly or inferred from a CLI-made global installation.

Without the prompt, a lot of fragile terminal handling also goes away. That code dealt with detecting the foreground process group, discarding typed-ahead input, background stdin readers and containers whose terminal never delivers an answer.

## Tests

- Unit tests in `cmd/aitools` and `libs/aitools/autoinstall` cover installing with consent, skipping without it, and installing on the same version once consent is given. They also cover inferred consent from a CLI-made global installation and the new `no_consent` reason in `Decide`. The prompt tests and container tests are removed.
- New acceptance test `acceptance/cmd/aitools/auto-install/no-consent`: a coding agent's call with no consent installs nothing, leaves the stored state unchanged, sends no auto-install event, doesn't read the manifest, and still shows the agent the install hint. After `databricks aitools auto-install enable`, the next command of the same version installs.
- The existing auto-install acceptance cases (`agent-hint`, `first-run`, `no-terminal`, `retries`, `skipped`, `upgrade`) now run `auto-install enable` before the cases that install, and their outputs are regenerated. `skipped` checks that CI and the opt-outs are still reported before any consent exists. `upgrade` adds a case where a global installation made by an earlier CLI counts as consent.
- Changelog fragment: `.nextchanges/cli/aitools-auto-install-consent.md`.

Co-authored-by: Isaac <no-reply@databricks.com>
@anton-107
anton-107 requested review from a team and lennartkats-db as code owners November 27, 2026 17:08
@github-actions github-actions Bot added the aitools AI tools (databricks aitools) related changes label Nov 27, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 7c4f67e39 | Workflow run

Selected 7 changed tests (limit=20, 0 not selected)

7 tests: regression=7 unreleased=0 coverage=0 failing=0
test branch main (cfd268f) latest (v1.28.0)
TestAccept/cmd/aitools/auto-install/agent-hint ✅ ❌ ❌
TestAccept/cmd/aitools/auto-install/first-run ✅ ❌ ❌
TestAccept/cmd/aitools/auto-install/no-consent ✅ ❌ ❌
TestAccept/cmd/aitools/auto-install/no-terminal ✅ ❌ ❌
TestAccept/cmd/aitools/auto-install/retries ✅ ❌ ❌
TestAccept/cmd/aitools/auto-install/skipped ✅ ❌ ❌
TestAccept/cmd/aitools/auto-install/upgrade ✅ ❌ ❌
TestAccept/cmd/aitools/auto-install/agent-hint: branch ✅ | main (cfd268f) ❌ | latest (v1.28.0) ❌

main (cfd268f):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:43363" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:43363" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/agent-hint/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installagent-hint16661198/002/output.txt
        @@ -16,7 +16,7 @@
         === first run of a new version: the install notice, no install hint
         
         >>> CLAUDECODE=1 [CLI] jobs list
        -Installed Databricks AI tools for Claude Code, Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        +Installed Databricks AI tools for Claude Code, Cursor. Disable: databricks aitools auto-install disable
         
         >>> print_telemetry
         {"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CLAUDE_CODE","CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CLAUDE_CODE","error_category":"CLI_NOT_ON_PATH"}],"trigger":"AUTO_FIRST_RUN"}}
        @@ -52,7 +52,7 @@
         
         >>> CLAUDECODE=1 [CLI] jobs list
         Databricks skills are not installed. To work with Databricks reliably, first run: databricks aitools install
        -Installed Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        +Installed Databricks AI tools for Cursor. Disable: databricks aitools auto-install disable
         
         >>> print_telemetry
         {"command":"jobs_list","exit_code":0,"aitools_hint_event":{"hint_kind":"INSTALL_TEXT"}}

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:34587" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:34587" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/agent-hint/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installagent-hint2885161414/002/output.txt
        @@ -16,7 +16,7 @@
         === first run of a new version: the install notice, no install hint
         
         >>> CLAUDECODE=1 [CLI] jobs list
        -Installed Databricks AI tools for Claude Code, Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        +Installed Databricks AI tools for Claude Code, Cursor. Disable: databricks aitools auto-install disable
         
         >>> print_telemetry
         {"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CLAUDE_CODE","CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CLAUDE_CODE","error_category":"CLI_NOT_ON_PATH"}],"trigger":"AUTO_FIRST_RUN"}}
        @@ -52,7 +52,7 @@
         
         >>> CLAUDECODE=1 [CLI] jobs list
         Databricks skills are not installed. To work with Databricks reliably, first run: databricks aitools install
        -Installed Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        +Installed Databricks AI tools for Cursor. Disable: databricks aitools auto-install disable
         
         >>> print_telemetry
         {"command":"jobs_list","exit_code":0,"aitools_hint_event":{"hint_kind":"INSTALL_TEXT"}}
TestAccept/cmd/aitools/auto-install/first-run: branch ✅ | main (cfd268f) ❌ | latest (v1.28.0) ❌

main (cfd268f):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:38529" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:38529" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/first-run/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installfirst-run1438553339/002/output.txt
        @@ -5,18 +5,14 @@
         === first run of a new version: installs for the detected agents, one stderr line
         
         >>> [CLI] jobs list
        -Installed Databricks AI tools for Claude Code, Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CLAUDE_CODE","CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CLAUDE_CODE","error_category":"CLI_NOT_ON_PATH"}],"trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> cursor_skills
        -databricks-test
        +(no skills)
         
         >>> auto_install_state
         {
        -  "last_version": "1.30.0",
           "consented": true,
           "id": "treatment-machine"
         }
        @@ -30,45 +19,6 @@
         === uninstall turns it off: the next version installs nothing
         
         >>> [CLI] aitools uninstall
        -Uninstalled 1 skill.
        +Error: no skills or plugins installed
         
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 [CLI] jobs list
        -
        ->>> print_telemetry
        -{"command":"aitools_uninstall","exit_code":0,"aitools_command_event":{"command":"UNINSTALL","stage":"STARTED","interactive":false}}
        -{"command":"aitools_uninstall","exit_code":0,"aitools_command_event":{"command":"UNINSTALL","stage":"FINISHED","outcome":"SUCCESS","interactive":false,"scope":"GLOBAL"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"SKIPPED_OPTOUT","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -(no skills)
        -
        -=== first run with a skill placed by hand in an agent's skills directory: kept, nothing printed, not retried for this version
        -
        ->>> [CLI] jobs list
        -
        ->>> auto_install_outcome
        -
        ->>> cursor_skills
        -databricks-test
        -
        ->>> hand_placed_files
        -NOTES.md
        -SKILL.md
        -
        ->>> cat [TEST_TMP_DIR]/hand-placed-home/.cursor/skills/databricks-test/SKILL.md
        -my own skill
        -
        ->>> settled_version
        -{}
        -
        -=== first run with the user's own skill under another name in an agent's skills directory: installs
        -
        ->>> [CLI] jobs list
        -
        ->>> auto_install_outcome
        -
        ->>> cursor_skills
        -databricks-team-conventions
        -
        ->>> cat [TEST_TMP_DIR]/own-skill-home/.cursor/skills/databricks-team-conventions/SKILL.md
        -my own skill
        +Exit code: 1

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:39929" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:39929" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/first-run/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installfirst-run1986733468/002/output.txt
        @@ -5,19 +5,14 @@
         === first run of a new version: installs for the detected agents, one stderr line
         
         >>> [CLI] jobs list
        -Installed Databricks AI tools for Claude Code, Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CLAUDE_CODE","CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CLAUDE_CODE","error_category":"CLI_NOT_ON_PATH"}],"trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> cursor_skills
        -databricks-test
        +(no skills)
         
         >>> auto_install_state
         {
        -  "last_version": "1.30.0",
        -  "consented": true,
           "id": "treatment-machine"
         }
         
        @@ -30,45 +18,6 @@
         === uninstall turns it off: the next version installs nothing
         
         >>> [CLI] aitools uninstall
        -Uninstalled 1 skill.
        +Error: no skills or plugins installed
         
        ->>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 [CLI] jobs list
        -
        ->>> print_telemetry
        -{"command":"aitools_uninstall","exit_code":0,"aitools_command_event":{"command":"UNINSTALL","stage":"STARTED","interactive":false}}
        -{"command":"aitools_uninstall","exit_code":0,"aitools_command_event":{"command":"UNINSTALL","stage":"FINISHED","outcome":"SUCCESS","interactive":false,"scope":"GLOBAL"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"SKIPPED_OPTOUT","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -(no skills)
        -
        -=== first run with a skill placed by hand in an agent's skills directory: kept, nothing printed, not retried for this version
        -
        ->>> [CLI] jobs list
        -
        ->>> auto_install_outcome
        -
        ->>> cursor_skills
        -databricks-test
        -
        ->>> hand_placed_files
        -NOTES.md
        -SKILL.md
        -
        ->>> cat [TEST_TMP_DIR]/hand-placed-home/.cursor/skills/databricks-test/SKILL.md
        -my own skill
        -
        ->>> settled_version
        -{}
        -
        -=== first run with the user's own skill under another name in an agent's skills directory: installs
        -
        ->>> [CLI] jobs list
        -
        ->>> auto_install_outcome
        -
        ->>> cursor_skills
        -databricks-team-conventions
        -
        ->>> cat [TEST_TMP_DIR]/own-skill-home/.cursor/skills/databricks-team-conventions/SKILL.md
        -my own skill
        +Exit code: 1
TestAccept/cmd/aitools/auto-install/no-consent: branch ✅ | main (cfd268f) ❌ | latest (v1.28.0) ❌

main (cfd268f):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:33021" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:33021" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/no-consent/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installno-consent2140610658/002/output.txt
        @@ -2,35 +2,8 @@
         === the user never answered: nothing installed, written or reported, the gate is not looked up, and the agent gets the install hint
         
         >>> CLAUDECODE=1 [CLI] jobs list --log-file LOG.no-consent --log-level debug
        -Databricks skills are not installed. To work with Databricks reliably, first run: databricks aitools install
        +Installed Databricks AI tools for Claude Code, Cursor. Disable: databricks aitools auto-install disable
        +contains error: 'Using cached manifest' was not expected: '17:37:32 Debug: Using cached manifest from [TEST_TMP_DIR]_PARENT/004/.cache/compat-manifest.json pid=9049'
        +contains error: 'auto-install: skipped: no_consent' not found in the output.
         
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_hint_event":{"hint_kind":"INSTALL_TEXT"}}
        -
        ->>> cursor_skills
        -(no skills)
        -
        ->>> auto_install_state
        -{"id": "treatment-machine"}
        -
        -=== the user agrees: the next command of the same version installs
        -
        ->>> [CLI] aitools auto-install enable
        -Automatic installation of Databricks AI tools is enabled.
        -
        ->>> CLAUDECODE=1 [CLI] jobs list --log-file LOG.consent --log-level debug
        -Installed Databricks AI tools for Claude Code, Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CLAUDE_CODE","CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CLAUDE_CODE","error_category":"CLI_NOT_ON_PATH"}],"trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -databricks-test
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.30.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        +Exit code: 1
        
    acceptance_test.go:1180: 
        LOG.no-consent: 17:37:32 Info: start pid=9049 version=1.29.0-dev args="/tmp/TestAccept1959730500/001/databricks, jobs, list, --log-file, LOG.no-consent, --log-level, debug"
        LOG.no-consent: 17:37:32 Debug: [Local Cache] using cache key: 10b36ecb968792c3332194cb5d39d2a5c30529421810fe275a3a9949dc61c61a pid=9049
        LOG.no-consent: 17:37:32 Debug: [Local Cache] cache miss, computing pid=9049
        LOG.no-consent: 17:37:32 Debug: GET /.well-known/databricks-config
        LOG.no-consent: < HTTP/1.1 200 OK
        LOG.no-consent: < {
        LOG.no-consent: <   "oidc_endpoint": "http://127.0.0.1:33021/oidc",
        LOG.no-consent: <   "workspace_id": "900800700600"
        LOG.no-consent: < } pid=9049 sdk=true
        LOG.no-consent: 17:37:32 Debug: [Local Cache] computed and stored result pid=9049
        LOG.no-consent: 17:37:32 Debug: Resolved workspace_id from host metadata: "900800700600" pid=9049 sdk=true
        LOG.no-consent: 17:37:32 Debug: Resolved cloud from hostname: "AWS" pid=9049 sdk=true
        LOG.no-consent: 17:37:32 Debug: Resolved discovery_url from host metadata: "http://127.0.0.1:33021/oidc/.well-known/oauth-authorization-server" pid=9049 sdk=true
        LOG.no-consent: 17:37:32 Debug: GET /api/2.2/jobs/list
        LOG.no-consent: < HTTP/1.1 200 OK
        LOG.no-consent: < {} pid=9049 sdk=true
        LOG.no-consent: 17:37:32 Debug: Using cached manifest from /tmp/TestAcceptcmdaitoolsauto-installno-consent2140610658/004/.cache/compat-manifest.json pid=9049
        LOG.no-consent: 17:37:32 Debug: Fetching skills manifest from databricks/databricks-agent-skills@test-ref pid=9049
        LOG.no-consent: 17:37:32 Debug: Downloading databricks-test/SKILL.md pid=9049
        LOG.no-consent: 17:37:32 Debug: Installed "databricks-test" for Claude Code (symlinked) pid=9049
        LOG.no-consent: 17:37:32 Debug: Installed "databricks-test" for Cursor (symlinked) pid=9049
        LOG.no-consent: 17:37:32 Debug: auto-install: installed pid=9049
        LOG.no-consent: 17:37:32 Info: completed execution pid=9049 exit_code=0
        LOG.no-consent: 17:37:32 Debug: POST /telemetry-ext
        LOG.no-consent: > {
        LOG.no-consent: >   "items": null,
        LOG.no-consent: >   "protoLogs": [
        LOG.no-consent: >     "{\"frontend_log_event_id\":\"c4a40dad-7bb0-4792-8756-d4cf0ee46243\",\"entry\":{\"databricks_cli_log\":{\"... (402 more bytes)",
        LOG.no-consent: >     "{\"frontend_log_event_id\":\"611f8476-97b0-4ce3-a19e-09b79fc2943b\",\"entry\":{\"databricks_cli_log\":{\"... (284 more bytes)"
        LOG.no-consent: >   ],
        LOG.no-consent: >   "uploadTime": 1795801052217
        LOG.no-consent: > }
        LOG.no-consent: < HTTP/1.1 200 OK
        LOG.no-consent: < {
        LOG.no-consent: <   "errors": null,
        LOG.no-consent: <   "numProtoSuccess": 2
        LOG.no-consent: < } pid=9049 sdk=true
        LOG.no-consent: 17:37:32 Debug: All 2 logs uploaded successfully pid=9049
    acceptance_test.go:1180: 
        LOG.no-consent-checked: 17:37:32 Info: start pid=9049 version=1.29.0-dev args="/tmp/TestAccept1959730500/001/databricks, jobs, list, --log-file, LOG.no-consent, --log-level, debug"
        LOG.no-consent-checked: 17:37:32 Debug: [Local Cache] using cache key: 10b36ecb968792c3332194cb5d39d2a5c30529421810fe275a3a9949dc61c61a pid=9049
        LOG.no-consent-checked: 17:37:32 Debug: [Local Cache] cache miss, computing pid=9049
        LOG.no-consent-checked: 17:37:32 Debug: GET /.well-known/databricks-config
        LOG.no-consent-checked: < HTTP/1.1 200 OK
        LOG.no-consent-checked: < {
        LOG.no-consent-checked: <   "oidc_endpoint": "http://127.0.0.1:33021/oidc",
        LOG.no-consent-checked: <   "workspace_id": "900800700600"
        LOG.no-consent-checked: < } pid=9049 sdk=true
        LOG.no-consent-checked: 17:37:32 Debug: [Local Cache] computed and stored result pid=9049
        LOG.no-consent-checked: 17:37:32 Debug: Resolved workspace_id from host metadata: "900800700600" pid=9049 sdk=true
        LOG.no-consent-checked: 17:37:32 Debug: Resolved cloud from hostname: "AWS" pid=9049 sdk=true
        LOG.no-consent-checked: 17:37:32 Debug: Resolved discovery_url from host metadata: "http://127.0.0.1:33021/oidc/.well-known/oauth-authorization-server" pid=9049 sdk=true
        LOG.no-consent-checked: 17:37:32 Debug: GET /api/2.2/jobs/list
        LOG.no-consent-checked: < HTTP/1.1 200 OK
        LOG.no-consent-checked: < {} pid=9049 sdk=true
        LOG.no-consent-checked: 17:37:32 Debug: Using cached manifest from /tmp/TestAcceptcmdaitoolsauto-installno-consent2140610658/004/.cache/compat-manifest.json pid=9049
        LOG.no-consent-checked: 17:37:32 Debug: Fetching skills manifest from databricks/databricks-agent-skills@test-ref pid=9049
        LOG.no-consent-checked: 17:37:32 Debug: Downloading databricks-test/SKILL.md pid=9049
        LOG.no-consent-checked: 17:37:32 Debug: Installed "databricks-test" for Claude Code (symlinked) pid=9049
        LOG.no-consent-checked: 17:37:32 Debug: Installed "databricks-test" for Cursor (symlinked) pid=9049
        LOG.no-consent-checked: 17:37:32 Debug: auto-install: installed pid=9049
        LOG.no-consent-checked: 17:37:32 Info: completed execution pid=9049 exit_code=0
        LOG.no-consent-checked: 17:37:32 Debug: POST /telemetry-ext
        LOG.no-consent-checked: > {
        LOG.no-consent-checked: >   "items": null,
        LOG.no-consent-checked: >   "protoLogs": [
        LOG.no-consent-checked: >     "{\"frontend_log_event_id\":\"c4a40dad-7bb0-4792-8756-d4cf0ee46243\",\"entry\":{\"databricks_cli_log\":{\"... (402 more bytes)",
        LOG.no-consent-checked: >     "{\"frontend_log_event_id\":\"611f8476-97b0-4ce3-a19e-09b79fc2943b\",\"entry\":{\"databricks_cli_log\":{\"... (284 more bytes)"
        LOG.no-consent-checked: >   ],
        LOG.no-consent-checked: >   "uploadTime": 1795801052217
        LOG.no-consent-checked: > }
        LOG.no-consent-checked: < HTTP/1.1 200 OK
        LOG.no-consent-checked: < {
        LOG.no-consent-checked: <   "errors": null,
        LOG.no-consent-checked: <   "numProtoSuccess": 2
        LOG.no-consent-checked: < } pid=9049 sdk=true
        LOG.no-consent-checked: 17:37:32 Debug: All 2 logs uploaded successfully pid=9049

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:33953" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:33953" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/no-consent/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installno-consent4161138358/002/output.txt
        @@ -2,35 +2,8 @@
         === the user never answered: nothing installed, written or reported, the gate is not looked up, and the agent gets the install hint
         
         >>> CLAUDECODE=1 [CLI] jobs list --log-file LOG.no-consent --log-level debug
        -Databricks skills are not installed. To work with Databricks reliably, first run: databricks aitools install
        +Installed Databricks AI tools for Claude Code, Cursor. Disable: databricks aitools auto-install disable
        +contains error: 'Using cached manifest' was not expected: '17:37:39 Debug: Using cached manifest from [TEST_TMP_DIR]_PARENT/004/.cache/compat-manifest.json pid=9692'
        +contains error: 'auto-install: skipped: no_consent' not found in the output.
         
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_hint_event":{"hint_kind":"INSTALL_TEXT"}}
        -
        ->>> cursor_skills
        -(no skills)
        -
        ->>> auto_install_state
        -{"id": "treatment-machine"}
        -
        -=== the user agrees: the next command of the same version installs
        -
        ->>> [CLI] aitools auto-install enable
        -Automatic installation of Databricks AI tools is enabled.
        -
        ->>> CLAUDECODE=1 [CLI] jobs list --log-file LOG.consent --log-level debug
        -Installed Databricks AI tools for Claude Code, Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
        -
        ->>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CLAUDE_CODE","CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","agent_results":[{"agent":"CLAUDE_CODE","error_category":"CLI_NOT_ON_PATH"}],"trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
        -
        ->>> cursor_skills
        -databricks-test
        -
        ->>> auto_install_state
        -{
        -  "last_version": "1.30.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        -}
        +Exit code: 1
        
    acceptance_test.go:1180: 
        LOG.no-consent: 17:37:39 Info: start pid=9692 version=1.28.0 args="/home/runner/work/cli/cli/acceptance/build/linux_amd64/1.28.0/databricks, jobs, list, --log-file, LOG.no-consent, --log-level, debug"
        LOG.no-consent: 17:37:39 Debug: [Local Cache] using cache key: cb3b1a8c939c3a8696416a9901b4ef02ce20a41be8ff7da5f6004f7a2f6c7be0 pid=9692
        LOG.no-consent: 17:37:39 Debug: [Local Cache] cache miss, computing pid=9692
        LOG.no-consent: 17:37:39 Debug: GET /.well-known/databricks-config
        LOG.no-consent: < HTTP/1.1 200 OK
        LOG.no-consent: < {
        LOG.no-consent: <   "oidc_endpoint": "http://127.0.0.1:33953/oidc",
        LOG.no-consent: <   "workspace_id": "900800700600"
        LOG.no-consent: < } pid=9692 sdk=true
        LOG.no-consent: 17:37:39 Debug: [Local Cache] computed and stored result pid=9692
        LOG.no-consent: 17:37:39 Debug: Resolved workspace_id from host metadata: "900800700600" pid=9692 sdk=true
        LOG.no-consent: 17:37:39 Debug: Resolved cloud from hostname: "AWS" pid=9692 sdk=true
        LOG.no-consent: 17:37:39 Debug: Resolved discovery_url from host metadata: "http://127.0.0.1:33953/oidc/.well-known/oauth-authorization-server" pid=9692 sdk=true
        LOG.no-consent: 17:37:39 Debug: GET /api/2.2/jobs/list
        LOG.no-consent: < HTTP/1.1 200 OK
        LOG.no-consent: < {} pid=9692 sdk=true
        LOG.no-consent: 17:37:39 Debug: Using cached manifest from /tmp/TestAcceptcmdaitoolsauto-installno-consent4161138358/004/.cache/compat-manifest.json pid=9692
        LOG.no-consent: 17:37:39 Debug: Fetching skills manifest from databricks/databricks-agent-skills@test-ref pid=9692
        LOG.no-consent: 17:37:39 Debug: Downloading databricks-test/SKILL.md pid=9692
        LOG.no-consent: 17:37:39 Debug: Installed "databricks-test" for Claude Code (symlinked) pid=9692
        LOG.no-consent: 17:37:39 Debug: Installed "databricks-test" for Cursor (symlinked) pid=9692
        LOG.no-consent: 17:37:39 Debug: auto-install: installed pid=9692
        LOG.no-consent: 17:37:39 Info: completed execution pid=9692 exit_code=0
        LOG.no-consent: 17:37:39 Debug: POST /telemetry-ext
        LOG.no-consent: > {
        LOG.no-consent: >   "items": null,
        LOG.no-consent: >   "protoLogs": [
        LOG.no-consent: >     "{\"frontend_log_event_id\":\"ce04a6c1-fe91-49cd-9d59-07c5f026c4a8\",\"entry\":{\"databricks_cli_log\":{\"... (398 more bytes)",
        LOG.no-consent: >     "{\"frontend_log_event_id\":\"cdf3cb4c-ea31-4478-8753-356a7caf5a72\",\"entry\":{\"databricks_cli_log\":{\"... (280 more bytes)"
        LOG.no-consent: >   ],
        LOG.no-consent: >   "uploadTime": 1795801059698
        LOG.no-consent: > }
        LOG.no-consent: < HTTP/1.1 200 OK
        LOG.no-consent: < {
        LOG.no-consent: <   "errors": null,
        LOG.no-consent: <   "numProtoSuccess": 2
        LOG.no-consent: < } pid=9692 sdk=true
        LOG.no-consent: 17:37:39 Debug: All 2 logs uploaded successfully pid=9692
    acceptance_test.go:1180: 
        LOG.no-consent-checked: 17:37:39 Info: start pid=9692 version=1.28.0 args="/home/runner/work/cli/cli/acceptance/build/linux_amd64/1.28.0/databricks, jobs, list, --log-file, LOG.no-consent, --log-level, debug"
        LOG.no-consent-checked: 17:37:39 Debug: [Local Cache] using cache key: cb3b1a8c939c3a8696416a9901b4ef02ce20a41be8ff7da5f6004f7a2f6c7be0 pid=9692
        LOG.no-consent-checked: 17:37:39 Debug: [Local Cache] cache miss, computing pid=9692
        LOG.no-consent-checked: 17:37:39 Debug: GET /.well-known/databricks-config
        LOG.no-consent-checked: < HTTP/1.1 200 OK
        LOG.no-consent-checked: < {
        LOG.no-consent-checked: <   "oidc_endpoint": "http://127.0.0.1:33953/oidc",
        LOG.no-consent-checked: <   "workspace_id": "900800700600"
        LOG.no-consent-checked: < } pid=9692 sdk=true
        LOG.no-consent-checked: 17:37:39 Debug: [Local Cache] computed and stored result pid=9692
        LOG.no-consent-checked: 17:37:39 Debug: Resolved workspace_id from host metadata: "900800700600" pid=9692 sdk=true
        LOG.no-consent-checked: 17:37:39 Debug: Resolved cloud from hostname: "AWS" pid=9692 sdk=true
        LOG.no-consent-checked: 17:37:39 Debug: Resolved discovery_url from host metadata: "http://127.0.0.1:33953/oidc/.well-known/oauth-authorization-server" pid=9692 sdk=true
        LOG.no-consent-checked: 17:37:39 Debug: GET /api/2.2/jobs/list
        LOG.no-consent-checked: < HTTP/1.1 200 OK
        LOG.no-consent-checked: < {} pid=9692 sdk=true
        LOG.no-consent-checked: 17:37:39 Debug: Using cached manifest from /tmp/TestAcceptcmdaitoolsauto-installno-consent4161138358/004/.cache/compat-manifest.json pid=9692
        LOG.no-consent-checked: 17:37:39 Debug: Fetching skills manifest from databricks/databricks-agent-skills@test-ref pid=9692
        LOG.no-consent-checked: 17:37:39 Debug: Downloading databricks-test/SKILL.md pid=9692
        LOG.no-consent-checked: 17:37:39 Debug: Installed "databricks-test" for Claude Code (symlinked) pid=9692
        LOG.no-consent-checked: 17:37:39 Debug: Installed "databricks-test" for Cursor (symlinked) pid=9692
        LOG.no-consent-checked: 17:37:39 Debug: auto-install: installed pid=9692
        LOG.no-consent-checked: 17:37:39 Info: completed execution pid=9692 exit_code=0
        LOG.no-consent-checked: 17:37:39 Debug: POST /telemetry-ext
        LOG.no-consent-checked: > {
        LOG.no-consent-checked: >   "items": null,
        LOG.no-consent-checked: >   "protoLogs": [
        LOG.no-consent-checked: >     "{\"frontend_log_event_id\":\"ce04a6c1-fe91-49cd-9d59-07c5f026c4a8\",\"entry\":{\"databricks_cli_log\":{\"... (398 more bytes)",
        LOG.no-consent-checked: >     "{\"frontend_log_event_id\":\"cdf3cb4c-ea31-4478-8753-356a7caf5a72\",\"entry\":{\"databricks_cli_log\":{\"... (280 more bytes)"
        LOG.no-consent-checked: >   ],
        LOG.no-consent-checked: >   "uploadTime": 1795801059698
        LOG.no-consent-checked: > }
        LOG.no-consent-checked: < HTTP/1.1 200 OK
        LOG.no-consent-checked: < {
        LOG.no-consent-checked: <   "errors": null,
        LOG.no-consent-checked: <   "numProtoSuccess": 2
        LOG.no-consent-checked: < } pid=9692 sdk=true
        LOG.no-consent-checked: 17:37:39 Debug: All 2 logs uploaded successfully pid=9692
TestAccept/cmd/aitools/auto-install/no-terminal: branch ✅ | main (cfd268f) ❌ | latest (v1.28.0) ❌

main (cfd268f):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:42361" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:42361" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/no-terminal/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installno-terminal3695055437/002/output.txt
        @@ -5,18 +5,14 @@
         === no terminal and no coding agent: installs without asking
         
         >>> [CLI] jobs list
        -Installed Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> cursor_skills
        -databricks-test
        +(no skills)
         
         >>> auto_install_state
         {
        -  "last_version": "1.30.0",
           "consented": true,
           "id": "treatment-machine"
         }
        @@ -24,9 +13,11 @@
         === a coding agent's call on the next version: the update runs without asking
         
         >>> AGENT=test-agent DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 [CLI] jobs list
        +Installed Databricks AI tools for Cursor. Disable: databricks aitools auto-install disable
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"UP_TO_DATE","holdout_arm":"TREATMENT","interactive":false}}
        +{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","trigger":"AUTO_FIRST_RUN"}}
        +{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> auto_install_state
         {

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:46369" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:46369" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/no-terminal/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installno-terminal2954517719/002/output.txt
        @@ -5,32 +5,28 @@
         === no terminal and no coding agent: installs without asking
         
         >>> [CLI] jobs list
        -Installed Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> cursor_skills
        -databricks-test
        +(no skills)
         
         >>> auto_install_state
         {
        -  "last_version": "1.30.0",
        -  "consented": true,
           "id": "treatment-machine"
         }
         
         === a coding agent's call on the next version: the update runs without asking
         
         >>> AGENT=test-agent DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 [CLI] jobs list
        +Installed Databricks AI tools for Cursor. Disable: databricks aitools auto-install disable
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"UP_TO_DATE","holdout_arm":"TREATMENT","interactive":false}}
        +{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","trigger":"AUTO_FIRST_RUN"}}
        +{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> auto_install_state
         {
           "last_version": "1.31.0",
        -  "consented": true,
           "id": "treatment-machine"
         }
TestAccept/cmd/aitools/auto-install/retries: branch ✅ | main (cfd268f) ❌ | latest (v1.28.0) ❌

main (cfd268f):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:40155" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:40155" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/retries/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installretries2964320825/002/output.txt
        @@ -5,8 +5,6 @@
         === a failed attempt is silent, and the commands right after it do not retry
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"SKILLS_FETCH_FAILED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"FAILED","holdout_arm":"TREATMENT","interactive":false,"error_category":"SKILLS_FETCH_FAILED"}}
         
         >>> DATABRICKS_SKILLS_REF=broken-ref [CLI] jobs list
         
        @@ -14,25 +12,17 @@
         
         >>> auto_install_state
         {
        -  "last_version": "1.30.0",
        -  "attempts": 1,
        -  "last_attempt": "[LAST_ATTEMPT]",
           "consented": true,
        -  "installing": true,
           "id": "treatment-machine"
         }
         
         === once the wait is over, the next run retries, up to 10 attempts
         
         >>> print_telemetry
        -8 {"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"FAILED","holdout_arm":"TREATMENT","interactive":false,"error_category":"SKILLS_FETCH_FAILED"}}
        -8 {"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"SKILLS_FETCH_FAILED","trigger":"AUTO_FIRST_RUN"}}
         
         >>> DATABRICKS_SKILLS_REF=broken-ref [CLI] jobs list
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"SKILLS_FETCH_FAILED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"RETRIES_EXHAUSTED","holdout_arm":"TREATMENT","interactive":false,"error_category":"SKILLS_FETCH_FAILED"}}
         
         === after 10 attempts the version gets no more
         
        @@ -46,15 +25,12 @@
         === a new version starts over
         
         >>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 [CLI] jobs list
        -Installed Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> auto_install_state
         {
        -  "last_version": "1.31.0",
           "consented": true,
        -  "id": "treatment-machine"
        +  "id": "treatment-machine",
        +  "last_attempt": "[LAST_ATTEMPT]"
         }

latest (v1.28.0):

acceptance_test.go:1270: Substituted DATABRICKS_CLI_GITHUB_API_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:43603" ("[DATABRICKS_HOST]")
    acceptance_test.go:1270: Substituted DATABRICKS_SKILLS_BASE_URL "$DATABRICKS_HOST" -> "http://127.0.0.1:43603" ("[DATABRICKS_HOST]")
    acceptance_test.go:1402: Diff:
        --- cmd/aitools/auto-install/retries/output.txt
        +++ /tmp/TestAcceptcmdaitoolsauto-installretries1109310507/002/output.txt
        @@ -5,8 +5,6 @@
         === a failed attempt is silent, and the commands right after it do not retry
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"SKILLS_FETCH_FAILED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"FAILED","holdout_arm":"TREATMENT","interactive":false,"error_category":"SKILLS_FETCH_FAILED"}}
         
         >>> DATABRICKS_SKILLS_REF=broken-ref [CLI] jobs list
         
        @@ -14,25 +12,16 @@
         
         >>> auto_install_state
         {
        -  "last_version": "1.30.0",
        -  "attempts": 1,
        -  "last_attempt": "[LAST_ATTEMPT]",
        -  "consented": true,
        -  "installing": true,
           "id": "treatment-machine"
         }
         
         === once the wait is over, the next run retries, up to 10 attempts
         
         >>> print_telemetry
        -8 {"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"FAILED","holdout_arm":"TREATMENT","interactive":false,"error_category":"SKILLS_FETCH_FAILED"}}
        -8 {"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"SKILLS_FETCH_FAILED","trigger":"AUTO_FIRST_RUN"}}
         
         >>> DATABRICKS_SKILLS_REF=broken-ref [CLI] jobs list
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"SKILLS_FETCH_FAILED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"RETRIES_EXHAUSTED","holdout_arm":"TREATMENT","interactive":false,"error_category":"SKILLS_FETCH_FAILED"}}
         
         === after 10 attempts the version gets no more
         
        @@ -46,15 +25,11 @@
         === a new version starts over
         
         >>> DATABRICKS_AITOOLS_AUTO_INSTALL_CLI_VERSION=1.31.0 [CLI] jobs list
        -Installed Databricks AI tools for Cursor. Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall
         
         >>> print_telemetry
        -{"command":"jobs_list","exit_code":0,"aitools_install_event":{"agents":["CURSOR"],"scope":"GLOBAL","error_category":"TYPE_UNSPECIFIED","trigger":"AUTO_FIRST_RUN"}}
        -{"command":"jobs_list","exit_code":0,"aitools_auto_install_event":{"outcome":"INSTALLED","holdout_arm":"TREATMENT","interactive":false}}
         
         >>> auto_install_state
         {
        -  "last_version": "1.31.0",
        -  "consented": true,
        -  "id": "treatment-machine"
        +  "id": "treatment-machine",
        +  "last_attempt": "[LAST_ATTEMPT]"
         }

2 more failure details omitted, see the full report in the run.

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review at 52c05f0. Each finding was verified against the code.

No blocking issues found. 4 non-blocking comment(s) below.

This PR replaces the post-command install prompt with a consent gate. Auto-install now runs only after auto-install enable, a global install, a "yes" in apps init, or when it finds an existing CLI-made global installation, and the prompt's terminal-handling code is removed. The gating logic looks consistent. Two first-run acceptance cases were regenerated into no-ops instead of being given consent. The new notice's uninstall hint fails when a project-scope install also exists. The changelog fragment is missing the PR link that check-changelog requires. One new unit test repeats the new no-consent acceptance case.


>>> settled_version
{"last_version":"1.30.0","installed_without_consent":true}
{}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nice to have] use_home hand-placed-home and use_home own-skill-home start with no consent, and the script never runs auto-install enable for them, so both runs now stop at no_consent. The regenerated golden accepted that: no KEPT outcome, settled_version is {}, and the own-skill case (lines 66-71) prints no notice and installs no databricks-test. The titles still say "kept … not retried" and "installs", and the hand-placed refusal has no acceptance coverage left. Can you add trace $CLI aitools auto-install enable after each of those use_home calls, as agent-hint and skipped do, and regenerate?

const autoInstallDisable = "databricks aitools auto-install disable"
// autoInstallNoticeCommands is the end of the notice: how to turn auto-install
// off and how to remove what it installed.
const autoInstallNoticeCommands = "Turn off: databricks aitools auto-install disable. Remove: databricks aitools uninstall"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nice to have] Say a project-scope install exists in the current directory. A coding agent or other non-interactive caller that runs the advertised databricks aitools uninstall gets the "installed in both global and project scopes" error from resolveScopeForUninstall. A person at a terminal gets a scope picker where they can choose the project scope. In both cases the command doesn't remove what auto-install installed. Can the notice say databricks aitools uninstall --scope=global, since auto-install only ever installs in global scope?

@@ -0,0 +1 @@
* The automatic installation of Databricks AI tools now runs only after explicit consent or when an existing CLI-managed global installation is found. Explicit consent is `databricks aitools auto-install enable`, a global `databricks aitools install`, or a "yes" to the skills prompt of `databricks apps init`. If you ran `databricks aitools auto-install enable` with an earlier CLI version and have no global installation that the CLI made, run it again: before, it only undid `disable` and did not record an agreement. With such an installation, the CLI infers the consent automatically. It no longer asks anything after a command, and its notice now also names `databricks aitools uninstall`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nice to have] .nextchanges/README.md requires a trailing ([#NNNN](https://github.com/databricks/cli/pull/NNNN)) link after the final period, and task check-changelog fails on this PR without it. Can you add it? You could also trim the entry while you're there: it's long for one bullet.

assert.NotContains(t, stderr.String(), "Install Databricks AI tools")
// A machine whose user agrees after a run of a version installs on the next
// run of that version: the run without the consent left the version unsettled.
func TestAutoInstallAfterConsentOnTheSameVersion(t *testing.T) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] TestAutoInstallAfterConsentOnTheSameVersion makes the same checks as the second phase of the new acceptance/cmd/aitools/auto-install/no-consent test. First a run without consent leaves the state alone, then consent is stored, then the next run of the same version installs and stores {last_version: 1.30.0, consented: true}. .agents/rules/testing.md asks not to add a unit test that only duplicates an acceptance test. Can you drop it, or narrow it to something the acceptance test can't see?

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 7c4f67e

Run: 46042475336

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 173 24 3:38
💚​ aws-windows-latest-4core-16gb 1 173 24 3:06
💚​ azure linux-2core-8gb 1 172 24 3:30
💚​ azure-windows-latest-4core-16gb 1 172 24 3:08
💚​ gcp linux-2core-8gb 1 173 24 4:07
💚​ gcp-windows-latest-4core-16gb 1 173 24 3:45
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:06 gcp linux-2core-8gb TestAccept
3:44 gcp-windows-latest-4core-16gb TestAccept
3:29 azure linux-2core-8gb TestAccept
3:27 aws linux-2core-8gb TestAccept
3:06 azure-windows-latest-4core-16gb TestAccept
3:04 aws-windows-latest-4core-16gb TestAccept

@rugpanov rugpanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changelog fix. All checks pass now. I have one question that can affect the consent rule, and two smaller points.

[nice to have] .nextchanges/cli/aitools-auto-install-keeps-hand-placed-skills.md (from #8071, not released yet) says "if you answered yes to the install question, it prints which skill it kept and the command that replaces it". This PR removes that question and that message. Then the next release notes describe a behavior that never ships. Remove that clause from the fragment in this PR.

The review-oss-bot comments on the first-run acceptance cases and on the uninstall notice are still open at this head.

Risk: HIGH. The change ships in the CLI binary and runs in the post-command hook after every successful command, so a defect reaches all users and a fix needs a new release. It also deletes shared terminal and prompt helpers in libs/cmdio and edits AskCancellable and the apps vite bridge. The install path itself stays behind the remote per-version gate and becomes more conservative.

// in CI or with auto-install turned off in the environment does not count it.
// It only reads.
func existingInstallConsents(ctx context.Context, in autoinstall.Inputs) bool {
if in.CI || in.EnvOptOut || in.State.Consent() != autoinstall.ConsentUnknown {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Question] Is it intended that install state from v1.28.0 counts as consent here? v1.28.0 installs for a coding agent's run without a question, and it writes no marker for that. Also, main skipped this inference when State.Installing was true. This PR removes that guard and its tests. So an unfinished v1.28.0 agent install (installing: true plus a global .state.json) now becomes consented: true. The answer matters because the goal of the PR is no install that the user did not agree to. If the remote gate was never on for v1.28.0, no such state exists, and the point does not apply.

ReasonRetriesExhausted Reason = "retries_exhausted"
ReasonRetryNotDue Reason = "retry_not_due"
// The user never agreed to installing the tools. The version is left
// unsettled, so the first run after the user agrees installs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] This comment is true only for a run that stops at ReasonNoConsent. A CI run or a DATABRICKS_AITOOLS_AUTO_INSTALL=false run settles the version first. After that, ReasonAlreadyRan comes before the consent check, so auto-install enable on the same version installs nothing until the next version. Say this in the comment. If the first run after enable must install, check consent before ReasonAlreadyRan.

@anton-107
anton-107 added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit 1d0d314 Nov 27, 2026
29 checks passed
@anton-107
anton-107 deleted the aitools-auto-install-consent branch November 27, 2026 19:23
simonfaltum added a commit that referenced this pull request Nov 27, 2026
…icks-not-an-agent-makes-the-cli-ac

Keeps main's removal of the auto-install prompt (#8135). The interactive
flag now reads agent.Provider, so DATABRICKS_NOT_AN_AGENT keeps it off.

Co-authored-by: Isaac <no-reply@databricks.com>
simonfaltum added a commit that referenced this pull request Nov 27, 2026
Main removed the auto-install consent prompt (#8135). Keep main's side of
the auto-install run, and keep only the early return for the agent features
switch at the top of AutoInstall, before the state is read. The seeded state
in the disabled case now keeps its consent, and the disabled acceptance case
seeds consent first, so the disabled run is shown to install nothing even
with consent given.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aitools AI tools (databricks aitools) related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants