1# Claude
2
3T3 Code uses Claude Code's login and configuration. Start with the default provider
4for one account; [provider setup](./install.md#providers) covers installation and
5shared provider settings.
6
7## Separate accounts or configurations
8
9Use a separate Claude config directory for each account. This also works for named
10presets that need different Claude settings or a router connection.
11
12Keep your existing account in the default directory. On the environment's machine,
13create the second login:
14
15```bash
16mkdir -p ~/.claude_personal
17CLAUDE_CONFIG_DIR=~/.claude_personal claude auth login
18```
19
20Add another Claude instance in **Settings > Providers**:
21
22| Instance | Binary path | CLAUDE_CONFIG_DIR path |
23| --------------- | ----------- | ---------------------- |
24| Claude Work | `claude` | Leave empty |
25| Claude Personal | `claude` | `~/.claude_personal` |
26
27On mobile, tap **Add Claude account** in **Settings > Providers** and enter a name and the
28config folder. The login itself still happens on the environment's machine.
29
30An empty config-directory setting uses Claude Code's normal configuration. The
31custom setting changes `CLAUDE_CONFIG_DIR`, leaving `HOME` and the system keychain
32location intact. Use the same variable for the login command. Setting `HOME`
33instead can put credentials where this provider will not find them.
34
35Check the account reported in provider settings after signing in. Existing
36threads can switch only between Claude instances with the same config directory.
37Separate account directories stay isolated, including their local conversation
38state. Claude does not have Codex's shared-home and shadow-home arrangement.
39
40For presets that differ only in API keys or endpoints, use the instance's
41**Environment variables**. Variable assignments do not belong in **Launch arguments**.
42
43File paths in the `--settings` and `--append-system-prompt-file` launch arguments
44can start with `~` for the home directory of the machine running T3 Code. Any
45other relative path is read from the thread's project folder, or its worktree.
46
47Claude Code's verbose mode can stay enabled when you use Claude for text generation, including
48thread titles, branch names, commit messages, and pull request descriptions. On a remote connection,
49T3 Code uses the Claude configuration on the connected server.
50
51## Compact long conversations
52
53Set **Auto-compact after** in the Claude provider settings to an integer between
54`100000` and `1000000`. For example, `300000` asks Claude to summarize at about
55300,000 tokens. This changes when compaction happens, not the model's context
56window. Leave it empty for Claude Code's default.
57
58You can also send `/compact` in an existing conversation. Claude Code also
59compacts automatically. To see context usage, see
60[commands and skills](./composer.md#commands-and-skills).
61
62When you return to a large thread after Claude's prompt cache expires, a
63**Compact** chip with the thread's token count shows
64next to the send button. While it is on, Enter summarizes the history first, then
65sends your message. Click the chip to switch it to **Keep** and keep the full
66history for that message. The mobile app shows no chip: an eligible message sent
67from it summarizes first. The cache lasts about an hour on a Claude
68subscription and 5 minutes with an API key, Bedrock, or Vertex. See [commands and skills](./composer.md#commands-and-skills) for using
69composer commands.
70
71**Compact idle threads** in **Settings > Providers > Advanced** controls this for threads
72over 200,000 tokens. Each Claude provider's settings can override it:
73
74- **When you return** shows the **Compact** chip described above. This is the default.
75- **Before the cache expires (beta)** tries to compact an idle thread shortly before its
76 prompt cache expires, while the history is still cached.
77 The compaction appears in the thread as a `/compact` turn sent by T3 Code.
78 If the window is missed, such as when you enable this mode after the cache has
79 expired or the server restarts before compaction runs, it falls back to
80 **When you return**. Switch the chip to **Keep** to keep the full history for that message.
81- **Never** skips idle compaction and Claude's resume prompt. **Auto-compact after**
82 still applies, and you can still compact by hand.
83
84## Usage limits
85
86If your Claude subscription runs out of usage mid-turn, the thread shows which
87limit was reached and the remaining wait when Claude provides a reset time.
88Claude Code holds the turn until that window reopens, so it can keep showing as
89working. Wait for the reset, or stop the turn and continue later. The warning's
90timestamp shows when the displayed wait started.
91
92## Skills
93
94Claude skills come from the config directory's `skills` folder and the project's
95`.claude/skills` folder. If both define the same name, the config-directory copy
96wins. Skills disabled in Claude's settings do not appear in the composer.
97
98Use `$` in the composer to select a skill. Enabled installed Claude plugins,
99and plugins synced from your claude.ai account, also contribute skills under
100names such as `plugin:review`. Skills marked `disable-model-invocation` can
101still be started by you. Invoke those one per message: Claude directly runs only
102the last named skill and may try to start earlier ones through its Skill tool,
103which refuses skills reserved for manual invocation.
104
105## Task lists
106
107To show Claude task lists in the web and desktop apps, add
108`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` under **Variables** in the Claude instance's
109**Environment** section in **Settings > Providers**. Each update shows as a Tasks
110row in the thread; open it to see every step.
111
112## Claude in Chrome
113
114Claude threads can use the Claude in Chrome extension, which works in your own
115Chrome with its sign-ins. T3 Code sessions load it only when asked: add `--chrome`
116to **Launch arguments** in the Claude instance's settings in **Settings > Providers**.
117It applies to sessions that start after you save. Set up the extension as you would
118for Claude Code first; see Claude Code's [Chrome guide](https://code.claude.com/docs/en/chrome).
119
120The instance must be signed in with `/login` on a direct Anthropic plan. Instances
121that use an API key or a `claude setup-token` token don't get it, even with
122`--chrome`, and neither do third-party providers such as Amazon Bedrock. Claude Code
123doesn't support it in WSL.
124
125## OpenRouter
126
127Create a Claude instance with its own config directory, such as
128`~/.claude_openrouter`, and keep **Binary path** set to `claude`. In that instance's
129**Environment variables**, use:
130
131| Variable | Value |
132| ---------------------- | ----------------------------------------- |
133| `ANTHROPIC_BASE_URL` | `https://openrouter.ai/api` |
134| `ANTHROPIC_AUTH_TOKEN` | Your OpenRouter API key, marked Sensitive |
135| `ANTHROPIC_API_KEY` | An explicitly empty value |
136
137If that Claude config directory has a cached Anthropic login, run `/logout` in a
138Claude Code session using that directory before starting the router setup. Cached
139login credentials can conflict with the router token.
140
141Select the model you want in T3 Code. For an OpenRouter model outside the built-in
142list, open that Claude instance in **Settings > Providers** and add its full model
143ID with **Add custom model**. Then select it in the chat model picker.
144`ANTHROPIC_DEFAULT_*_MODEL` variables map Claude Code aliases such as `sonnet`; they
145do not replace the explicit model ID selected in T3 Code. Custom models may have
146fewer effort, thinking, or context controls than built-in models.
147
148Verify the model used in OpenRouter's activity dashboard. For current compatibility
149requirements, use the
150[OpenRouter Claude Code guide](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration).
151
152## Other routers
153
154A local router uses an ordinary Claude provider instance. Give it a separate
155config directory and put the router's endpoint and credential variables in that
156instance's **Environment variables**. The router must run where the environment
157can reach it. Follow the [Claude Code Router instructions](https://github.com/musistudio/claude-code-router)
158for its installation and routing configuration.