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

providers-codex.md

141 lines3.6 KB

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