Repository navigation
feat: auto-rename workspace branch from the first prompt - #2888
Merged
Merged
Conversation
brennanb2025
force-pushed
the
tmchow/Nautilus-7
branch
from
May 27, 2026 20:37
df06103 to
194c111
Compare
Opt-in Git setting (off by default). When an agent begins working in a freshly created workspace, Orca renames the auto-generated creature branch (e.g. you/Nautilus) and the sidebar name to a short summary of the first prompt, generated by the agent already configured for AI commit messages. Guardrails: only auto-generated branches are renamed (never a name the user chose), never a branch that already has an upstream, and a custom display name is preserved. The rename is driven off the unified agent-hook listener so it works across every supported agent, settles once per worktree, and retries only on transient failures.
brennanb2025
force-pushed
the
tmchow/Nautilus-7
branch
from
May 27, 2026 20:39
194c111 to
43b7c66
Compare
Contributor
|
Thanks for the PR @tmchow! Very cool feature 👍 I'm also going to split out the different AI prompts soon (for commit message, PR, and branch name generation), just fyi. |
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
Co-authored-by: brennanb2025 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A new opt-in Git setting, Auto-Rename Branch From Work, frees a workspace from the random "creature" name it's born with. The moment an agent starts working on your first prompt, Orca renames both the git branch and the sidebar title to a short summary of the task — turning
you/Nautilusintoyou/supported-models-list("Supported models list") with no manual rename step. The auto-generated name is still great for spinning a workspace up instantly; this removes the friction of living with it once the work has a clear subject.Off by default; enable it under Settings → Git.
Demo
Setting
In Action
How it works
The rename hangs off Orca's unified agent-hook status listener, so it fires the first time any supported agent reports it has begun working — and the prompt text is available at that moment. Doing this in the main process (where git and the worktree store already live) lets one code path cover every agent and every entry flow instead of per-agent wiring.
The short name is generated by the same agent you've already configured for AI commit messages — no new model setup. The output is sanitized to a 2–4 word kebab slug for the branch (
you/<slug>) and a humanized label for the sidebar.Guardrails
-2,-3, …)The trigger settles once per worktree and retries only on transient failures (agent momentarily unreachable, brief detached HEAD). So it doesn't re-probe git every turn for an already-handled workspace, and a one-off hiccup never permanently skips a workspace.
Worktree identity is resolved from the session's tab→worktree map rather than the agent-echoed hook field — the latter isn't present on every event, which was the source of early run-to-run flakiness.
Tests
Unit coverage for slug sanitization and display-name humanization, creature-name eligibility, the git rename op (upstream guardrail, collision suffixing), and the orchestrator's gating: setting off, replayed/non-working events, custom-display preservation, tab-based worktree resolution, settle-after-success, and retry-after-transient-failure.