# Claude Code

> How Silos runs Claude Code: the unmodified claude CLI in a tmux console, the Agent SDK for chat, accounts per conversation, and what Silos reads but never changes.

Source: https://silosplatform.com/docs/claude-code/

Claude Code is the default engine: every agent runs on it unless you choose otherwise. Silos uses it as it ships. It never patches the binary or forks it, and it reaches it only through what Claude Code documents: command-line flags, settings files, hooks, `CLAUDE.md`, skills and its native memory.

## One `claude`, two ways in

Silos runs the `claude` command found on your `PATH`. If the native installer put it in `~/.local/bin` and the `PATH` that started Silos leaves that directory out, Silos finds it there anyway. Both ways of talking to an agent run that same binary:

- **The real console** runs `claude` in a tmux session and shows its terminal in your browser. A new conversation is born with an id Silos chooses (`--session-id`). Resuming one reattaches to the live tmux session or relaunches `claude` on that session.
- **The chat view** runs each turn through the Claude Agent SDK (`@anthropic-ai/claude-agent-sdk`). The SDK is only the client library: Silos points it at the `claude` on your `PATH` and never runs the platform binary the SDK package installs. Automations, task wakes and heartbeats use this path too.

Because both write the same session, a started conversation can switch between console and chat. See [Conversations](https://silosplatform.com/docs/conversations/).

### Version check

The SDK version Silos ships with is paired with one Claude Code release, and that release is the minimum. Settings shows the installed version and a verdict. An older `claude` is refused for consoles and chats, with `claude update` as the fix; a missing one is refused too, with Claude Code's own installer as the fix. A newer one keeps running, with a line saying Silos is not yet verified with it or naming the SDK to move to. While the engine is refused, task wakes and automation runs wait instead of failing, and Needs you shows one row that says so.

## What Silos adds to each launch

When Silos launches `claude` for an agent, it adds the following, all through documented means:

- **The agent's mission**, appended to the system prompt (`--append-system-prompt-file` in the console, the SDK's `systemPrompt.append` in chat). It is read again at every launch, so a saved mission reaches the next conversation.
- **Its identity in the environment**: `SILOS_AGENT_ID`, `SILOS_AGENT_TOKEN` (the agent's bearer token for the Silos API), `SILOS_API`, `SILOS_SESSION_ID` (stable across `/clear`) and a per-turn `SILOS_TURN`. In a console these travel in an env file that the launcher reads and then deletes, never on the tmux command line.
- **Vault secrets** the agent is allowed to see, also in the environment. See [Vault](https://silosplatform.com/docs/vault/).
- **Its territory**, a generated `permissions.deny` list passed with `--settings`. See [Territory](https://silosplatform.com/docs/territory/).
- **Its role skills**, as a plugin directory (`--plugin-dir` in the console, a local plugin in the SDK).
- **The Silos plugin**, with the team skills (such as `team-plan`, `heartbeat` and `vault-secrets`) and two hooks. SessionStart injects the briefing: who the agent is, the fleet roster and unread messages. A PreToolUse hook denies a recurring or durable native `CronCreate` and tells the agent to propose a Silos automation instead. What it adds is visible on the agent's page under At start. Unattended turns that run with hooks off (heartbeats always do) get the briefing appended to the system prompt instead.

## Accounts per conversation

The default account is the machine's own `claude` login (`~/.claude`). If this machine has never signed in, the first screen offers «Sign in to Claude ›», which runs Claude's own `claude auth login`. Silos never handles your Claude credentials: whether an account is signed in, and as whom, is Claude's answer to `claude auth status --json`.

You can add more in Settings › Providers › «Connect another account». Each extra account is its own `CLAUDE_CONFIG_DIR` under `~/.silos/claude-accounts/<name>/`, signed in with Claude's own login. Extra accounts share the machine account's transcripts (`projects/`) and follow its Claude Code settings.

The account follows the conversation, not the identity. An agent has a default account and model; a conversation can pin another in «Run on» (the runs-on line of its context column); an automation can name what its runs use; and Settings › Providers › «Unattended turns run on» can send every unwatched turn to one provider. An agent's fallback provider takes over only at a turn boundary. Home and Usage show how much of each account's plan window is used.

## What Silos reads, and what it leaves alone

| Silos reads | From |
|---|---|
| Transcripts, incrementally, with a watcher | `~/.claude/projects/<folder>/<id>.jsonl` |
| Subagent transcripts | `<session>/subagents/` |
| The checklist, plan mode's proposal, tool calls, token usage | the transcript |
| Memory, `CLAUDE.md`, skills, MCP servers, plugins, output styles | where Claude Code keeps them |

Sessions Silos did not create are read and never modified. Deleting a conversation moves its transcript to `~/.silos/trash/`, which empties itself after 30 days.

Where Silos changes what Claude Code loads, it uses Claude Code's own switches. Holding an MCP server or plugin in a folder writes `disabledMcpjsonServers` or `enabledPlugins: false` into that folder's `.claude/settings.local.json`, kept out of git through `.git/info/exclude`. Your own `~/.claude.json` is never written. Holding a skill moves its copy out of the folder into Silos' store. Transcript retention is Claude Code's `cleanupPeriodDays`. Settings lets you change it, and backs up `~/.claude/settings.json` first. The Checklist on current Claude models is Claude Code's `CLAUDE_CODE_ENABLE_TODO_TOOLS` — an owner switch in Settings › Engines, written the same careful way.

Claude Code's per-conversation list is the **Checklist**, and plan mode's proposal is «Plan mode · Claude's plan». Neither is a Silos [task](https://silosplatform.com/docs/tasks/).

## Licensing note

Silos is MIT. The Agent SDK it depends on is distributed under Anthropic's own terms, and using Silos means using the SDK under those terms.
