Open History to see the last commit
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## Send feedback to OpenAI
32
33In an existing Codex thread, send `/feedback` or `/feedback` followed by a description of the
34issue. T3 Code uploads the thread and Codex logs to OpenAI and shows a thread ID that you can copy
35and share with OpenAI employees.
36
37## Sub-agent models
38
39The web and desktop Agents panel shows each sub-agent's model and reasoning effort when Codex
40reports them. If Codex does not report either value, T3 Code leaves it out instead of using the
41parent agent's settings.
42
43## Approve access to other apps
44
45When a Codex tool needs access to an app such as Safari, T3 Code shows the app name and asks for
46approval. You can approve, decline, or cancel the request from the desktop app, web app, or mobile
47app. Some tools also offer approval for the current session or permanent approval.
48
49## I Want Work And Personal Codex Accounts
50
51Use one real Codex home and one shadow home.
52
53Recommended setup:
54
55```text
56~/.codex shared Codex home
57~/.codex_p second account auth
58```
59
60The idea is:
61
62- both accounts can see the same T3/Codex sessions
63- each account keeps its own login
64- existing threads can continue with either account
65
66### Set Up The First Account
67
68Log in normally:
69
70```bash
71codex login
72```
73
74This is the account used by `~/.codex`.
75
76In T3 Code Settings, name it something obvious:
77
78```text
79Display name: Codex Work
80CODEX_HOME path: ~/.codex
81Shadow home path: empty
82```
83
84### Set Up The Second Account
85
86Log in with a separate Codex home:
87
88```bash
89mkdir -p ~/.codex_p
90CODEX_HOME=~/.codex_p codex login
91```
92
93In T3 Code Settings, add another Codex provider:
94
95```text
96Display name: Codex Personal
97CODEX_HOME path: ~/.codex
98Shadow home path: ~/.codex_p
99```
100
101The important part is that both providers use the same `CODEX_HOME path`, but only the second one
102has a `Shadow home path`.
103
104## Which Account Am I Using?
105
106Open Settings and look at the provider row.
107
108T3 Code shows the authenticated email for providers that report one. Emails are blurred by default;
109click the blurred email to reveal it.
110
111Use display names and accent colors to make accounts easy to tell apart in the model picker.
112
113## I Need A Different API Key Or Endpoint
114
115Use the provider's Environment variables section in Settings.
116
117This is useful when a Codex-compatible setup needs account-specific variables. Add the variables to
118the provider instance that should receive them, and mark API keys or tokens as sensitive. Sensitive
119values are stored as server secrets and are not sent back to the app after saving.
120
121## Can I Switch Accounts In An Existing Thread?
122
123Yes, when both Codex providers share the same `CODEX_HOME path`.
124
125For example:
126
127```text
128Codex Work CODEX_HOME path: ~/.codex
129Codex Personal CODEX_HOME path: ~/.codex, Shadow home path: ~/.codex_p
130```
131
132Those two providers are considered compatible for continuation, so the locked model picker can show
133both.
134
135If you add a third Codex provider with a completely different `CODEX_HOME path`, T3 Code treats it
136as a different workspace. It will not be offered for existing threads created under `~/.codex`.
137
138## If Both Accounts Look The Same
139
140If two Codex providers show the same account or the same unexpected model list:
141
1421. Check the email in Settings.
1432. Refresh provider status.
1443. Confirm the second provider has `Shadow home path` set.
1454. Confirm the shadow directory has its own `auth.json`.
1465. If you copied `~/.codex` into the shadow directory, remove everything except `auth.json`.
147
148Example cleanup:
149
150```bash
151find ~/.codex_p -mindepth 1 ! -name auth.json -exec rm -rf {} +
152```
153
154## When To Use A Separate CODEX_HOME
155
156Use a totally separate `CODEX_HOME path` only when you want a separate Codex workspace.
157
158That means separate sessions and less account switching inside old threads. Most dual-account users
159should use the shared-home plus shadow-home setup instead.