Import project dead-ends on PATH_ALREADY_REGISTERED with no 'go to that project' option
Bug
Importing a local folder that is already registered as a project dead-ends the Import project modal: it shows the raw daemon error A project at this path is already registered (PATH_ALREADY_REGISTERED) with only "Choose a different folder to try again" + Cancel. There is no path to the already-registered project, even though the daemon tells the client exactly which project it is.
Reporter's ask: instead of this error, offer an option to go to that project.
Source: Discord #bug-triage (2026-08-25)
Reported by: @maaz
Analyzed against: origin/main @ 4c3f4d72e
Confidence: High — full chain traced end-to-end (daemon → envelope → apiClient → CreateProjectFlow)
Priority: medium — degraded UX, workaround exists (find the project manually in the sidebar)
Reproduction
- Have a project registered at path
P(it is in the sidebar) +→ Import project → Choose a project folder → selectPin the OS picker- Confirm creation in the agent sheet
- Daemon returns
409 PATH_ALREADY_REGISTERED - Modal re-opens in the bare folder-picker state: red error box with the raw message, footer "Choose a different folder to try again", only Cancel available — a dead end

Root Cause
The daemon already returns everything needed to recover — the renderer discards it at every layer.
The daemon side is fine:
backend/internal/service/project/service.go:196-200—Add()returnsapierr.Conflict("PATH_ALREADY_REGISTERED", "A project at this path is already registered", map[string]any{"existingProjectId": existing.ID, "suggestedProjectId": ...})backend/internal/httpd/envelope/envelope.go:44—Details map[string]any json:"details,omitempty"— sodetails.existingProjectIdis on the wire in the 409 response.
Where the renderer drops it:
-
frontend/src/renderer/routes/_shell.tsx(createProject, ~L424-432):const failure = new Error(apiErrorMessage(error)) as Error & { code?: string }; failure.code = apiErrorCode(error); throw failure;Only
message+codesurvive.error.details— which carriesexistingProjectId— is dropped on the floor. There is noapiErrorDetails()helper at all (frontend/src/renderer/lib/api-client.tshasapiErrorMessage/apiErrorCode/apiErrorRequestIdonly). -
frontend/src/renderer/lib/api-client.ts(apiErrorMessage) renders`${body.message} (${code})`— which is exactly the(PATH_ALREADY_REGISTERED)suffix visible in the screenshot. Raw daemon code leaked into UI copy. -
frontend/src/renderer/components/CreateProjectFlow.tsx:212-235(createProjectcatch):codeis extracted (line 213) but is only branched on forNOT_A_GIT_REPO/PROJECT_UNBORNrepository-setup recovery. There is no branch forPATH_ALREADY_REGISTERED/ID_ALREADY_REGISTERED. So:setError(message), and sinceshouldScanCreateFailure()(line 421-426) explicitly returnsfalsefor(PATH|ID)_ALREADY_REGISTERED,validationScanstaysnull→CreateProjectFolderDialogrenders the bare dashed picker + error box + footercreateProject.footerChoose("Choose a different folder to try again",en.json:166). -
Pre-flight doesn't help either: the folder scan (
frontend/src/main/import-folder-scan.ts,scanGitRepo) only knows git facts (bare, unborn, no remote, reserved name). It has no access to AO's registered-project list, so the user learns about the conflict only after confirming.
Fix
- Carry the conflict payload: in
_shell.tsxcreateProject(andcloneProjectfor symmetry), attacherror.details(or minimallyexistingProjectId) to the thrown error, e.g. add anapiErrorDetails(error)helper inapi-client.tsnext to the existing ones. - Branch on the code in
CreateProjectFlow's catch: forPATH_ALREADY_REGISTERED, render a dedicated state inCreateProjectFolderDialog— "This folder is already registered as a project" with a primary Go to project action (navigate toexistingProjectIdvia the existing project navigation; the project is already in the sidebar) and secondary Choose a different folder. Same pattern applies toID_ALREADY_REGISTERED. - Optional belt-and-braces: during the folder scan, flag the selected repo as "already registered" (the renderer already has the workspace/project list) so the user finds out at picker time, before confirming.
Impact
- Any user who re-imports a folder that's already registered (new machine, restored disk, or simply forgetting it's in the long sidebar list) hits a hard dead-end that reads like a system fault rather than guidance.
- The error copy exposes the raw daemon code (
PATH_ALREADY_REGISTERED) verbatim, inconsistent with the rest of the import flow's human-readable messaging.
Related
- #2721 — same flow, non-Git/nested import error messaging (different failure class, same "raw error in modal" shape)
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @illegalcall
- @somewherelostt
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @somewherelostt here.
For faster context or live questions, you can also join the AO Discord.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
I want to take up this issue. Pls assign me.