Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

codex.md

140 lines3.5 KB

1# Codex
2​
3This guide is for people who want to use more than one Codex account in T3 Code.
4​
5Common reasons:
6​
7- use a work account for work projects
8- use a personal account for personal projects
9- switch to another account when one account hits limits
10- keep one shared Codex history instead of maintaining two separate Codex setups
11​
12## I Only Use One Codex Account
13​
14Use the default provider.
15​
16In Settings, your Codex provider can stay like this:
17​
18```text
19Display name: Codex
20CODEX_HOME path: ~/.codex
21Shadow home path: empty
22```
23​
24Log in with Codex normally:
25​
26```bash
27codex login
28```
29​
30## I Want Work And Personal Codex Accounts
31​
32Use one real Codex home and one shadow home.
33​
34Recommended setup:
35​
36```text
37~/.codex shared Codex home
38~/.codex_p second account auth
39```
40​
41The idea is:
42​
43- both accounts can see the same T3/Codex sessions
44- each account keeps its own login
45- existing threads can continue with either account
46​
47### Set Up The First Account
48​
49Log in normally:
50​
51```bash
52codex login
53```
54​
55This is the account used by `~/.codex`.
56​
57In T3 Code Settings, name it something obvious:
58​
59```text
60Display name: Codex Work
61CODEX_HOME path: ~/.codex
62Shadow home path: empty
63```
64​
65### Set Up The Second Account
66​
67Log in with a separate Codex home:
68​
69```bash
70mkdir -p ~/.codex_p
71CODEX_HOME=~/.codex_p codex login
72```
73​
74In T3 Code Settings, add another Codex provider:
75​
76```text
77Display name: Codex Personal
78CODEX_HOME path: ~/.codex
79Shadow home path: ~/.codex_p
80```
81​
82The important part is that both providers use the same `CODEX_HOME path`, but only the second one
83has a `Shadow home path`.
84​
85## Which Account Am I Using?
86​
87Open Settings and look at the provider row.
88​
89T3 Code shows the authenticated email for providers that report one. Emails are blurred by default;
90click the blurred email to reveal it.
91​
92Use display names and accent colors to make accounts easy to tell apart in the model picker.
93​
94## I Need A Different API Key Or Endpoint
95​
96Use the provider's Environment variables section in Settings.
97​
98This is useful when a Codex-compatible setup needs account-specific variables. Add the variables to
99the provider instance that should receive them, and mark API keys or tokens as sensitive. Sensitive
100values are stored as server secrets and are not sent back to the app after saving.
101​
102## Can I Switch Accounts In An Existing Thread?
103​
104Yes, when both Codex providers share the same `CODEX_HOME path`.
105​
106For example:
107​
108```text
109Codex Work CODEX_HOME path: ~/.codex
110Codex Personal CODEX_HOME path: ~/.codex, Shadow home path: ~/.codex_p
111```
112​
113Those two providers are considered compatible for continuation, so the locked model picker can show
114both.
115​
116If you add a third Codex provider with a completely different `CODEX_HOME path`, T3 Code treats it
117as a different workspace. It will not be offered for existing threads created under `~/.codex`.
118​
119## If Both Accounts Look The Same
120​
121If two Codex providers show the same account or the same unexpected model list:
122​
1231. Check the email in Settings.
1242. Refresh provider status.
1253. Confirm the second provider has `Shadow home path` set.
1264. Confirm the shadow directory has its own `auth.json`.
1275. If you copied `~/.codex` into the shadow directory, remove everything except `auth.json`.
128​
129Example cleanup:
130​
131```bash
132find ~/.codex_p -mindepth 1 ! -name auth.json -exec rm -rf {} +
133```
134​
135## When To Use A Separate CODEX_HOME
136​
137Use a totally separate `CODEX_HOME path` only when you want a separate Codex workspace.
138​
139That means separate sessions and less account switching inside old threads. Most dual-account users
140should use the shared-home plus shadow-home setup instead.