Repository navigation
Description
A folder used by a Personal thread can never be opened as a project — "Workspace path is already attached to a different project"
What I was trying to do
I was working on a repo inside a Personal thread and asked it to switch its working directory to that repo (normal, supported usage). Later I created a proper bb project from that same folder, expecting to open it and work on it there.
What happened
Creating the project succeeded, but every attempt to open it failed with:
Workspace path is already attached to a different project
The project was effectively unusable — starting any thread in it hit the same error, every time. Nothing in the UI or CLI said which project owned the folder, and there was no supported action to resolve it. The only way I could unblock myself was editing bb's database by hand.
What I expected instead
I understand a folder probably shouldn't be owned by two projects at once — that rule makes sense. The issue is that this state is created silently, reported confusingly, and can't be fixed in the app. It would help if any of these were true:
- Creating a project (or adding a source) at a folder already claimed by another project warns or rejects up front, ideally with an "adopt this folder" option; or
- The open error says which project owns the folder and how to resolve it; and
- There is a supported way to transfer or release a folder's ownership — today there is none.
Steps to reproduce
- In a Personal thread, ask the agent to switch its working directory to an existing repo folder (uses the
update_environment_directorytool). - Create a new project from that same folder (
bb project create --root <path>, or the UI). - Open the new project / start a thread in it.
- It fails with "Workspace path is already attached to a different project" — and keeps failing on every open.
Why this happens (technical notes for maintainers)
- Switching a thread's directory records the folder as a workspace owned by that thread's project (
thread-environment-directory.ts). From a Personal thread, the folder therefore becomes owned by the Personal project — permanently, even after the thread is archived. - That ownership is never released: project deletion skips non-managed workspaces (
project-deletion.ts), and workspace cleanup only handles managed ones (environment-cleanup-internal.ts). Deleting the owning project wouldn't free the folder either. - Project creation and source-add never check existing workspace ownership (
routes/projects.ts), so the conflict only surfaces later, at thread open, inthread-create.ts(existingUnmanagedEnvironmentIntentByHostPath→ 409). - There is no API, CLI, or UI to transfer or release the claim — hence the manual database edit.
Suggested directions
- Validate at project-create / add-source time, and offer to adopt the folder if it's owned by another project.
- Make the open error actionable: name the owning project and point to a supported fix.
- Avoid permanently claiming a folder when a Personal thread switches into it (or release the claim when the owning thread is archived/deleted).
Environment
- bb 0.35.1 (desktop app)
- macOS
- Local repo folder on the primary machine
Happy to provide more details, logs, or help test a fix.
Note: this report was drafted with the help of an AI agent. The reporter is actively involved and will respond to any follow-up questions or requests for details.
Activity
SawyerHood commentedon Aug 6, 2026
TY for the report! Let me dig in
Scope the workspace path claim to the project (#1043)
Scope the workspace path claim to the project (get-bb#1049)
Scope the workspace path claim to the project (get-bb#1049)