Bug Description
bm project list makes two related mistakes when discovering cloud projects: (a) it only fetches projects from a single workspace (the one named by --workspace or config.default_workspace), silently omitting projects in any other workspace the user has access to, and (b) the Workspace column in the resulting table is empty for every row unless that single workspace was explicitly specified.
Both symptoms stem from the same code path in src/basic_memory/cli/commands/project.py:list_projects, which assumes there is exactly one workspace to consider.
Steps To Reproduce
- Install Basic Memory from current
main (uv tool install --editable .)
- Have access to one or more cloud workspaces
- Do not pass
--workspace, and do not have default_workspace set in ~/.basic-memory/config.json
- Run
bm project list
Expected Behavior
- Projects from all workspaces the user has access to are listed
- The
Workspace column is populated for every cloud-sourced row, indicating which workspace owns the project
Actual Behavior
- Only projects from the default/specified workspace appear; projects in other workspaces are silently missing
- The
Workspace column is empty for every row
Environment
- OS: macOS 15.7.2 (Darwin 24.6.0)
- Python version: 3.14.2
- Basic Memory version:
0.20.4.dev75+c6fa185b (HEAD c6fa185b on main; note __version__ string still reads 0.20.3)
- Installation method:
uv tool install --editable .
Additional Context
Source analysis at src/basic_memory/cli/commands/project.py:323-510:
Bug 1 — Workspace column always empty. Lines 369-386 only resolve cloud_ws_name when effective_workspace is truthy:
if cloud_result and effective_workspace:
...
matched = next(
(ws for ws in workspaces if ws.tenant_id == effective_workspace),
None,
)
if matched:
cloud_ws_name = matched.name
With no --workspace and no default_workspace in config, effective_workspace is None, so cloud_ws_name stays None and the row-building code at line 462 never sets ws_label.
Bug 2 — Single-workspace cloud fetch. Line 365:
cloud_result = run_with_cleanup(_list_projects(effective_workspace))
calls the cloud list endpoint with a single workspace identifier. There's no iteration over get_available_workspaces(), so projects from any other workspace the user can access are silently excluded.
Possible Solution
Have list_projects iterate over get_available_workspaces(), call _list_projects(ws.tenant_id) per workspace, and label each row with the originating workspace name/type. The existing dedup-by-permalink logic would need to either be removed (workspace becomes part of the row identity) or extended to key on (workspace, permalink) so the same project name in two workspaces isn't collapsed.
Bug Description
bm project listmakes two related mistakes when discovering cloud projects: (a) it only fetches projects from a single workspace (the one named by--workspaceorconfig.default_workspace), silently omitting projects in any other workspace the user has access to, and (b) theWorkspacecolumn in the resulting table is empty for every row unless that single workspace was explicitly specified.Both symptoms stem from the same code path in
src/basic_memory/cli/commands/project.py:list_projects, which assumes there is exactly one workspace to consider.Steps To Reproduce
main(uv tool install --editable .)--workspace, and do not havedefault_workspaceset in~/.basic-memory/config.jsonbm project listExpected Behavior
Workspacecolumn is populated for every cloud-sourced row, indicating which workspace owns the projectActual Behavior
Workspacecolumn is empty for every rowEnvironment
0.20.4.dev75+c6fa185b(HEADc6fa185bonmain; note__version__string still reads0.20.3)uv tool install --editable .Additional Context
Source analysis at
src/basic_memory/cli/commands/project.py:323-510:Bug 1 — Workspace column always empty. Lines 369-386 only resolve
cloud_ws_namewheneffective_workspaceis truthy:With no
--workspaceand nodefault_workspacein config,effective_workspaceisNone, socloud_ws_namestaysNoneand the row-building code at line 462 never setsws_label.Bug 2 — Single-workspace cloud fetch. Line 365:
calls the cloud list endpoint with a single workspace identifier. There's no iteration over
get_available_workspaces(), so projects from any other workspace the user can access are silently excluded.Possible Solution
Have
list_projectsiterate overget_available_workspaces(), call_list_projects(ws.tenant_id)per workspace, and label each row with the originating workspace name/type. The existing dedup-by-permalink logic would need to either be removed (workspace becomes part of the row identity) or extended to key on(workspace, permalink)so the same project name in two workspaces isn't collapsed.