sessionStart primer prompts agents to ask for a Databricks CLI profile on unrelated chats

Open Beginner friendly
#240 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
cli, tooling

Research direction

Start with hooks/databricks-context.py and inspect the injected primer text and its scope. Check whether databricks-core contains corresponding profile-selection wording, then run python3 -m unittest discover -s tests -p '*_test.py'. Done means unrelated chats no longer prompt for a profile while Databricks CLI/MCP work still does.

Written by the indexing model from the issue text.

Description

Summary

With the Databricks plugin on Cursor, I get intrusive question banners for selecting Databricks auth profile on the sessions that have nothing to do with Databricks, and do not need (and as such should not setup) Databricks access.

hooks/databricks-context.py injects “Never auto-select a profile… let the user choose” with no scope. Agents treat it as a session checklist and ask for a CLI profile on unrelated chats.

Observed

On Cursor + Databricks plugin with multiple ~/.databrickscfg profiles:

First turn of a non-Databricks chat opens a Databricks profile picker before useful work. Local “ignore unless Databricks” rules don’t reliably override the banner.

Expected

Ask for a profile only when a Databricks CLI/MCP call is imminent — same intent as databricks-core Profile Selection, scoped to Databricks work.

Non-Databricks chats should not be blocked on a profile question.

Suggested direction (AI guess)

Softening the primer line in hooks/databricks-context.py, e.g.:

When you need the Databricks CLI, pass --profile <name> and ask which profile to use. Do not ask for a profile unless you are about to run a Databricks CLI/MCP command.

Optionally align the same scope wording in databricks-core so skill + banner stay consistent. Hook tests under tests/ should cover the new banner text (python3 -m unittest discover -s tests -p '*_test.py').

No change to generated hook wiring / metaplugin/plugin.meta.json should be required for a wording fix.

Dominant language
Python
Stars
323
Forks
82
Avg merge
50m
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-agent-skills

All issues in databricks/databricks-agent-skills

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.