Skip to content

Auto-generate workspace branch name from user prompt #1748

Closed

Description

@dragonfire1119

Feature Request

When creating a workspace, Orca should automatically generate the branch name from the user's prompt using the model configured in settings — no manual naming required.

Use case: User types a task description to create a workspace. Instead of manually entering a branch name, Orca generates one using the configured model.

Proposed behavior:

  • Branch name generated from the user's prompt using the model set in user settings
  • Format: conventional prefix + short kebab-case slug
  • Valid prefixes: feat/, fix/, chore/, docs/, refactor/, test/, ci/, perf/, style/, build/
  • Examples: feat/add-user-auth, fix/null-pointer-crash, chore/update-deps
  • User can override the generated name before confirming

Activity

  1. tmchow commented on May 25, 2026

    @tmchow
    Contributor

    @nwparker @AmethystLiang Happy to take this on. Orca already has most of the machinery for it: the commit-message generation path (commit-message-text-generation.ts + buildCommitMessagePrompt) already drives the user's configured agent and model to produce text from git context. A branch-name generator can reuse that same path, so it's not a new model-integration surface.

    One question before I build. The composer UX looks like it's in active motion right now, so I want to pick the less invasive shape. Two options:

    1. Auto-generate on create (opt-in setting, name pre-fills and stays editable before confirm).
    2. A lighter "generate name" action next to the name field that the user clicks.

    The button version is a much smaller change and stays out of the create-flow timing, which feels safer while the composer is still settling. Either way the output would be a conventional prefix plus kebab slug (feat/add-user-auth), validated through the existing workspace-name sanitizer, with the current slugify as the fallback when the model is off or unavailable.

    Which direction do you prefer? I'll open a PR once I know.

  2. nwparker commented on May 26, 2026

    @nwparker
    Contributor

    Thanks Trevin!

    One question before I build. The composer UX looks like it's in active motion right now, so I want to pick the less invasive shape. Two options:

    1. Auto-generate on create (opt-in setting, name pre-fills and stays editable before confirm).
    2. A lighter "generate name" action next to the name field that the user clicks.

    So for the composer -- we removed that awhile ago (although some code remains in the codebase).
    It was pretty simple, it lets users enter an intial prompt

    The problem: It was hard to express a common interface for all the models. For instance, invoking skills across different harnesses is quite different.

    It's not an impossible problem, but we just choose the lazy option 😅

    My question for you, actually is:
    Do you want this composer view? Or do you just want a way to auto-name 'workspaces' in Orca after sending the first message to your agent ?

    Feel free to chime in as well @dragonfire1119

  3. nwparker commented on May 29, 2026

    @nwparker
    Contributor

    This is covered by #1578. The implemented shape is the post-first-agent-work branch suggestion flow we discussed in the thread, rather than resurrecting the old composer: it is experimental/opt-in, waits for supported agent completion with commits, asks the same agent for a branch slug, and shows an apply/dismiss suggestion in the workspace card instead of silently renaming. I am leaving this issue open until #1578 lands.

  4. added
    size/s
    on Jun 9, 2026
  5. added theissue type on Jul 12, 2026
  6. added
    enhancement
    on Jul 27, 2026
  7. Gldywn commented on Aug 11, 2026

    @Gldywn
    Contributor

    Still hitting this, so to answer the question above: option 2 for me. I don't need
    the composer back, I just don't want to name the workspace.

    The auto-rename from the first prompt (#2888) already does the job, but it only runs
    when the name field is empty (!name.trim() in useComposerState.ts). The Smart
    field is where you naturally type what you're about to work on, and doing that sets
    an explicit name, so auto-naming quietly turns off and you get a 48-char truncation
    instead:

    • blank, then first prompt to the agent → export-terminal-output
    • same sentence typed in Smart → add-a-button-to-export-the-terminal-output-to-a

    So what would close this for me isn't generating a name at create time, it's being
    able to type the intent in the dialog as the agent's first prompt and let the
    existing rename do its thing. The plumbing is already there, quick-create sends
    Advanced > Note as the startup prompt.

    Happy to take a shot at the PR if that's the shape you want.

  8. lukassh-7 commented on Sep 8, 2026

    @lukassh-7

    Opened #19555 for the input-field half of this, since this issue is scoped to generating the name. @Gldywn's comment above is exactly my case: the auto-rename already does the job, there is just nowhere in the dialog to type the intent without setting an explicit name and switching it off.

  9. nwparker commented on Sep 27, 2026

    @nwparker
    Contributor

    Resolved by merged PR #2888, which auto-renames the generated workspace branch from the first agent prompt. The later report confirms that this auto-rename does the job; the remaining request to enter that prompt in the Create worktree dialog is tracked separately in #19555. Closing this issue for the branch-name generation behavior.

  10. rrhaya commented on Nov 2, 2026

    @rrhaya

    When creating a worktree directly from an issue, I'd like Orca to choose the branch prefix from the issue's title and description—for example, feature/123-add-export, fix/124-login-error, or chore/125-update-dependencies.

    The branch should have the appropriate prefix at creation time, without manually changing a fixed prefix or waiting for the first agent prompt. The new --branch flag provides explicit control, but does not select the type automatically.

    Is this covered by the resolution of this issue, or would you prefer a separate follow-up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementsize/s

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions