Skip to content

Honor CLAUDE_CONFIG_DIR for Claude Code detection - #6838

Merged
parthban-db merged 3 commits into
mainfrom
parthban-db/stack/honor-claude-config-dir
Sep 25, 2026
Merged

parthban-db merged 3 commits into
mainfrom
parthban-db/stack/honor-claude-config-dir

Conversation

@parthban-db

@parthban-db parthban-db commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🥞 Stacked PR

Use this link to review incremental changes.


Changes

Honor CLAUDE_CONFIG_DIR when locating Claude Code configuration, skills, and installed plugins. An unset or empty override retains the ~/.claude default.

Why

Claude Code supports a separate configuration directory, but the CLI always inspected ~/.claude. It could therefore tell Claude to install Databricks skills despite a real plugin installation in its active configuration, or detect a plugin belonging to a different configuration.

Tests

AI-tools unit tests and the new command-level acceptance test pass. The acceptance test fails against unmodified CLI v1.17.0 on both custom-directory detection and precedence. Verified with real Claude Code that Bash inherits CLAUDE_CONFIG_DIR, the installed Databricks skills load, and the patched CLI warns only for the empty-config control. Go lint passes with the repository's Go 1.26.8 toolchain.

The acceptance test uses version because it exercises the installation hint without authentication or network access. aitools list is exempt from that hint, so substituting it would lose coverage of the original warning.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 97390e7

Run: 36128783402

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux 276 16 5:13
✅​ aws windows 278 14 3:31
🔄​ azure linux 2 273 16 5:34
✅​ azure windows 277 14 3:39
✅​ gcp linux 276 16 5:32
✅​ gcp windows 278 14 3:29
Test Name azure linux
🔄​ TestFsCpDirToDirWithOverwriteFlag 🔄​f
🔄​ TestFsCpDirToDirWithOverwriteFlag/uc-volumes_to_dbfs 🔄​f
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:07 gcp linux TestAccept
3:58 azure linux TestAccept
3:55 aws linux TestAccept
3:36 azure windows TestAccept
3:29 aws windows TestAccept
3:27 gcp windows TestAccept

Comment thread .nextchanges/cli/claude-config-dir.md Outdated

sethome ./empty-home
title "Plugin installed only in the custom config directory\n"
trace CLAUDE_CONFIG_DIR=custom $CLI version

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.

Why use databricks version? Wouldn't databricks aitools list give better results for this test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems aitools commands skip the install hint. So, we need to use another command.

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.

My question is why are we asserting on the install hint vs aitools list which will list the installed AI tools (or lack of installed tools if there are none)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will follow up on this on another PR.

@parthban-db
parthban-db force-pushed the parthban-db/stack/honor-claude-config-dir branch from 14d4722 to 97390e7 Compare September 25, 2026 11:19

@rclarey rclarey 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.

Won't block on the version vs aitools list thread, but I do think the latter is more explicit for what we are testing

@parthban-db
parthban-db added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit c624740 Sep 25, 2026
32 checks passed
@parthban-db
parthban-db deleted the parthban-db/stack/honor-claude-config-dir branch September 25, 2026 13:32
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: c624740

Run: 36141616006

Env ❌​FAIL 🔄​flaky ✅​pass 🙈​skip Time
❌​ aws linux 3 2 1683 1084 166:13
✅​ aws windows 1589 1109 190:13
✅​ azure linux 1497 1135 128:37
🔄​ azure windows 5 1393 1160 152:28
🔄​ gcp linux 3 1480 1139 148:22
🔄​ gcp windows 6 1378 1164 180:21
15 interesting tests: 12 flaky, 3 FAIL
Test Name aws linux azure windows gcp linux gcp windows
❌​ TestAccept ❌​F 🔄​f 🔄​f ✅​p
🔄​ TestAccept/bundle/debug/fetch-repository-info ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/debug/fetch-repository-info/DATABRICKS_BUNDLE_ENGINE=direct/DMS= ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/debug/fetch-repository-info/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true ✅​p ✅​p 🔄​f 🔄​f
🔄​ TestAccept/bundle/resources/apps/lifecycle-started ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS= ✅​p ✅​p ✅​p 🔄​f
❌​ TestAccept/bundle/resources/postgres_synced_tables/recreate ❌​F 🙈​s 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DATABRICKS_BUNDLE_ENGINE=terraform/DMS= ❌​F
🔄​ TestAccept/bundle/resources/synced_database_tables/basic ✅​p 🔄​f 🙈​s 🙈​s
🔄​ TestAccept/bundle/resources/synced_database_tables/basic/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🔄​f ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name/DATABRICKS_BUNDLE_ENGINE=direct/DMS= 🔄​f ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true ✅​p ✅​p ✅​p 🔄​f
🔄​ TestFsCpFileToFile ✅​p 🔄​f ✅​p ✅​p
🔄​ TestFsCpFileToFile/uc-volumes_to_dbfs ✅​p 🔄​f ✅​p ✅​p
Top 50 slowest tests (at least 2 minutes):
duration env testname
12:33 aws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
11:25 gcp linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
11:15 gcp windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
11:06 gcp windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
11:01 gcp linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
10:17 aws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
9:49 aws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
8:32 aws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
8:08 gcp windows TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:59 gcp linux TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:52 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:48 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:37 aws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:31 aws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:18 aws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:17 gcp windows TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:13 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:12 azure windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:06 gcp windows TestAccept/bundle/resources/clusters/deploy/data_security_mode/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
6:58 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
6:57 azure linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
6:53 azure windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:52 aws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:51 aws linux TestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
6:51 azure windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:50 aws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
6:48 azure linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:40 aws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:26 gcp linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:22 aws windows TestAccept/bundle/resources/clusters/deploy/data_security_mode/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
6:21 azure linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
6:20 aws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:00 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:00 gcp linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:56 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:56 aws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:54 aws windows TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
5:52 azure linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
5:43 aws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
5:15 aws windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
5:15 azure windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:13 aws windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:07 azure linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:05 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:00 azure linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
4:58 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
4:51 gcp linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
4:39 gcp linux TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
4:27 azure windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
4:24 gcp windows TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct/DMS=

deco-sdk-tagging Bot added a commit that referenced this pull request Sep 30, 2026
## Release v1.19.0

### CLI

 * Honor `CLAUDE_CONFIG_DIR` in `aitools` commands. ([#6838](#6838))
 * Added `--ttl` and `--no-expiry` flags to `databricks postgres create-branch` so a branch's expiration can be set without hand-writing a `--json` spec. `--ttl` accepts the REST API duration form (`604800s`), a Go duration (`168h`), or day/week units (`7d`, `3w`); `--no-expiry` creates a branch that never expires. One of `--ttl`, `--no-expiry`, or a spec expiration in `--json` is required. ([#6313](#6313))
 * `databricks ssh connect` serverless sessions now provide Claude Code and Codex configured with Unity Gateway out of the box. ([#6885](#6885))

### AI Runtime

 * Add `databricks air images push` (Preview) to configure Docker authentication and push container images to Databricks Artifact Registry. ([#6869](#6869))
 * `air run` now grants the configured `permissions` on the MLflow experiment as well as the job. ([#6870](#6870))

### Bundles

 * Add libraries field to clusters. ([#6831](#6831))
 * Error out when a configured `workspace_id` does not match the connected workspace, instead of silently using it in resource URLs emitted by `bundle summary`. ([#6754](#6754))
 * Fix spurious recreation of Lakebase (Postgres) branches, roles, and catalogs when the referenced project is updated in place: an in-place project change (e.g. `display_name`) no longer forces a delete + create of resources that reference the project's or branch's `name`. ([#6865](#6865))
 * Direct engine now detects and applies an explicitly configured integer zero (e.g. `gcp_attributes.local_ssd_count: 0`) added to a resource first deployed without the field. ([#6867](#6867))
 * Migrate existing Terraform deployment state to the direct engine before deploying (previously done after a Terraform deploy), so the deploy runs on the direct engine. ([#6749](#6749))
 * The `postgres_snapshot_schedules` resource (introduced in [v1.16.0](https://github.com/databricks/cli/releases/tag/v1.16.0)) is now marked Beta and is no longer available in PyDABs, matching the other `postgres_*` resources; configure it in YAML instead. ([#6887](#6887))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants