What I was trying to do
Develop a Streamlit data app for a real project, reading from Storage via the Query Service (POST /v2/storage/branch/{BRANCH_ID}/workspaces/{WS}/query). The app eventually deploys to production, so I needed a workspace on main that the Query Service can route to.
What actually happened (in order)
1. The alias was silently pinned to a dev branch from a previous, unrelated session
kbagent project list showed:
Alias Project Name ID Branch
keboola-… Keboola AI 361 main *
new-bran… Chat Data Engineer Demo 3047 37363
I did not pin this alias to branch 37363 in the current session — that state was carried over from some earlier, unrelated work (presumably kbagent branch use 37363 or kbagent project add --branch ...). kbagent persists the alias's branch context across sessions, which is the right default for many workflows but means agents (and humans) walking in cold have no way to tell they're operating against a non-default state until things break in confusing ways downstream.
A one-line warning at session start (or on the first command after a fresh shell) along the lines of Note: alias 'new-branches' is currently pinned to dev branch '37363' — run 'kbagent branch reset --project new-branches' to switch to main would have prevented everything below.
2. kbagent workspace list silently scopes to the pinned branch
With the alias pinned to 37363, kbagent workspace list --project new-branches only returns workspaces in that branch. It has no --branch flag and no informational prefix.
Compare with kbagent storage buckets, which usefully prints:
Info: Using production branch for read (active dev branch '37363' ignored; pass --branch 37363 to override)
workspace list should print the analogous notice and accept --branch for parity.
3. parameters.id in a sandbox config is NOT the Storage workspace ID
Falling back to kbagent config list --component-id keboola.sandboxes --branch 8653 reveals main-branch sandbox configs, e.g. one named "RO" with body:
{
"parameters": {
"id": "29590864"
}
}
Plausible reading: that's the Storage workspace ID. It is not. The actual Storage workspace ID for that sandbox is 13590754 — only the project owner knew this and had to correct me. kbagent workspace detail --workspace-id 29590864 returns Resource not found, which is correct but reinforces the wrong assumption.
config detail for keboola.sandboxes should either annotate the body output ("note: `parameters.id` is not the Storage workspace ID") or resolve and display the actual workspace ID alongside.
4. Once the right workspace ID is found, login-type incompatibility surfaces only at query time
Even after switching to workspace 13590754 (RO on main), the Query Service rejects it:
{
"error": "Custom query execution is not supported for login type \"snowflake-legacy-service\".",
"code": "storage.executeQuery.notSupportedLoginType"
}
There's no way to learn a workspace's login type from kbagent workspace detail or kbagent workspace list. For an RO-data-app workflow, this is the single most important compatibility signal — without it, every workspace selection is a coin-flip until you try a query.
Suggested fixes (rough priority)
- Session-start / first-command warning when any alias is in a non-default state (pinned to a dev branch, etc.). Persistence is fine; lack of visibility is the problem.
- `kbagent workspace list --branch ` for parity with `storage buckets` and `config list`. Print the same "using production branch / dev branch X ignored" notice these commands do.
- `kbagent workspace list` output should include the workspace's login type (or a `qs_compatible` boolean) so callers can pick a Query-Service-compatible one at a glance.
- `kbagent config detail --component-id keboola.sandboxes` should annotate output: `parameters.id` is not the Storage workspace ID, and the resolved Storage workspace ID should appear if available.
- Consider a `kbagent workspace list --for data-app` filter that pre-filters to RO + Query-Service-compatible workspaces on the production branch.
Repro / context
- kbagent v0.41.9, keboola-mcp-server v1.32.0
- Stack:
https://connection.us-east4.gcp.keboola.com (GCP us-east4)
- Project 3047 ("Chat Data Engineer Demo")
- Time spent: ~30 min and 4 wrong workspace IDs (including the
parameters.id red herring) before getting one that surfaces a usable error (login-type mismatch), with the actual ID supplied by the project owner.
What I was trying to do
Develop a Streamlit data app for a real project, reading from Storage via the Query Service (
POST /v2/storage/branch/{BRANCH_ID}/workspaces/{WS}/query). The app eventually deploys to production, so I needed a workspace on main that the Query Service can route to.What actually happened (in order)
1. The alias was silently pinned to a dev branch from a previous, unrelated session
kbagent project listshowed:I did not pin this alias to branch 37363 in the current session — that state was carried over from some earlier, unrelated work (presumably
kbagent branch use 37363orkbagent project add --branch ...). kbagent persists the alias's branch context across sessions, which is the right default for many workflows but means agents (and humans) walking in cold have no way to tell they're operating against a non-default state until things break in confusing ways downstream.A one-line warning at session start (or on the first command after a fresh shell) along the lines of
Note: alias 'new-branches' is currently pinned to dev branch '37363' — run 'kbagent branch reset --project new-branches' to switch to mainwould have prevented everything below.2.
kbagent workspace listsilently scopes to the pinned branchWith the alias pinned to 37363,
kbagent workspace list --project new-branchesonly returns workspaces in that branch. It has no--branchflag and no informational prefix.Compare with
kbagent storage buckets, which usefully prints:workspace listshould print the analogous notice and accept--branchfor parity.3.
parameters.idin a sandbox config is NOT the Storage workspace IDFalling back to
kbagent config list --component-id keboola.sandboxes --branch 8653reveals main-branch sandbox configs, e.g. one named "RO" with body:{ "parameters": { "id": "29590864" } }Plausible reading: that's the Storage workspace ID. It is not. The actual Storage workspace ID for that sandbox is
13590754— only the project owner knew this and had to correct me.kbagent workspace detail --workspace-id 29590864returnsResource not found, which is correct but reinforces the wrong assumption.config detailforkeboola.sandboxesshould either annotate the body output ("note: `parameters.id` is not the Storage workspace ID") or resolve and display the actual workspace ID alongside.4. Once the right workspace ID is found, login-type incompatibility surfaces only at query time
Even after switching to workspace
13590754(RO on main), the Query Service rejects it:{ "error": "Custom query execution is not supported for login type \"snowflake-legacy-service\".", "code": "storage.executeQuery.notSupportedLoginType" }There's no way to learn a workspace's login type from
kbagent workspace detailorkbagent workspace list. For an RO-data-app workflow, this is the single most important compatibility signal — without it, every workspace selection is a coin-flip until you try a query.Suggested fixes (rough priority)
Repro / context
https://connection.us-east4.gcp.keboola.com(GCP us-east4)parameters.idred herring) before getting one that surfaces a usable error (login-type mismatch), with the actual ID supplied by the project owner.