Open History to see the last commit
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.
14
15The migrated thread keeps its title, project, provider and model selection, permission and
16interaction modes, branch or worktree, archive state, settlement state, snooze and pin state, and
17linked pull request. T3 Code also brings over user and assistant messages, their timestamps, and
18supported attachments. Large histories may appear in stages while the server imports transcripts.
19
20The migration does not recreate the old provider's live session. It also does not convert old run
21records, checkpoints and diffs, tool activity, approval history, or proposed plan history into the
22new format. These items may be absent from a migrated timeline even though the conversation text is
23present.
24
25## Continuing a migrated thread
26
27The first new message starts a fresh provider session. T3 Code selects intact user and assistant
28messages using the same [handoff budget](./portable-handoffs.md) as a provider switch. Omitted text
29remains in the thread and can be retrieved by the agent. The migration retains its separate
3032,000-character recovery excerpt; neither that excerpt nor the handoff replaces the full imported
31transcript.
32
33Before continuing a long or important thread, read the recent transcript and include any older
34requirements the agent still needs in your next message. Starting a new thread and pasting a short
35handoff is also a good choice when the old conversation contains conflicting instructions.
36
37## Keeping a recovery copy
38
39T3 Code does not currently have a whole-thread export command. Before a major server update, stop
40the server and copy its `userdata` directory to a safe location. The default is
41`~/.t3/userdata`; a server started with `--home-dir <path>` uses `<path>/userdata`.
42
43If a migrated transcript is missing from the app, keep that copy unchanged. You can inspect the
44old transcript without starting a server against it:
45
46```sh
47sqlite3 -readonly /path/to/recovery-copy/state.sqlite
48```
49
50At the SQLite prompt, list recent legacy threads:
51
52```sql
53.headers on
54.mode tabs
55SELECT thread_id, title, updated_at
56FROM projection_threads
57ORDER BY updated_at DESC;
58```
59
60Then print one transcript, replacing `<thread-id>` with the value from the first query:
61
62```sql
63SELECT role, text, created_at
64FROM projection_thread_messages
65WHERE thread_id = '<thread-id>'
66 AND role IN ('user', 'assistant')
67ORDER BY created_at, message_id;
68```
69
70Open only the copied database. Do not edit it or point a newer or older server at your recovery
71copy. If the affected environment is remote, make and inspect the copy on the machine that runs
72that environment.