Proposal
Autonaming and branch prefix lived in different settings screens and didn't talk to each other. When an AI-generated name landed, it silently overwrote the prefix a user configured — moments after the workspace correctly had it. The code-path fix has since shipped in PR #7413; the settings-consolidation half below is future scope, since that PR doesn't touch the desktop UI.
A workspace's branch prefix (none / github / author / custom) was resolved correctly at the moment a workspace was created. But when AI autonaming finished a few seconds later and renamed the branch to something better than the placeholder, the prefix wasn't reapplied — it was just gone. PR #7413 reapplies the prefix deterministically in every path that can rename a branch after creation; see that PR for the shipped fix.
resolveProjectBranchPrefix runs, prefix applies correctly →
kiet/quick-brown-fox
fix-login-timeoutapplyGeneratedWorkspaceNames renames the branch — without the prefixgit branch -m uses the AI name raw →
kiet/quick-brown-fox becomes
fix-login-timeout
The live branch-name preview shown while typing a prompt has the same gap: workspaces.ts's generateBranchName procedure never calls resolveProjectBranchPrefix at all, unlike the create procedure right next to it. What the user sees while typing already doesn't match what they'll briefly get.
The legacy desktop-local naming path (apps/desktop/.../generate-branch-name.ts) threads resolveBranchPrefix into its dedupe step correctly. The regression is isolated to the newer host-service path — the one the app is actively migrating onto — which makes it worth fixing before that migration finishes and the correct behavior disappears entirely.
Reproduced the exact reported scenario against a disposable scratch project in a real running dev build — not a unit-test mock — driven over CDP through the same host-service tRPC calls the desktop app itself makes, then confirmed on disk. Cleaned up afterward; nothing left behind.
project.setBranchPrefix({ mode: "custom", customPrefix: "qatest" }) → successgenerateBranchName({ prompt: "Fix the login timeout bug" }) →
qatest/fix-the-login-timeout-bugqatest/fix-the-login-timeout-bug, not a bare unprefixed name.# confirmed on disk — the real git branch, not just the DB row $ git -C .../cdp-prefix-test branch -a * main + qatest/fix-the-login-timeout-bug
The scratch project's worktree and registration were removed via project.remove immediately after, and the scratch directory deleted.
Correction from the original draft of this page: on inspection while implementing the fix, the current (V2) project settings page turned out to already group the branch-prefix override and "Naming instructions" under one "Branches & naming" section, and the global Git settings page already shows a live prefix preview. So the settings-layout gap was smaller than first thought. Confirmed by reading the actual component tree:
// apps/desktop/.../v2-project/$projectId/components/V2ProjectSettings/V2ProjectSettings.tsx <SettingsSection title={t({ message: "Branches & naming" })} description={t({ message: "How branches and workspace names are created for this project." })} > {/* same section — not a separate page or a distant block */} <BranchPrefixSection ... /> <NamingInstructionsSection ... /> </SettingsSection>
qatest) set — still the same section.What's still true: there's no toggle anywhere to turn autonaming off (it's implicit — fires whenever a user hasn't hand-edited the branch name field), and the per-project section has no live example showing the prefix and naming instructions combined the way the global page's prefix preview does.
PR #7413 calls resolveProjectBranchPrefix in the live-preview generateBranchName procedure, and reapplies it inside applyGeneratedWorkspaceNames after the AI/derived name comes back, instead of using that name raw in the git branch -m. It also covers the manual "rename with AI" path. This brings host-service to parity with what the legacy desktop path already did correctly.
See the correction above: the per-project branch-prefix override and naming instructions already render under one section, so there's no desktop UI change to make here. PR #7413 doesn't touch the desktop app.
A one-line preview — "with your current settings, a workspace from this prompt would be named kiet/fix-login-timeout" — next to the per-project naming instructions, matching the pattern the global Git settings page already has for the prefix alone. Not part of PR #7413.
The two fields are already grouped in one section on the current (V2) project page — no restructuring needed there. The only gap left is a preview showing what the two settings produce together; that's future scope, not part of PR #7413.
| File | What's there |
|---|---|
| host-service/.../workspaces/workspaces.ts | Fixed in PR #7413: the auto-gen path's resolved prefix is now threaded into the deferred AI rename, and the live-preview generateBranchName procedure now resolves the prefix itself. |
| host-service/.../workspace-creation/utils/ai-workspace-names.ts | Fixed in PR #7413: applyGeneratedWorkspaceNames now takes a branchPrefix and reapplies it (via the new resolveGeneratedBranchName helper) before the git branch -m. |
| host-service/.../workspace-creation/utils/branch-prefix.ts | resolveProjectBranchPrefix — the function now called from all three fixed call sites above. |
| desktop/.../workspaces/procedures/generate-branch-name.ts | Legacy path — reference implementation that already got this right; host-service now matches it. |
| desktop/.../v2-project/.../V2ProjectSettings.tsx | BranchPrefixSection + NamingInstructionsSection — already grouped under one section; no change made here (future scope is a combined live preview, see above). |