Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e2c3e50. Configure here.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This adds a persisted and validated worktree branch-prefix setting while retaining Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
For my example of #6428, do you have thoughts on allowing full branch name customization at worktree creation rather than just the prefix instead? Where as if you gave people the option to just fully customize the branch name on worktree creation, they can then have whatever they want and everyone wins |
|
@MrSimmmons branch prefixes are conventionally used for distinguishing the main developer of a branch in the form "MrSimmons/fix-ssrf" so having settings globally to set your "name" then that being used as your branch prefix seems correct here. I've seen in the past conventional commit style for commits and pr titles which can be helpful for categorization. |
|
Cool feature! One question though — is worktreeBranchPrefix meant to stay global/server-wide, or could it also work as a per-project override? I bounce between a few repos that each have their own branch convention. |
|
I feel like this doesn't fully resolve the issue at hand, since, for example, the branch names supplied by Linear follow a strict pattern, and we would need full customization for that and not just branch name prefixes. |
|
I think people are focusing on this PR as if it’s the one PR meant to fix every single branch naming problem they have. But the reality is, the only fixed portion of what we can’t change today is this There may be more branch naming options in the future, like naming the branch yourself when creating a thread or allowing a custom prompt for the source control writer to determine branch names. I personally think those are out of scope for this PR, especially considering there are already plenty of workarounds, such as telling your agents to rename branches to fit your needs. |
|
Agreed with @kevhardy, being able to change or remove the prefix is more than enough. Anything beyond that can be handled by putting branch naming guidelines in AGENTS.md or CLAUDE.md. As long as the t3code/ prefix isn't enforced, everything stays possible. |
|
also agreeing with @kevhardy and @GuusDeGraeve here. This should be merged "as is" (if the issues are fixed)- this probably solves like 95% of people's problems. Linear compat could be separate ticket/MR. I was experimenting with an optional input in the "new worktree" flow. you just open an optional input that allows you to put anything you want there. |
|
I agree that this PR probably should be merged as-is. |
|
Wondering if we can get this through. I agree that this is a good first step and solves the 80% problem for most people. Those with more strict naming conventions or something along those lines could probably be solved later. Atm I just ask the agent to rename my branches before PR's but this would remove that extra step. Thanks! |
|
I would prefer something closer to #8967, as the naming conventions vary. But this would be good for setting a global default. |
|
Would be really nice to have this feature. |


Generated worktree branches always start with
t3code/, which conflicts with personal and team branch conventions.Add a server-owned Worktree branch prefix setting under Settings > General. It defaults to
t3code, accepts validated custom prefixes, and can be cleared to create branches without a prefix. Temporary branches stay unchanged, and the server applies the prefix when it generates the final branch name for web, desktop, mobile, and remote clients.Inspired by and with thanks to:
Verified with 116 focused tests, targeted lint, and scoped typechecks for contracts, shared, client runtime, server, web, and mobile.
Model: GPT-5.6 Sol
Harness: Codex in T3 Code
Note
Medium Risk
Touches git branch naming and persisted server settings. Invalid prefixes are schema-validated, but misconfigured prefixes still change how worktrees are renamed for all clients.
Overview
Users can now set a Worktree branch prefix in Settings > General. Generated worktree names still default to
t3code/…, but a custom prefix (including nested paths liketeams/platform) is applied server-side, and clearing the field creates unprefixed branches.buildGeneratedWorktreeBranchNamestrips a leftovert3code/from the model output when it is not the configured prefix, then sanitizes the remainder. Temporary worktree branches are unchanged.The new
worktreeBranchPrefixsetting is validated (lowercase, max 64, no//or leading/trailing separators) and wired through dirty/reset/search plus user docs.Reviewed by Cursor Bugbot for commit 5e5ed3f. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add configurable
worktreeBranchPrefixsetting defaulting tot3codeworktreeBranchPrefixfield toServerSettings, defaulting tot3codeand validated by the newWorktreeBranchPrefixschema (max 64 chars, lowercase alphanumerics, no adjacent slashes).buildGeneratedWorktreeBranchNamein ProviderCommandReactor.ts to accept aprefixargument and sanitize it viasanitizeBranchFragment.buildGeneratedWorktreeBranchNamenow requires aprefixparameter; existing callers must be updated.Macroscope summarized 5e5ed3f.