1# Threads from older T3 Code versions
2
3On your first V2 launch, T3 Code copies the V1 database, `state.sqlite`, into `statev2.sqlite`
4in the same data directory and migrates the copy. Your threads appear automatically, with full
5transcripts imported as needed. You do not need to run an import command.
6
7V1 continues using its original database while V2 uses the copy. The database import can run while
8V1 is open. Opening V2 again resumes your V2 history. The copy happens only once: later conversations
9and changes in either version do not sync to the other. Settings, attachments, and workspace files
10remain shared.
11
12The V2 desktop app uses a separate browser profile, so browser cookies and caches do not carry
13over from V1. You may need to sign in again to websites opened inside the app. On its first launch,
14the V2 desktop app copies stashed prompts, unsent drafts, layout, and theme from V1. Anything you
15change in V2 afterwards stays in V2.
16
17The migrated thread keeps its title, project, provider and model selection, permission and
18interaction modes, branch or worktree, archive state, settlement state, snooze and pin state, and
19linked pull request. T3 Code also brings over user and assistant messages, their timestamps, and
20supported attachments. Large histories may appear in stages while the server imports transcripts.
21
22The migration does not recreate the old provider's live session. It also does not convert old run
23records, checkpoints and diffs, tool activity, approval history, or proposed plan history into the
24new format. These items may be absent from a migrated timeline even though the conversation text is
25present.
26
27## Continuing a migrated thread
28
29The first new message starts a fresh provider session. T3 Code selects intact user and assistant
30messages using the same [handoff budget](./portable-handoffs.md) as a provider switch. Omitted text
31remains in the thread and can be retrieved by the agent. The migration retains its separate
3232,000-character recovery excerpt; neither that excerpt nor the handoff replaces the full imported
33transcript.
34
35Before continuing a long or important thread, read the recent transcript and include any older
36requirements the agent still needs in your next message. Starting a new thread and pasting a short
37handoff is also a good choice when the old conversation contains conflicting instructions.
38
39## Keeping a recovery copy
40
41T3 Code does not currently have a whole-thread export command. Before a major server update, stop
42the server and copy its `userdata` directory to a safe location. The default is
43`~/.t3/userdata`; a server started with `--home-dir <path>` uses `<path>/userdata`.
44
45If a migrated transcript is missing from the app, keep that copy unchanged. You can inspect the
46old transcript without starting a server against it:
47
48```sh
49sqlite3 -readonly /path/to/recovery-copy/state.sqlite
50```
51
52At the SQLite prompt, list recent legacy threads:
53
54```sql
55.headers on
56.mode tabs
57SELECT thread_id, title, updated_at
58FROM projection_threads
59ORDER BY updated_at DESC;
60```
61
62Then print one transcript, replacing `<thread-id>` with the value from the first query:
63
64```sql
65SELECT role, text, created_at
66FROM projection_thread_messages
67WHERE thread_id = '<thread-id>'
68 AND role IN ('user', 'assistant')
69ORDER BY created_at, message_id;
70```
71
72Open only the copied database. Do not edit it or point a newer or older server at your recovery
73copy. If the affected environment is remote, make and inspect the copy on the machine that runs
74that environment.