GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use repository-derived worktree branch names instead of the hardcoded t3code prefix · Issue #272 · pingdotgg/t3code

Use repository-derived worktree branch names instead of the hardcoded t3code prefix #272

New issue
Copy link
New issue
Copy link
Closed
Closed
Use repository-derived worktree branch names instead of the hardcoded t3code prefix#272
Copy link
Labels
needs-julius

Description

@TaylorMerritt
TaylorMerritt
opened on Mar 7, 2026
Issue body actions

Summary

New worktree branches are currently created under a hardcoded t3code/... namespace, even when the active repository is not named t3code.

Problem

This makes branch names and derived worktree paths misleading in multi-repo usage. For example, creating a new worktree in another repository can still produce a branch like t3code/1a2b3c4d, which looks like it belongs to this app rather than the actual repository the user is working in.

Current behavior

  • The initial temporary worktree branch is created with a hardcoded t3code/<8-hex> prefix.
  • After the first turn, generated human-readable branch names are also forced back under the t3code/... namespace.
  • This leaks the app name into repository-specific git state and worktree folder names.

Expected behavior

  • New worktree branch names should be based on the actual repository name, or use no prefix at all.
  • Temporary branch detection should continue to work reliably for the first-turn rename flow.
  • Generated branch names should stay consistent with whatever namespace rule we choose.

Why this matters

  • Reduces confusing branch names across different repositories.
  • Keeps git state aligned with the repo the user is actually editing.
  • Avoids app-specific naming leaking into worktree management and downstream tooling.

Likely code areas

  • apps/web/src/components/ChatView.tsx
  • apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
  • packages/shared/src/git.ts

Acceptance criteria

  • No hardcoded t3code worktree branch prefix remains in the worktree creation / rename flow.
  • The temporary branch created for a new worktree uses a repository-derived namespace, or no namespace if that is the chosen design.
  • The server-side first-turn rename flow uses the same naming rule as the initial branch creation flow.
  • Temporary-branch detection still works for the rename path.
  • Relevant tests cover the naming and detection behavior.

Prompt to solve

Refactor worktree branch naming so it is derived from the active repository instead of a hardcoded t3code prefix. Centralize the naming logic in shared git utilities, update the web-side worktree creation flow and the server-side first-turn branch rename flow to use the same helper, preserve reliable temporary branch detection, and add focused tests for namespace derivation, temporary branch generation, and generated branch renaming.

Reacted by Felix Damrau, Martin Nyaga, Nathan Cain, Martín Molina B., Gabe Duarte, Nick Jennings, Sleeyax, hamitkera, Bitbeq, Flippi and 10 more

Activity

  1. nathanscain commented on Mar 10, 2026

    @nathanscain
    nathanscain
    on Mar 10, 2026
    More actions

    would ideally like a way to specify branch naming conventions. My org requires us to prefix branches by type feat/*, fix/*, et al.

    similar request for commit messages to stick with conventional commits (also enforced by my org)

    Reacted by Andrei, Lee, Yahya Gilany and Dain Sundstrom
  2. TaylorMerritt commented on Mar 10, 2026

    @TaylorMerritt
    TaylorMerritt
    on Mar 10, 2026
    Author
    More actions

    would ideally like a way to specify branch naming conventions. My org requires us to prefix branches by type feat/*, fix/*, et al.

    similar request for commit messages to stick with conventional commits (also enforced by my org)

    Yeah I just had the gut initial take of “I don’t want my branches prefixed with t3code.” I think the minimum change I need is to just be able to configure the branch prefix (allowing null too for no prefix). Maybe a more polished solution looks like a prompt where you can give instructions for which type of branch prefix you’d like to use like in your example you need to have feat and fix prefixes. Maybe an in-between solution is to be able to define multiple prefixes and then on creation of the branch the model will attempt to make a choice and the user gets the final say via a UI element/prompt.

  3. juliusmarminge commented on Mar 10, 2026

    @juliusmarminge
    juliusmarminge
    on Mar 10, 2026
    Member
    More actions

    t3code/ is cause t3code is the one making the branch, not cause it's the repo you're in.

    we'll eventually have configurable branch names (probalby both deterministic prefix but also letting you configure the prompts sent to the agent when generating the name).

    Reacted by Nathan Cain, Gabe Duarte, Sleeyax, Mathieu Habegger, Andrei and Matthew Kelch
  4. nathanscain commented on Mar 10, 2026

    @nathanscain
    nathanscain
    on Mar 10, 2026
    More actions

    cool - I figured it was that just to keep t3code branches from colliding with something else preexisting.

    I know you have a thousand things coming at you, but can you give a rough priority on at what point polish like this will be added?

  5. benmarg commented on Mar 15, 2026

    @benmarg
    benmarg
    on Mar 15, 2026
    More actions

    I opened a PR for this, hopefully it solves it if this workflow works for everyone, open to feedback!

    #1110

  6. ElliotSknr commented on Apr 10, 2026

    @ElliotSknr
    ElliotSknr
    on Apr 10, 2026
    More actions

    I have simply been working around this currently by opening up the terminal drawer and checking out a new branch with git checkout -b "my/custom/branch" and everything else continues to work fine. Would be nice to customise this by default, but this works fine for me as it stands.

  7. nathanscain commented on Apr 10, 2026

    @nathanscain
    nathanscain
    on Apr 10, 2026
    More actions

    It is a feature request not a bug report (at least for me). I also do this with worktrees and a git branch -m to rename the branch, but I'd rather it figure itself out based on the same basic rules I follow.

    Reacted by Gabe Duarte and Elliot Skinner
  8. juliusmarminge
    marked Modifiable worktree prefix. #967 as a duplicate of this issue on Jun 9, 2026
  9. juliusmarminge
    added
    needs-julius
    on Jun 9, 2026
  10. patroza commented on Jul 2, 2026

    @patroza
    patroza
    on Jul 2, 2026
    More actions

    for me the directory name is more important, so I can easily hook it up to my window manager app switcher.
    (I need {repoName}-{hashOrHumanReadableName} instead of t3code-{hashOrHumanReadableName}

  11. dain commented on Aug 11, 2026

    @dain
    dain
    on Aug 11, 2026
    More actions

    My org requires us to prefix branches by type feat/*, fix/*, et al.

    I have the exact same issue. My org requires that branches start with user/<username>. In Codex, there is a config to set a fixed prefix.

  12. jmarbutt commented on Aug 13, 2026

    @jmarbutt
    jmarbutt
    on Aug 13, 2026
    More actions

    So are we going to see this soon?

  13. pingdotgg
    locked and limited conversation to collaborators on Aug 15, 2026
  14. juliusmarminge
    converted this issue into a discussion #7063 on Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-julius

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.