Repository navigation
Feature Request Duplicate threads, duplicate/branch projects, and session groups #20267
Replies: 3 comments
|
I have a local web/desktop implementation of collapsible session folders: select threads, group them, rename or move members, and dissolve a folder without deleting threads. It persists in per-device client settings and does not provide mobile UI or cross-client sync, unlike the synced web/mobile session groups proposed here. Would this narrower local-only behavior be useful, or should the implementation follow the shared session-groups direction? I will hold a PR until the intended scope is clear. |
|
+1 on Feature 1 (Duplicate thread), and I'd like to propose a narrow first step for it. Forking from a message already covers the underlying need (#1404 / #2906). What's missing is a quick way to reach it from the sidebar. Today, to get "the same thread twice" I open the thread, scroll to the last response and fork from there. I'd like a Duplicate thread item in the thread right-click menu that forks from the latest completed response, using the existing fork path. No new semantics, and nothing to configure. Scope:
I have this working in my fork. If the direction is approved, I'd open a focused PR for just this menu item. It would also pair with the menu letter shortcuts I proposed in #33006 ( |

Uh oh!
There was an error while loading. Please reload this page.
A working implementation exists in a fork (links at the end). Each feature is small enough for its own PR.
Problem
git worktree add, add the folder as a project, and re-explain the context to the agent.Non-goals
Feature 1: Duplicate thread
Behavior: Copy a thread's messages, runs, and checkpoints into a new thread in the same project and workspace. Lineage records the source thread. The new thread opens immediately.
Contract (
packages/contracts/src/orchestrationV2.ts):RPC (
packages/contracts/src/rpc.ts):threads.duplicate. It errors withOrchestrationDispatchCommandError | EnvironmentAuthorizationError. Add it toCLIENT_GUARDED_RPC_SCOPESand extend the permission tests.Server: Add a service method in
apps/server/src/orchestration-v2/that reuses the existing fork machinery (ThreadForkService) with source pointlatest_stable. Keep thews.tshandler thin: decode, call the service, map errors.Entry points: thread action menu (web), thread long-press menu (mobile), and an MCP tool
t3_thread_duplicate.Acceptance:
Feature 2 and 3: Duplicate project and branch project
Both are one service with two modes.
Contract (
packages/contracts/src/project.ts):RPC:
projects.copyreturnsProjectCopyResult(projectId, plusthreadIdwhen a conversation was carried). Guard it inCLIENT_GUARDED_RPC_SCOPES.Modes:
duplicate: copy the working tree, respecting.gitignoreand skippingnode_modulesand.gitinternals, into a sibling folder. Register it as a new project.branch: rungit worktree add -b <slug> <path> HEADand register the worktree as a new project. Uncommitted changes are not copied, so say so in the confirmation dialog.Conversation carry-over: when
conversationis set, duplicate the source thread into the new project (Feature 1) and point its workspace at the new path. The agent keeps its context instead of starting cold.Entry points: project context menu (web), project settings (web and mobile), a "Branch project from this chat" action in the thread menu, and an MCP tool
t3_project_copy.Acceptance:
branchmode creates a real git branch, andgit worktree listshows it.Feature 4: Session groups
Contract (
packages/contracts/src/sessionGroups.ts):RPC:
sessionGroups.get,sessionGroups.watch(a stream, so every connected client stays in sync), andsessionGroups.update.Server: add a small
SessionGroupsServicethat stores the snapshot per environment. When a thread is deleted, remove its ID from every group.Shared logic: put selection and filter logic in
packages/client-runtime/src/state/sessionGroupLogic.tsso web and mobile behave the same.UI:
Acceptance:
Surface checklist (from AGENTS.md "Hit every surface")
t3_thread_duplicatet3_project_copythreads.duplicateprojects.copysessionGroups.*Suggested PR split
feat: duplicate threads(smallest, unblocks 2)feat: duplicate and branch projectsfeat: carry conversation when branching a project from a chatfeat: session groupsReference implementation
Fork with all four features working on web, desktop, and mobile, merged with upstream
mainas of 2026-10-16:https://github.com/VahamCooKey/t3code/tree/custom/main
748baa31e9duplicate projects and sessions with project branching38c47825dcretain conversation context when branching projects from chats677c569e6esession groups and native branch historyAll reactions