Before submitting#
Area#
apps/server
Steps to reproduce#
- Create a new thread with "New worktree" from
main and send a task prompt (Claude Code provider, Opus 5.5).
- T3 creates the worktree with a placeholder branch
t3/<worktree-id> and starts the agent session.
- A few seconds later, T3 renames the branch to a semantic name derived from the task.
- Let the agent finish the task and open a PR.
Expected behavior#
The agent sees the final branch name, so the PR's head branch is the semantic name, the same as the thread's local branch.
Actual behavior#
The agent session starts before the rename. The git context it receives at session start says Current branch: t3/<worktree-id>. At the end of the task the agent pushes and opens the PR with that name (git push -u origin HEAD:t3/<worktree-id>, gh pr create --head t3/<worktree-id>). The PR's head branch on GitHub is the placeholder, while the local branch and the thread show the semantic name, and the local branch now tracks the placeholder remote branch.
Reflog of the worktree, times in the same minute:
21:17:45 worktree created on t3/3896e203
21:17:46 agent session starts
21:17:53 Branch: renamed refs/heads/t3/3896e203 to refs/heads/t3/fix-whole-house-selection-overlap
Related but different: #31478 reports the rename never happening. Here it happens, but after the agent has started.
Impact#
Minor bug or occasional failure
Version or commit#
T3 Code 0.1.7
Environment#
macOS, T3 Code desktop, Claude Code provider (claude-opus-5-5)
Workaround#
Tell agents to read the branch with git branch --show-current right before pushing, instead of using the name from the session's starting git status. A fix could rename the branch before the session starts, or tell the running session about the new name.