Open History to see the last commit
1# Working with threads
2
3Use a new thread for a separate task. Choose **New worktree** when its code changes
4need a separate branch and working directory.
5
6## Start a thread
7
8On web and desktop, a new thread keeps the current project and carries your model
9and mode selections, unless the destination project has its own model default.
10Its branch and workspace mode come from your configured defaults. To continue in
11an existing worktree, use **New thread in this worktree** from the branch toolbar.
12An agent that creates a worktree during a thread can move the thread there with
13the `t3_worktree_handoff` tool, so the branch toolbar and **Open** follow it.
14
15When you change a new thread's project, T3 Code stays in the current environment
16if that project exists there. Otherwise it selects an environment that has it.
17
18### Start in the background
19
20In a desktop browser or the desktop app, press `Cmd+Enter` on macOS or `Ctrl+Enter`
21on Windows and Linux to start a new thread and immediately open another draft. The
22next draft keeps the workspace mode and base branch you selected. With **New
23worktree**, each background submission creates its own worktree.
24
25## Pin and reorder threads
26
27Pin a thread from its menu to keep it above your active work.
28
29On web and desktop, you can also drag files from your computer onto any thread row:
30the thread opens and the files are attached in its composer, ready for
31your next message. The same per-message file limits apply as when attaching
32files directly; see [Attach files](./composer.md#attach-files).
33
34On web and desktop, pinning or unpinning a thread keeps the sidebar at your current
35scroll position instead of following the thread to its new place in the list.
36
37Pinning does not prevent automatic settlement. Settling a thread removes its pin.
38
39On web and desktop, drag a thread between sections to change its state. Drag a thread up into
40the pinned section to pin it at the spot you drop it; drag a pinned thread down into the active
41list to unpin it. Dragging a thread onto the **Settled** header settles it, and dragging a settled
42thread into the active list un-settles it. A snoozed thread can be dragged out of the snoozed
43shelf, which wakes it, but threads cannot be dragged into the shelf because snoozing needs a wake
44time. Dragging a pinned thread out of the pinned section does not ask for unpin confirmation.
45Pinned and active boundary labels appear only while dragging, without moving the rows. The
46other rows slide aside to show where the thread will land. When you cross into another section,
47the dragged thread shows the action the drop performs, with its icon: **Pin**, **Unpin**,
48**Settle**, **Un-settle**, or **Wake**. Its status and hover actions hide during the drag. A pinned
49thread keeps its pin only while it stays in the pinned section; once it leaves, the badge takes
50over. Reordering within the same section shows no badge. When there are no pins, drag to the top
51edge to pin a thread. Section labels stay readable for the whole drag, and the section the
52thread is over takes the accent color. Section labels also
53identify empty sections and a collapsed settled shelf.
54
55Drag within the pinned or active section to change its order. Other rows slide aside to show the
56spot where the thread will land. Drops into either section keep the position you choose. On
57mobile, open a thread's menu and choose **Arrange threads**. Drag a handle within or between
58**Pinned** and **Active** to reorder, pin, or unpin. Drop onto the **Settled** divider to
59settle a thread. The dragged card shows the action before you release it. Expand **Snoozed**
60or **Settled** to drag a parked thread back into either live section. Each drop saves; **Done** returns to the thread list.
61**Move up** and **Move down** are also available in the thread menu. The server
62saves the order, so it survives a refresh and appears on your other connected devices.
63
64On web and desktop, the list also animates section changes made with thread actions such as
65**Pin**, **Settle**, and **Snooze**. These transitions respect your system's reduced-motion
66preference. While dragging, rows follow the insertion gap without replaying a second transition
67after the drop.
68
69New threads appear above the active threads you have arranged. Settling clears a thread's active
70position, so using **Un-settle** returns it to the top. Pinning and snoozing preserve its active
71position until you move it again. Thread activity does not change the order. The settled shelf
72continues to use settlement time.
73
74If dragging is unavailable for one environment, update the T3 Code server running in that
75environment. Pinned and active reordering require server support. Threads from older servers keep
76their default order until the server is updated.
77
78## Settle finished work
79
80Choose **Settle thread** from its menu to move finished work out of the active list
81without deleting the conversation. **Un-settle thread** restores it to active work
82and prevents automatic settlement until new activity resumes the usual rules.
83Manually settling an idle thread dismisses unanswered async questions without
84sending an answer or restarting the agent.
85
86By default, environments settle inactive threads after three days and settle
87threads whose pull request merged. A closed pull request can also settle an idle
88thread. Work in progress, pending questions or approvals, and live background work
89prevent automatic settlement. An open pull request does not prevent inactivity
90settlement, but an old closed or merged pull request does not settle work you
91resumed after it closed.
92
93Change these rules in **Settings → General**. They continue to run when your apps
94are closed. On web and desktop, choose an environment at the top to change only
95its rules, or **All environments** to update connected environments together.
96Mixed values show where the selected environments disagree. Mobile applies these
97rules to connected environments that support shared settings. Offline environments
98and older servers keep their previous values. Changing a rule does not reopen
99already settled threads.
100
101## Link a pull request
102
103The server finds the PR for each unsettled thread's saved branch, even when your
104apps are closed. Settled threads keep their saved links. Update the server if
105automatic branch links do not appear.
106
107On web and desktop, right-click a pull request link in a thread and choose
108**Link to thread** to select a different PR. Use **Unlink from thread** on the
109same link to return to the branch PR, if one exists.
110The linked pull request participates in automatic settlement.
111
112## Find and reference work
113
114On web and desktop, open the command palette with `Cmd/Ctrl+K` to search threads
115across connected environments. Message search starts after two characters and
116includes your messages and final agent responses.
117
118Use **Settings → Keybindings** to find or customize shortcuts for searching files
119and copying a thread reference. A copied reference uses the thread's pull request
120link when available, otherwise its thread ID. See [keybindings](./keybindings.md)
121for custom configuration.
122
123## Inspect agent work
124
125On web and desktop, use **Agents** to follow work delegated to subagents.
126
127Expand a tool call in the conversation to see its full command and output.
128Summaries shorten shell wrappers and can still describe the latest call after it
129finishes; the call's own result shows its status.