# Claude in Scient

Claude Code is Anthropic's agent for working with project files, code,
commands, and connected tools. Scient can use an existing Claude installation
or manage a private copy, then connect it to a Claude or Anthropic Console
account. Installing the tool and signing in are separate steps.

For the behavior shared by all assisted providers, see [Providers in Scient](./providers.md).

## The Easiest Setup Path

When Claude is not ready, choose it from **Choose your AI** in the composer or open **Settings >
Providers**. The same guided surface appears in both places:

1. Scient preserves and verifies a healthy custom or system Claude installation when one exists;
2. otherwise, the local desktop app can install a qualified official Claude Code executable in
   Scient's private app data;
3. the available sign-in button starts Claude Code's official account flow and opens its secure
   page in your browser; and
4. Scient asks Claude for fresh account and model state before reporting it as ready.

Connecting another AI does not hide Claude. Every enabled provider remains
available in the model picker, and you can choose any Claude model reported for
the connected account.

**Sign in to Claude** uses Claude Code's official sign-in flow for an existing Claude.ai Pro, Max,
Team, or Enterprise subscription. **Use Anthropic Console** remains available as an alternative for
an Anthropic Console account. Existing API-key, Bedrock, Vertex, Foundry, and custom-endpoint setups
remain advanced provider configurations rather than being rewritten by the guided account flow.

Most browser sign-ins return to Claude automatically. If the browser itself displays a one-time
code, expand **Browser showed a code?** and paste it into the compact recovery field. This is an
occasional fallback for environments where the local callback cannot complete, not a normal extra
step. The code is sent only to the live Claude process and is not saved as provider state.

Scient never asks for or receives your Claude password. Claude Code continues to own its
credentials, refresh, expiry, and revocation.

Claude's local account status can occasionally outlive a remotely revoked token. If a live Claude
request reports that exact condition, Scient stops reusing the failed session and returns the
provider to **Sign in required**. Sign in again from the same guided surface. Scient does not send a
test prompt or consume model quota merely to validate the account after login.

## Computers And Installations

Scient never silently replaces a healthy custom or system installation. A Scient-managed copy is
private and removable, and removing it does not remove a system Claude install, a custom binary,
or Claude-owned account data.

For a Scient-managed copy, expand Claude in **Settings > Providers** to repair or remove the
private runtime. If the executable stops working, **Manage** opens directly on that recovery path
instead of asking you to sign in again.

Managed installation is offered only when the local desktop server reports a qualified artifact for
its exact operating system and architecture. Remote clients continue using the runtime administered
on their server. The app displays the qualified version and download details before installation.

When a newer qualified stable release is available, **Update** preserves the current working copy
until the replacement passes local verification and activation. **Repair** installs the latest
qualified release (or the installed one, when that is newer), so it can also bring a newer release.

## Advanced And Multiple-Account Setups

The remaining sections are for people who deliberately want more than one Claude setup or an
external Claude-compatible route. For Codex, see [Codex](./providers-codex.md).

Common reasons:

- use separate work and personal Claude accounts
- try a different Claude Code configuration without disturbing your main setup
- run Claude through a router such as Claude Code Router
- use external providers exposed through a Claude-compatible workflow

## I Only Use One Claude Account

Use the default provider.

The guided Scient flow is recommended. The equivalent Claude subscription recovery command is:

```bash
claude auth login --claudeai
```

Use `claude auth login --console` instead when you deliberately want an Anthropic Console account.

In Scient Settings, your Claude provider can stay like this:

```text
Display name: Claude
Binary path: claude
CLAUDE_CONFIG_DIR path: empty
```

An empty `CLAUDE_CONFIG_DIR path` means Scient uses Claude Code's normal config directory.

When you set this field, Scient points Claude Code at that directory with the
`CLAUDE_CONFIG_DIR` environment variable. It does not change `HOME`, so your system keychain and
the rest of your environment stay as they are.

Claude Code's verbose mode can stay enabled when you use Claude for text generation, including
thread titles, branch names, commit messages, and pull request descriptions. On a remote connection,
Scient uses the Claude configuration on the connected server.

## Connected tools after upgrading

Scient's Claude tool connection is now named `scient` rather than `t3-code`.
Claude's saved “always allow” choices for the old connection do not carry over,
so Claude may ask you to approve the connected tools again. Review those requests
and approve the tools you want to use. Your conversation history and selected
permission mode are kept.

## Compact long conversations

In Settings, open your Claude provider and set **Auto-compact after** to a token count between
`100000` and `1000000`. For example, `300000` compacts the conversation into a summary once it
reaches about 300,000 tokens, without changing the model's context window. Leave the field
empty to keep Claude Code's default behavior.

You can also send `/compact` in an existing conversation. Claude Code also
compacts automatically. To see context usage, see
[commands and skills](./composer.md#commands-and-skills).

When you return to a large thread after Claude's prompt cache expires, a
**Compact** chip with the thread's token count shows
next to the send button. While it is on, Enter summarizes the history first, then
sends your message. Click the chip to switch it to **Keep** and keep the full
history for that message. The mobile app shows no chip: an eligible message sent
from it summarizes first. The cache lasts about an hour on a Claude
subscription and 5 minutes with an API key, Bedrock, or Vertex. See [commands and skills](./composer.md#commands-and-skills) for using
composer commands.

Claude can also show its own resume prompt when you continue an old session.

**Compact idle threads** in **Settings → Providers → Advanced** controls this for threads
over 200,000 tokens. Each Claude provider's settings can override it:

- **When you return** shows the **Compact** chip described above. This is the default.
- **Before the cache expires (beta)** tries to compact an idle thread shortly before its
  prompt cache expires, while the history is still cached.
  The compaction appears in the thread as a `/compact` turn sent by Scient.
  If the window is missed, such as when you enable this mode after the cache has
  expired or the server restarts before compaction runs, it falls back to
  **When you return**. Switch the chip to **Keep** to keep the full history for that message.
- **Never** skips idle compaction and Claude's resume prompt. **Auto-compact after**
  still applies, and you can still compact by hand.

## Usage limits

If Claude reaches a subscription usage limit mid-turn, the conversation shows the limit and the
remaining wait when Claude reports a reset time. Claude may keep the turn open until the window
reopens. Wait for that reset, or stop the turn and continue later; the warning timestamp indicates
when its displayed wait began.

## Where Claude Skills Are Loaded

Scient looks for local Claude skills in the Claude config directory's `skills` folder and
`<workspace>/.claude/skills`.

If the same skill name exists in more than one folder, the one in the Claude config directory
wins, the same way Claude Code resolves it.

Use `$` in the composer to select a skill. A skill set to `off` in Claude Code's
`skillOverrides` is left out of both composer menus. Enabled installed Claude plugins also
contribute skills under names such as `plugin:review`. Skills marked `disable-model-invocation`
can still be started by you. Invoke those one per message: Claude directly runs
only the last named skill and may try to start earlier ones through its Skill
tool, which refuses skills reserved for manual invocation.

## Task lists

To show Claude task lists in the web and desktop apps, add
`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` under **Variables** in the Claude instance's
**Environment** section in **Settings > Providers**. Each update shows as a Tasks
row in the thread; open it to see every step. Unfinished tasks also stay in a bar
above the composer until they are done, the session changes, or you dismiss them.

## I Want Work And Personal Claude Accounts

Use a different Claude config directory for each account.

Example:

```text
default config dir           work account
~/.claude_personal_home      personal account
```

### Set Up The First Account

Log in with the first Claude subscription:

```bash
claude auth login --claudeai
```

In Scient Settings:

```text
Display name: Claude Work
Binary path: claude
CLAUDE_CONFIG_DIR path: empty
```

### Set Up The Second Account

Log in with a separate config directory:

```bash
mkdir -p ~/.claude_personal_home
CLAUDE_CONFIG_DIR=~/.claude_personal_home claude auth login --claudeai
```

Use `--console` instead of `--claudeai` when that provider should use an Anthropic Console account.

Use `CLAUDE_CONFIG_DIR`, not `HOME`. Setting `HOME` writes the login to
`~/.claude_personal_home/.claude`, which is not where Scient looks.

Then add another Claude provider in Scient:

```text
Display name: Claude Personal
Binary path: claude
CLAUDE_CONFIG_DIR path: ~/.claude_personal_home
```

On mobile, tap **Add Claude account** in **Settings > Providers** and enter a name and the
config folder. The login itself still happens on the environment's machine.

Use the email shown in Settings to confirm each provider is using the intended account. The email is
visible initially so accounts can be distinguished; select it to hide or show it.

## Can I Switch Claude Accounts In An Existing Thread?

Usually, no.

Scient only offers Claude providers that use the same config directory for an existing thread. A
different config directory is treated as a different Claude environment.

This is different from the recommended Codex setup. Claude Code keeps account and local state across
multiple files under its config directory, so Scient keeps separate config directories isolated
instead of trying to share part of the state.

## I Want To Use OpenRouter

Use this when you want Claude Code to talk to OpenRouter directly, without running a local router.
This is the simplest external-provider setup.

OpenRouter provides a Claude Code integration through Claude's Anthropic-compatible environment
variables.

### Configure A Claude OpenRouter Provider

Add or edit a Claude provider in Scient Settings:

```text
Display name: Claude OpenRouter
Binary path: claude
CLAUDE_CONFIG_DIR path: ~/.claude_openrouter_home
```

In that provider's Environment variables section, add:

```text
ANTHROPIC_BASE_URL   https://openrouter.ai/api
ANTHROPIC_AUTH_TOKEN sk-or-...                Sensitive
ANTHROPIC_API_KEY                              Empty value
```

Mark `ANTHROPIC_AUTH_TOKEN` as sensitive. Scient stores the value as a server secret and does not
send it back to the app after saving.

If you want this setup isolated from your normal Claude account, create that home first:

```bash
mkdir -p ~/.claude_openrouter_home
```

If you previously used the same Claude home with a normal Anthropic login, run `/logout` in a Claude
Code session for that home before using OpenRouter. Otherwise Claude Code may keep using cached
Anthropic credentials instead of the OpenRouter token.

### Pick OpenRouter Models

Select the model you want in Scient. For an OpenRouter model outside the built-in
list, open that Claude provider in **Settings > Providers**, add its full model ID
with **Add custom model**, and select it in the chat model picker. Custom models may
have fewer effort, thinking, or context controls than built-in models.

`ANTHROPIC_DEFAULT_*_MODEL` variables map Claude Code aliases such as `sonnet`; they
do not replace an explicit model ID selected in Scient. They remain useful when you
want stable defaults for Claude Code's internal model roles.

Example:

```text
ANTHROPIC_DEFAULT_OPUS_MODEL    anthropic/claude-opus-4.6
ANTHROPIC_DEFAULT_SONNET_MODEL  anthropic/claude-sonnet-4.6
ANTHROPIC_DEFAULT_HAIKU_MODEL   anthropic/claude-haiku-4.5
CLAUDE_CODE_SUBAGENT_MODEL      anthropic/claude-sonnet-4.6
```

Add those to the same provider's Environment variables section if you want stable model choices.

### Verify OpenRouter Is Being Used

Open a Claude session and run:

```text
/status
```

You should see the Anthropic base URL set to:

```text
https://openrouter.ai/api
```

You can also check the OpenRouter activity dashboard for requests from your API key.

### Common OpenRouter Mistakes

- Use `https://openrouter.ai/api`, not `https://openrouter.ai/api/v1`, for Claude Code.
- Set `ANTHROPIC_AUTH_TOKEN` to your OpenRouter API key.
- Set `ANTHROPIC_API_KEY` to an empty string so Claude Code does not try to use an Anthropic login.
- Put these variables on the Claude provider instance, not in global shell startup files.

OpenRouter's setup can change over time. Use its upstream Claude Code guide for the current details:
<https://openrouter.ai/docs/guides/guides/claude-code-integration>.

## I Want To Use Claude Code Router

Claude Code Router is useful when you want a local routing layer with more control than a direct
OpenRouter setup.

Scient does not need a special Claude Code Router provider. Treat the router as a Claude
environment: give a Claude provider its own `CLAUDE_CONFIG_DIR path`, and put whatever variables
the router tells you to export into that provider's Environment variables section. Mark tokens
and API keys as sensitive.

```text
Display name: Claude Router
Binary path: claude
CLAUDE_CONFIG_DIR path: ~/.claude_router_home
```

Follow the upstream project's README for the router's own install, startup, and configuration
steps: <https://github.com/musistudio/claude-code-router>.

## I Want Different Claude Settings, Not A Different Account

Create another Claude provider with the same account if you want a named preset.

Examples:

- "Claude Default"
- "Claude Router"
- "Claude Experimental"

If the preset needs different Claude files, give it a different `CLAUDE_CONFIG_DIR path`. If it needs
different API keys, base URLs, or router settings, use Environment variables.

Do not put environment variable assignments in `Launch arguments`.
