# Extended Thinking Source: https://docs.ccs.kaitran.ca/features/ai/extended-thinking Configure reasoning budgets across providers with unified --thinking flag # Extended Thinking Mode Control model reasoning depth with the cross-provider `--thinking` flag. Native Claude launches also accept a session-scoped `--effort` override when you want Claude's own effort control without rewriting saved settings. Available since v7.38.0 - Extended context window support with `--1m` flag for 1M token context. ## Overview Extended thinking allocates compute tokens for step-by-step reasoning before generating responses. Models "think out loud" internally to solve complex problems through systematic analysis. **Use for:** Complex architecture, multi-step reasoning, debugging obscure issues, mathematical proofs, strategic planning. ## Priority Order Thinking settings are resolved in this order (highest wins): 1. `--thinking` CLI flag 2. `CCS_THINKING` environment variable 3. `config.yaml` thinking section ## Native Claude `--effort` When a launch stays on native Claude, CCS also accepts Claude's effort flag directly: ```bash theme={null} ccs --effort high "debug this regression" ccs work --effort max "review this architecture" ``` Behavior: * accepted values: `low`, `medium`, `high`, `xhigh`, `max` * CCS validates the value before spawn and normalizes case * the flag stays session-scoped; CCS does not rewrite `~/.claude/settings.json` or `~/.ccs/config.yaml` * CLIProxy-backed thinking flows still treat `--effort` as the CCS alias for `--thinking` Use `--thinking` when you want portable CCS semantics across providers. Use `--effort` when you specifically want a native Claude one-session override. ## `CCS_THINKING` Environment Variable Override thinking per-session without changing config: ```bash theme={null} # Named levels CCS_THINKING=high ccs claude "analyze this" CCS_THINKING=auto ccs claude "complex task" # Disable thinking CCS_THINKING=off ccs codex "quick task" CCS_THINKING=none ccs codex "quick task" CCS_THINKING=disabled ccs codex "quick task" CCS_THINKING=0 ccs codex "quick task" # Integer budget (0-100000) CCS_THINKING=24576 ccs claude "deep analysis" ``` **Accepted values:** * Named levels: `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, `auto` * Off values: `off`, `none`, `disabled`, `0` (all equivalent — disable thinking) * Integer budget: `0`–`100000` ## Two Modes ### Budget Mode (Token Count) Specify exact token budget for thinking phase. ```bash theme={null} ccs claude --thinking 8192 # Allocate 8K tokens ccs claude --thinking 24576 # Deep analysis ``` ### Level Mode (Named Levels) Use predefined levels for simplified control. ```bash theme={null} ccs codex --thinking low # Quick (1K tokens) ccs codex --thinking medium # Standard (8K tokens) ccs codex --thinking high # Deep (24K tokens) ccs codex --thinking xhigh # Maximum (32K tokens) ccs claude --thinking max # Adaptive ceiling where supported ``` **Level mappings:** minimal=512, low=1024, medium=8192, high=24576, xhigh=32768, max=adaptive ceiling ## Provider Support Matrix | Provider | Model | Type | Range | Dynamic | | ----------- | ----------------- | ------ | ----------------------------- | ------- | | Claude | Claude Fable 5 | levels | low, medium, high, xhigh, max | ✓ | | Claude | Claude Opus 5 | levels | low, medium, high, xhigh, max | ✓ | | Claude | Claude Opus 4.8 | levels | low, medium, high, xhigh, max | ✓ | | Claude | Claude Opus 4.7 | levels | low, medium, high, xhigh, max | ✓ | | Claude | Claude Opus 4.6 | budget | 1024-128000 | ✓ | | Claude | Claude Sonnet 4.6 | budget | 1024-128000 | ✓ | | Antigravity | Claude Opus 4.6 | budget | 1024-128000 | ✓ | | Antigravity | Claude Sonnet 4.6 | budget | 1024-64000 | ✓ | | Gemini | Gemini 2.5 Pro | budget | 128-32768 | ✓ | | Gemini | Gemini 3 Pro | levels | low, high | ✓ | | Codex | GPT-5.6 Sol | levels | low, medium, high, xhigh | ✗ | | Codex | GPT-5.6 Terra | levels | low, medium, high, xhigh | ✗ | | Codex | GPT-5.6 Luna | levels | low, medium, high, xhigh | ✗ | | Codex | GPT-5.4 | levels | low, medium, high, xhigh | ✗ | | Codex | GPT-5.4 Mini | levels | low, medium, high | ✗ | | Codex | GPT-5.2 | levels | low, medium, high, xhigh | ✗ | * **Type:** budget (numeric) vs. levels (named presets) * **Dynamic:** Supports `auto` mode (model decides dynamically) Claude Opus 5 uses adaptive, level-only thinking. Select `low`, `medium`, `high`, `xhigh`, or `max`; manual numeric thinking budgets are rejected. Opus 5 also supports `--1m` for a 1M-token context window. ## Usage ### Auto Mode (Recommended) ```bash theme={null} ccs claude --thinking auto # Dynamic budget selection ccs codex --thinking medium # Fixed level selection ``` ### Custom Budgets ```bash theme={null} ccs claude --thinking 1024 # Light thinking ccs claude --thinking 32768 # Deep analysis ccs claude --thinking 64000 # Very deep analysis ``` ### Named Levels ```bash theme={null} ccs codex --thinking off # Disable thinking ccs codex --thinking medium # Balanced ccs codex --thinking xhigh # Maximum effort ccs claude --thinking max # Adaptive max on Fable 5 / Opus 4.8 ``` ### Cross-Type Compatibility CCS automatically converts between budgets and levels. ```bash theme={null} ccs claude --thinking high # → 24576 tokens ccs codex --thinking 8192 # → "medium" level ``` ## Auto-Capping Behavior CCS validates values and auto-adjusts invalid inputs. ### Budget Clamping ```bash theme={null} ccs claude --thinking 200000 # → Clamped to 128000 (max) ``` ### Level Capping ```bash theme={null} ccs codex --thinking xhigh # → Capped to "high" (GPT-5 Mini) ccs codex --thinking max # → Mapped to "xhigh" when max is not native ``` ### Fuzzy Matching ```bash theme={null} ccs codex --thinking hi # → "high" ccs codex --thinking med # → "medium" ``` ## Cost Implications Higher budgets = more tokens = higher cost. * **low (1K):** Minimal cost, fast * **medium (8K):** Moderate cost, balanced * **high (24K):** Higher cost, deep analysis * **xhigh (32K):** Maximum cost, maximum depth * **Custom (32K-128K):** Very high cost, provider/model dependent **Best practices:** Use `auto` for optimization, reserve high budgets for complex problems, start with `low`/`medium` for routine tasks. ## Troubleshooting ### Model Doesn't Support Thinking **Error:** `Model gemini-claude-sonnet-4-5 does not support extended thinking` **Solution:** Use thinking-enabled variants (e.g., `gemini-claude-sonnet-4-5-thinking`) or switch to a supported reasoning-first profile such as `ccs km` when you need Kimi API reasoning. Legacy `ccs glmt` remains compatibility-only. ### Budget Exceeds Maximum **Warning:** `Thinking budget 200000 exceeds maximum. Clamped to 128000.` **Solution:** Use budget within range or switch to model with higher limit. ### Level Not Supported **Warning:** `Level "xhigh" not valid for gpt-5-mini. Mapped to "high".` **Solution:** CCS auto-maps to closest valid level. Check support matrix. ### Dynamic Thinking Unavailable **Warning:** `Model does not support dynamic/auto thinking` **Solution:** Specify explicit level or budget. Check "Dynamic" column in matrix. ## `ccs config thinking` Command Manage thinking configuration interactively or via flags: ```bash theme={null} # Show current thinking config ccs config thinking # Set thinking mode ccs config thinking --mode auto # Dynamic tier-based defaults ccs config thinking --mode off # Disable thinking entirely ccs config thinking --mode manual # Use explicit override # Persistent override (applies to all providers) ccs config thinking --override high # Set persistent override level ccs config thinking --override 24576 # Set persistent override budget ccs config thinking --clear-override # Remove persistent override # Per-tier defaults ccs config thinking --tier opus high # Set opus tier to "high" ccs config thinking --tier sonnet medium # Set sonnet tier to "medium" ccs config thinking --tier haiku low # Set haiku tier to "low" # Per-provider overrides ccs config thinking --provider-override gemini opus xhigh ccs config thinking --provider-override agy sonnet high ccs config thinking --clear-provider-override gemini # Clear all gemini overrides ccs config thinking --clear-provider-override gemini opus # Clear gemini opus only ``` ### Dashboard Thinking Settings The CCS Dashboard includes a **Thinking** settings panel with: * **Mode selector** — auto / off / manual * **Persistent Override** panel — set a global level that overrides tier defaults * **Tier defaults** — configure opus/sonnet/haiku default levels * **Provider Overrides** section — per-provider tier level customization ## Related * [CLI Flags Reference](/reference/cli-flags) - `--thinking` flag syntax, `CCS_THINKING` env var * [Antigravity Provider](/providers/oauth/agy) - Budget mode, 100K max * [Gemini Provider](/providers/oauth/gemini) - Budget/level hybrid * [Codex Provider](/providers/oauth/codex) - Level-based, maxLevel caps * [GLMT Deprecation](/features/ai/glmt-controls) - Legacy compatibility and migration guidance ## Extended Context Window Available since v7.38.0 Enable 1M token context window for supported models using the `--1m` flag. ### Usage ```bash theme={null} # Enable 1M context ccs claude --1m "analyze this large codebase" # Disable (use default context) ccs claude --no-1m "quick prompt" # Combine with thinking mode ccs claude --thinking auto --1m "deep analysis of large project" ``` ### How It Works The `--1m` flag appends `[1m]` suffix to model names, routing to extended context variants: ```bash theme={null} # Without --1m gemini-claude-sonnet-4-5 # With --1m gemini-claude-sonnet-4-5[1m] ``` ### Provider Support **Auto-Enabled:** * Native Gemini models (always use 1M context by default) **Opt-In:** * Claude models via Gemini proxy * Antigravity models * Codex models **Not Supported:** * Settings-based profiles (GLM, KM, custom APIs) * Local models (Ollama) ### Best Practices **When to use `--1m`:** * Large codebase analysis * Multi-file refactoring * Documentation generation across many files * Complex architectural planning **When NOT to use:** * Simple queries (wastes quota) * Short prompts (no benefit) * Rate-limited scenarios (uses more quota faster) ### Cost Implications Extended context consumes quota faster. Use selectively for tasks requiring large context windows. ### Disable Extended Context ```bash theme={null} # Force standard context ccs claude --no-1m "your prompt" ``` Useful when: * Quota conservation needed * Faster response time preferred * Task doesn't require large context # GLMT Deprecation Source: https://docs.ccs.kaitran.ca/features/ai/glmt-controls Migration guidance for legacy ccs glmt users # GLMT Deprecation `ccs glmt` is deprecated and no longer a supported public product surface. It remains available only as a compatibility path for legacy scripts and configs that still use the old profile name or legacy `glmt.settings.json` payloads. ## Use This Instead | Need | Supported command | Notes | | -------------------------------- | ----------------- | ---------------------------------------------- | | Z.AI API profile | `ccs glm` | Direct Z.AI API profile for standard GLM usage | | Reasoning-first Kimi API profile | `ccs km` | Direct Kimi for Coding profile | | Long-context Kimi via OAuth | `ccs kimi` | CLIProxy OAuth provider for device-code auth | ## Migration 1. Replace `ccs glmt` invocations in scripts, snippets, and local aliases with `ccs glm` or `ccs km`. 2. For new setups, create `glm` or `km` from the dashboard or with `ccs api create --preset glm|km`. 3. Keep legacy `glmt` only until old automation, bookmarks, and docs links are updated. ## Legacy Behavior That Still Exists * `ccs glmt` now routes through the normal settings-profile flow after CCS normalizes legacy proxy-only settings to the direct GLM endpoint at runtime. * Existing `glmt.settings.json` files remain readable during migration. * CCS still prints explicit deprecation warnings so old scripts are not silently treated as a supported product surface. * No new setup or feature guidance is published for GLMT. ## When You Might Still Encounter GLMT * Existing shell scripts or CI jobs still call `ccs glmt` * Old settings files still include `glmt.settings.json` * Historical links still point to this page ## Related * [CLI Commands](/reference/cli-commands) - Supported commands and legacy note * [CLI Flags](/reference/cli-flags) - General CLI and CLIProxy diagnostics * [API Profiles](/providers/concepts/api-profiles) - Supported `glm` and `km` setup * [Kimi Provider](/providers/oauth/kimi) - `ccs kimi` OAuth and `ccs km` API details # Image Analysis Source: https://docs.ccs.kaitran.ca/features/ai/image-analysis MCP-first image and PDF analysis for third-party CCS launches # Image Analysis CCS provides first-class image and PDF analysis for third-party launches that do not have reliable native vision support. Native Claude accounts keep Anthropic's built-in image flow; third-party routes get a CCS-managed local `ImageAnalysis` MCP tool when the runtime is healthy. Supported file types include common image formats such as `.jpg`, `.png`, `.webp`, `.gif`, `.heic`, `.bmp`, `.tiff`, plus `.pdf`. ## Overview The current routing model is MCP-first: ```text theme={null} Claude -> ccs-image-analysis MCP -> CCS provider route -> /api/provider//v1/messages ``` CCS also appends a short steering hint so Claude prefers `ImageAnalysis` over raw `Read` for local images and PDFs. ## Launch Behavior | Profile type | Behavior | | ----------------------------------------------------------------- | --------------------------------------------- | | Claude `default` / `account` | Native Claude vision or native `Read` | | Third-party settings, CLIProxy, Copilot | Managed `ImageAnalysis` MCP when ready | | Third-party with degraded MCP but usable provider-backed analysis | Legacy CCS `Read` hook compatibility fallback | | Third-party with runtime/auth/proxy failure | Native `Read` fallback | Healthy Claude-target launches suppress the legacy CCS image `Read` hook so the managed MCP tool stays authoritative. ## Quick Start ```bash theme={null} # Inspect current image-analysis state ccs config image-analysis # Enable or disable globally ccs config image-analysis --enable ccs config image-analysis --disable # Increase timeout for large documents ccs config image-analysis --timeout 120 # Set provider-specific models ccs config image-analysis --set-model agy gemini-3-1-flash-preview ccs config image-analysis --set-model codex gpt-5.1-codex-mini # Pick a fallback backend for bridge-backed profiles ccs config image-analysis --set-fallback agy # Override the backend for a specific settings profile ccs config image-analysis --set-profile-backend glm agy ccs config image-analysis --clear-profile-backend glm ``` ## Configuration ```yaml theme={null} image_analysis: enabled: true timeout: 60 fallback_backend: gemini provider_models: agy: gemini-3-1-flash-preview codex: gpt-5.1-codex-mini profile_backends: glm: agy ``` ### Prompt Templates CCS installs editable prompt templates under: ```text theme={null} ~/.ccs/prompts/image-analysis/ ``` Templates: * `default.txt` * `screenshot.txt` * `document.txt` CCS automatically selects the screenshot template for screenshot-like filenames, the document template for PDFs, and the default template otherwise. ## What CCS Repairs Automatically CCS now self-heals stale managed image-analysis state in three places: 1. Healthy Claude-target launches remove stale CCS-managed image hooks from the active profile settings before launch. 2. Saving or provisioning from `Settings -> Image` repairs the managed MCP runtime files, syncs the `ccs-image-analysis` entry into isolated Claude configs, and removes stale CCS-managed hooks from `~/.ccs/*.settings.json`. 3. `ccs doctor --fix` repairs invalid image-analysis config, removes stale CCS-managed hooks, and resyncs the managed MCP entry into isolated configs. ## Runtime Details Key runtime environment variables: | Variable | Purpose | | ------------------------------------- | ---------------------------------------------------------------- | | `CCS_IMAGE_ANALYSIS_SKIP` | Disable image analysis for the current launch | | `CCS_IMAGE_ANALYSIS_SKIP_HOOK` | Suppress only the legacy `Read` hook while keeping MCP available | | `CCS_IMAGE_ANALYSIS_RUNTIME_BASE_URL` | Explicit CCS runtime base URL | | `CCS_IMAGE_ANALYSIS_RUNTIME_PATH` | Provider route such as `/api/provider/agy` | | `CCS_IMAGE_ANALYSIS_RUNTIME_API_KEY` | Explicit CCS runtime auth key | | `CCS_IMAGE_ANALYSIS_MODEL` | Force a single model for the launch | | `CCS_DEBUG` | Verbose runtime logging | ## Troubleshooting ### Claude still uses `Read` * Confirm `ccs config image-analysis` still shows `enabled: true` * Check the active profile resolves to a usable backend * Run `ccs doctor --fix` to repair stale managed hooks or missing MCP sync * Run with `CCS_DEBUG=1` to inspect runtime preparation ### ImageAnalysis is not exposed * Verify the resolved backend is authenticated * Verify the local or remote CLIProxy target is reachable * Check inherited Claude config directories for the managed `ccs-image-analysis` MCP entry ### The wrong backend or model is being used * Inspect `fallback_backend` and `profile_backends` in `ccs config image-analysis` * Check whether the profile is bridge-backed or using a direct CLIProxy provider * Set an explicit provider model with `--set-model` if the default is not what you want ### I need proof that requests go directly to the provider route Run with `CCS_DEBUG=1` and inspect the resolved runtime path. It should target a provider-scoped route such as: ```text theme={null} /api/provider/agy/v1/messages ``` ## Related * [CLIProxy API](/features/proxy/cliproxy-api) * [WebSearch](/features/ai/websearch) # WebSearch Source: https://docs.ccs.kaitran.ca/features/ai/websearch Web search fallback for third-party providers # WebSearch Fallback Third-party profiles cannot use Anthropic's native WebSearch. CCS provides automatic web search via CLI tools with intelligent fallback. ## Overview CCS intercepts WebSearch requests from Claude Code and routes them through available CLI tools. WebSearch Configuration - Dark WebSearch Configuration - Light ## How It Works | Profile Type | WebSearch Method | | -------------------- | ----------------------- | | Claude (native) | Anthropic WebSearch API | | Third-party profiles | CLI Tool Fallback Chain | ## Fallback Chain CCS tries tools in priority order until one succeeds: | Priority | Tool | Auth | Install | | -------- | ---------- | ------------ | ------------------------------------------------ | | 1st | Gemini CLI | OAuth (free) | `npm install -g @google/gemini-cli` | | 2nd | OpenCode | OAuth (free) | `curl -fsSL https://opencode.ai/install \| bash` | | 3rd | Grok CLI | API Key | `npm install -g @vibe-kit/grok-cli` | ## Configuration Configure via dashboard (**Settings** page) or `~/.ccs/config.yaml`: ```yaml theme={null} websearch: enabled: true # Enable/disable (default: true) providers: gemini: enabled: true # Use Gemini CLI (default: true) model: gemini-2.5-flash # Model to use opencode: enabled: true # Use OpenCode as fallback grok: enabled: false # Requires XAI_API_KEY ``` CCS resolves one configuration snapshot for each new Claude launch. Provisioning, hook environment, and steering for that launch all use the same snapshot; a later config edit does not change the already prepared session. If you set `websearch.enabled: false`, third-party Claude launches still keep native `WebSearch` disallowed. CCS omits its steering prompt and marks the managed hook to skip execution for that launch, so no active WebSearch hook state or provider fallback runs. ## Setup ```bash theme={null} npm install -g @google/gemini-cli ``` Run once to complete OAuth: ```bash theme={null} gemini ``` Check that websearch works: ```bash theme={null} ccs codex "search for the latest TypeScript features" ``` ## Provider Details * **Auth**: Free Google OAuth * **Limit**: 1000 requests/day * **Quality**: Excellent search relevance * **Setup**: `gemini` to authenticate via browser * **Auth**: Free OAuth * **Limit**: Varies * **Quality**: Good for code-related searches * **Setup**: Follow installer prompts * **Auth**: Requires `XAI_API_KEY` * **Limit**: Based on API plan * **Quality**: Real-time web access * **Setup**: Set env var and install ## Troubleshooting Verify CLI tools are installed: ```bash theme={null} which gemini opencode grok ``` Re-authenticate the failing tool: ```bash theme={null} gemini # Opens browser for OAuth ``` Switch to a faster fallback: ```yaml theme={null} websearch: providers: gemini: model: gemini-2.0-flash-lite ``` **Gemini CLI** is recommended - free OAuth authentication with 1000 requests/day. Just run `gemini` once to authenticate via browser. # Account Safety Source: https://docs.ccs.kaitran.ca/features/config/account-safety Cross-provider isolation, ban detection, and quota monitoring to protect Google accounts # Account Safety Automatic protections to prevent Google account bans when using multiple OAuth providers simultaneously. ## Overview When the same Google email is authenticated across multiple providers (gemini, agy, codex), simultaneous usage can trigger Google's abuse detection. CCS automatically isolates accounts to prevent this. This feature addresses [Issue #509](https://github.com/kaitranntt/ccs/issues/509). If you use the same Google email across gemini and agy, enable cross-provider isolation. ## Cross-Provider Isolation ### How It Works On session launch, CCS scans all providers for emails appearing in 2+ Google OAuth providers Conflicting accounts in other providers are temporarily paused Only one provider uses the shared email at a time On session exit, paused accounts are restored automatically **Example:** If `john@gmail.com` is authenticated in both `gemini` and `agy`, starting a `gemini` session auto-pauses the `agy` account for `john@gmail.com`. ### Crash Recovery If CCS crashes without restoring paused accounts: * Next launch detects stale sessions (dead PIDs) * Automatically restores accounts from dead processes * Persistence file: `~/.ccs/cliproxy/auto-paused.json` ## Ban Detection CCS monitors for ban-related error patterns during sessions: **Detected Patterns:** * `disabled in this account` * `violation of terms of service` * `account has been disabled/suspended/banned` **On Detection:** 1. Affected account is auto-paused immediately 2. No further retries on banned account 3. Warning displayed with box border ## Runtime Quota Monitoring Available since v7.42.0. Monitors quota during active sessions, not just at startup. ### Quota Warning When quota falls below 20%, CCS displays a warning: ``` ╔═══════════════════════════════════════╗ ║ [!] Quota below 20% for codex ║ ║ Daily: 48/50 messages remaining ║ ╚═══════════════════════════════════════╝ ``` ### Quota Exhaustion When quota is fully exhausted: 1. Applies cooldown period to exhausted account 2. Finds healthy alternative account (if available) 3. Switches default account automatically 4. Logs the switch for transparency Before local CLIProxy startup, CCS also checks the active provider account pool. If a non-default account is already quota-exhausted and another healthy account exists, CCS temporarily pauses the exhausted account so CLIProxy does not keep routing requests to it. The pause uses the same cooldown metadata as runtime quota exhaustion and resumes automatically when the cooldown expires. ## Antigravity Responsibility Checklist Available since v7.49.0 When adding a new Antigravity account via the dashboard, a responsibility checklist is displayed. Users must acknowledge guidelines before the account is activated: * Account usage policies * Rate limit awareness * Fair use expectations This checklist appears in the "Add Account" dialog for the Antigravity provider and helps prevent unintentional policy violations. ## Configuration Account safety runs automatically with no configuration needed. Behavior is controlled internally based on provider auth files. ### Manual Account Management ```bash theme={null} # Pause an account manually ccs cliproxy pause # Resume a paused account ccs cliproxy resume # Check status of all accounts ccs cliproxy status ``` ## Token Storage OAuth tokens are stored locally with restricted permissions: | Path | Permission | Contents | | ---------------------------------- | ------------------- | --------------------------------------------------- | | `~/.ccs/cliproxy/auth/` | `0o600` (user-only) | Individual OAuth token files per provider account | | `~/.ccs/cliproxy/accounts.json` | `0o600` | Account registry with pause state and tier metadata | | `~/.ccs/cliproxy/auto-paused.json` | `0o600` | Auto-pause session tracking | Tokens are never transmitted outside of the local CLIProxy instance. CLIProxy listens on `127.0.0.1:8317` by default. ## Dashboard Authentication If you expose the dashboard on a non-loopback address (e.g. `ccs config --host 0.0.0.0`), enable password protection first: ```bash theme={null} # Set up dashboard authentication ccs config auth setup ``` This adds HTTP basic auth to the dashboard server. Without it, any device on your network can access your account configuration and OAuth tokens. Always run `ccs config auth setup` before using `ccs config --host 0.0.0.0` on a shared or untrusted network. ## Best Practices * Use separate Google accounts for each OAuth provider (gemini, agy, codex) * Do not reuse the same email across gemini and agy (see [Issue #509](https://github.com/kaitranntt/ccs/issues/509)) * Enable dashboard auth before exposing the dashboard beyond localhost * Review the Antigravity responsibility checklist when adding new accounts * CCS is provided as-is and does not take responsibility for account bans or access loss resulting from usage ## Storage | Path | Purpose | | ---------------------------------- | --------------------------------- | | `~/.ccs/cliproxy/auto-paused.json` | Auto-pause session tracking | | `~/.ccs/cliproxy/accounts.json` | Account registry with pause state | | `~/.ccs/cliproxy/auth/` | OAuth token files per provider | ## Troubleshooting ### Account Stuck in Paused State **Symptom:** Account not rotating after crash **Solution:** ```bash theme={null} # Check paused accounts ccs cliproxy status # Manually resume ccs cliproxy resume ``` ### False Ban Detection **Symptom:** Account paused but not actually banned **Solution:** Resume manually and monitor: ```bash theme={null} ccs cliproxy resume ``` ## Next Steps Configure multiple accounts per provider Monitor account status via web UI # Composite Variants Source: https://docs.ccs.kaitran.ca/features/config/composite-variants Create CLIProxy provider variants with custom configurations # Composite Variants Composite variants let you assign different CLIProxy providers to each model tier (opus/sonnet/haiku). For example: Codex for opus, Claude for sonnet, and Codex Mini for haiku — each with its own fallback and thinking budget. CLIProxy variants are user-defined provider configurations layered on top of a base provider. Simple variants inherit all settings from a base provider with optional overrides. Composite variants extend this by assigning different providers per model tier. ## Simple Variants Create a variant from a base CLIProxy provider: ```bash theme={null} ccs cliproxy create my-codex --provider codex ccs cliproxy create my-claude --provider claude ``` Options available during creation: * Custom nickname * Model override * Droid target routing: `ccs cliproxy create my-codex --provider codex --target droid` Variants are stored in `~/.ccs/config.yaml` under `cliproxy.variants` and become available as profile names: ```bash theme={null} ccs my-codex "your prompt" ccs my-claude "your prompt" ``` List all variants and their status: ```bash theme={null} ccs cliproxy ``` *** ## Composite Variants Composite variants let you assign different CLIProxy providers to each model tier (opus/sonnet/haiku). For example: Codex for opus, Claude for sonnet, and Codex Mini for haiku — each with its own fallback and thinking budget. ## Quick Start ```bash theme={null} ccs cliproxy create --composite ``` Navigate to **Dashboard → CLIProxy → Advanced Variant** and choose the composite variant option. ```bash theme={null} ccs "your prompt" ``` ## How It Works * Each tier (opus/sonnet/haiku) maps independently to a provider + model pair * `default_tier` determines which tier `ANTHROPIC_MODEL` resolves to when no tier is specified * Routing uses the root CLIProxy URL with model-based routing (not provider-specific URLs) * Settings written to `~/.ccs/composite-.settings.json` ## Type Definition ```typescript theme={null} interface CompositeTierConfig { provider: CLIProxyProvider; model: string; account?: string; fallback?: { provider: CLIProxyProvider; model: string; account?: string }; thinking?: string; // 'xhigh' | 'high' | 'medium' | 'off' | numeric string } interface CompositeVariantConfig { type: 'composite'; default_tier: 'opus' | 'sonnet' | 'haiku'; tiers: { opus: CompositeTierConfig; sonnet: CompositeTierConfig; haiku: CompositeTierConfig; }; } ``` ## CLI Commands ```bash theme={null} ccs cliproxy create --composite # Create with interactive wizard ccs cliproxy edit # Edit existing variant ccs cliproxy remove # Remove variant ccs cliproxy list # List all variants (shows type column) ccs "prompt" # Use the variant ``` ## Fallback Logic Each tier supports an optional `fallback` block. On provider error (4xx/5xx, quota exceeded, rate limit, ECONNREFUSED): 1. Detect which tier failed via model name in stderr 2. Apply fallback `provider` + `model` for that tier only 3. Retry the request with the updated config Circular fallback is blocked — a fallback cannot point to the same provider + model as the primary. **Example tier with fallback:** ```yaml theme={null} cliproxy: variants: my-composite: type: composite default_tier: sonnet tiers: opus: provider: codex model: gpt-5.2 fallback: provider: claude model: claude-opus-4-5 sonnet: provider: claude model: claude-sonnet-4-5 haiku: provider: codex model: gpt-5.4-mini ``` ## Per-Tier Thinking Override the thinking budget independently per tier via `thinking` in `CompositeTierConfig`. **Priority (highest to lowest):** 1. CLI `--thinking` flag 2. Per-tier `thinking` in composite config 3. Global `thinking` config 4. Provider defaults **Valid values:** `xhigh`, `high`, `medium`, `off`, or a numeric token budget string. ## Dashboard CRUD | Method | Endpoint | Notes | | -------- | --------------------- | --------------------------------------------- | | `POST` | `/api/cliproxy` | `type: composite`, all 3 tiers required | | `PUT` | `/api/cliproxy/:name` | Partial tier update supported | | `DELETE` | `/api/cliproxy/:name` | Checks for active sessions before removing | | `GET` | `/api/cliproxy` | Lists all variants with type, tiers, and port | ## Validation Rules * All 3 tiers required on create; partial updates allowed on edit * Each tier must have a valid `provider` and non-empty `model` * Circular fallback detection enforced at save time * `kiro` and `ghcp` providers require the **Plus** backend Switch to the Plus backend if you need kiro or ghcp in any tier: set `cliproxy.backend: plus` in `~/.ccs/config.yaml`. ## Storage | Path | Purpose | | --------------------------------------- | -------------------------------------------------- | | `~/.ccs/config.yaml` | Variant definition under `cliproxy.variants[name]` | | `~/.ccs/composite-.settings.json` | Generated runtime settings file | # Dashboard Localization Source: https://docs.ccs.kaitran.ca/features/config/i18n Multi-language support for the CCS dashboard — English, Simplified Chinese, Vietnamese, Japanese, Korean, and Brazilian Portuguese # Dashboard Localization Brazilian Portuguese (`pt-BR`) joined the dashboard in v8.8.1-dev.8. Korean (`ko`) has been available since v7.79.1-dev.2. The CCS dashboard supports multiple display languages. All 40+ components are fully translated, including Analytics, OAuth Providers, API Profiles, Settings, Shared Data, and more. ## Supported Languages | Locale | Language | Added In | Coverage | | ------- | -------------------- | ------------- | -------------- | | `en` | English | v1.0 | Source locale | | `zh-CN` | Simplified Chinese | v7.51.0 | Full dashboard | | `vi` | Vietnamese | v7.51.0 | Full dashboard | | `ja` | Japanese | v7.53.0 | Full dashboard | | `ko` | Korean | v7.79.1-dev.2 | Full dashboard | | `pt-BR` | Brazilian Portuguese | v8.8.1-dev.8 | Full dashboard | ## Switching Language The language switcher is in the top navigation bar of the dashboard. ```bash theme={null} # Open dashboard ccs config # Click the language selector in the top-right corner ``` **Language detection order:** 1. User selection (persisted in `localStorage`) 2. Browser language preference (`navigator.language`) 3. Falls back to English (`en`) Your selection is saved automatically — no page reload needed. ## Coverage All major dashboard sections are fully localized: Usage trends, cost breakdowns, model usage charts, session stats Provider status, account lists, quota displays, auth flows Profile creation wizard, preset catalog, settings forms CLIProxy sync, preferences, dashboard auth, update settings Commands, skills, agents tabs, search, markdown viewer Auth monitor, health status, token state indicators ## Next Steps Full dashboard feature documentation Usage tracking and cost analysis # Shared Data Source: https://docs.ccs.kaitran.ca/features/config/shared-data Inspect shared commands, skills, and agents from the CCS dashboard # Shared Data Shared Data is the routed dashboard workspace for the reusable Claude assets that CCS exposes across profiles: commands, skills, and agents. ## Access ```bash theme={null} ccs config # Sidebar -> Accounts -> Shared Data # Direct route -> /shared ``` ## What It Reads Shared Data is an inspection layer on top of the shared asset chain: * `~/.claude/` remains the authoritative source * `~/.ccs/shared/` is the CCS access layer * profile instances read shared assets through that chain For non-bare profiles, this chain also shares `settings.json` and the user instructions in `CLAUDE.md`. The Shared Data browser itself lists only commands, skills, and agents. On Windows, CCS can fall back to copies when symlinks are unavailable. ## Current Layout ### Header The current page header surfaces three live counts: * **Total Shared** across commands, skills, and agents * **Current tab total** * **Visible** items after search filtering It also shows a markdown-detail badge and an optional filter badge when a query is active. ### Left Pane The left pane is the browser: * tab switcher for **Commands**, **Skills**, and **Agents** * live item counts per tab * search across item name, description, and path * retry handling when list reads fail ### Right Pane The right pane is the detail viewer: * rendered markdown or raw content for the selected item * item kind badge * path and metadata display * loading and retry states for the selected item ## Asset Discovery Rules | Kind | Location | Discovery | | -------- | --------------------- | ---------------------------------------------------- | | Commands | `~/.claude/commands/` | recursive `.md` discovery | | Skills | `~/.claude/skills/` | directories containing `SKILL.md` | | Agents | `~/.claude/agents/` | agent directories or standalone markdown agent files | ## Configuration Warnings If the shared-data chain is invalid, the workspace shows a configuration alert and points you back to: ```bash theme={null} ccs sync ``` The page can still show partial results while counts or content retry, but a broken shared chain should be fixed before you trust the inventory. ## CLI Parity ```bash theme={null} ccs sync ccs doctor ccs auth resources ccs auth resources --mode shared|profile-local ``` Use the dashboard when you want discovery and reading. Use the CLI when you need repair or automation. ## Per-Profile Shared Resource Policy Each account profile is either **shared** (plugins, settings, `CLAUDE.md`, commands, skills, and agents linked from `~/.claude/`) or **profile-local** (no linking; the profile carries its own resource set, equivalent to creating with `--bare`). New non-bare profiles use shared mode by default. Switch modes from the dashboard or CLI: | Surface | How | | ---------- | ----------------------------------------------------------- | | Dashboard | Accounts -> profile row -> "Edit Shared Resources" dialog | | CLI | `ccs auth resources --mode shared\|profile-local` | | Inspection | `ccs auth resources [--json]` | Profile-local mode is useful for sandboxed accounts that must not inherit your global Claude plugins, skills, settings, or instructions. ## Shared `CLAUDE.md` `~/.claude/CLAUDE.md` is the canonical user-instructions file. Shared profiles use this chain: ```text theme={null} ~/.ccs/instances//CLAUDE.md -> ~/.ccs/shared/CLAUDE.md -> ~/.claude/CLAUDE.md ``` If the canonical file and all previous copies are missing, CCS creates an empty Markdown file. It does not seed `CLAUDE.md` with JSON. Reconciliation is canonical-first: | Existing state | Result | | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Canonical file exists | Canonical content wins; divergent copies are preserved beside their old path with a `.ccs-shared-conflict` suffix. | | Canonical file is missing and one byte-for-byte variant exists | CCS adopts that variant as the canonical file. | | Canonical file is missing and multiple distinct variants exist | CCS preserves every variant with a `.ccs-shared-conflict` suffix, creates an empty canonical file, and asks you to recover one explicitly. Modification time is not used to choose. | To recover a conflict, inspect the preserved files, put the intended content in `~/.claude/CLAUDE.md`, then start each affected shared profile so CCS can restore its managed link. Keep the conflict copies until you confirm the instructions load correctly. ## API Endpoints | Endpoint | Purpose | | --------------------------------------- | ------------------------------- | | `GET /api/shared/commands` | list shared commands | | `GET /api/shared/skills` | list shared skills | | `GET /api/shared/agents` | list shared agents | | `GET /api/shared/content?type=X&path=Y` | load selected item content | | `GET /api/shared/summary` | fetch counts and symlink status | ## Related * [Accounts Workspace](/features/dashboard/accounts-workspace) * [CLI Commands](/reference/cli-commands) * [File Locations](/reference/file-locations) # Updates Center Source: https://docs.ccs.kaitran.ca/features/config/updates-center Action-oriented inbox for rollout tasks, support matrix, and integration status tracking # Updates Center The Updates Center is a dashboard page that tracks rollout tasks, support status for integrations, and actionable setup steps. ## Overview Access the Updates Center at `http://localhost:3000/updates` via the CCS dashboard. **Key Features:** * **Action inbox** — notices with "Do Next" tasks you can mark done/dismissed * **Support matrix** — status of each integration (Target CLI, CLIProxy, API, WebSearch) * **Progress tracking** — per-notice state persisted in browser localStorage ## Layout The page uses a two-panel layout: **Left panel (inbox list):** * Stat cards showing "Needs Action" and "Done" counts * Search box (searches titles, summaries, commands, highlights) * View mode tabs: Action Required | Done | All * Scrollable notice list sorted by date (newest first) **Right panel (detail view):** * Notice header with title, summary, status badges * Action buttons: Mark Done, Dismiss, Reopen * "Do Next" card with actionable items (dashboard links + CLI commands) * "Impacted Integrations" card showing affected support entries * "Why It Matters" highlights ## Notice Progress Each notice tracks a progress state stored in browser localStorage: | State | Badge | Meaning | | ----------- | ------------ | ---------------------------- | | `new` | Needs Action | Unread, requires attention | | `seen` | In Review | Clicked once, being reviewed | | `done` | Done | Completed by user | | `dismissed` | Dismissed | Intentionally skipped | Clicking an inbox item auto-transitions `new` → `seen`. Use action buttons to mark `done` or `dismissed`. **Storage key:** `ccs:updates:notice-progress:v1` (localStorage JSON) ## Support Entries Each notice links to **support entries** representing integrations: | Scope | Label | Examples | | ----------- | ----------------- | -------------------------- | | Target CLI | Target CLI | Claude Code, Factory Droid | | CLIProxy | CLIProxy Provider | Codex, Gemini, Antigravity | | API Profile | API Profile | Custom API endpoints | | WebSearch | WebSearch | OpenCode WebSearch | Each entry shows: * **Name** and scope badge * **Three pillars:** Base URL source, Auth method, Model selection * **Dashboard link** and **CLI command** with copy button ## Action Types "Do Next" items are either: 1. **Route actions** — buttons navigating to dashboard sections (e.g., "Open API Profiles" → `/providers`) 2. **Command actions** — CLI snippets with copy button (e.g., `ccsd glm`, `ccs codex --target droid "prompt"`) ## Access The Updates Center is accessible via direct URL navigation. It is not shown in the main sidebar — designed as an on-demand reference page. ```bash theme={null} # Open dashboard, then navigate to /updates ccs config # → http://localhost:3000/updates ``` All content is static — published as part of CCS releases. No external API calls or CMS. ## Related * [Dashboard](/features/dashboard/overview) — Main dashboard overview * [Droid Adapter](/features/workflow/droid-adapter) — Multi-target routing * [CLIProxy API](/features/proxy/cliproxy-api) — OAuth provider management # Accounts Workspace Source: https://docs.ccs.kaitran.ca/features/dashboard/accounts-workspace Manage CCS auth profiles, continuity groups, and Claude pool handoff from the dashboard # Accounts Workspace The Accounts workspace at `/accounts` is the dashboard surface for **CCS auth profiles**. Use it when you manage `ccs auth` profiles, continuity groups, and default-account behavior. Use the Claude provider inside `/cliproxy` instead when the account should live in the CLIProxy pool. ## Access ```bash theme={null} ccs config # Sidebar -> Identity & Access -> Accounts # Direct route -> /accounts ``` ## What It Covers * create new CCS auth profiles without leaving the dashboard * follow the recommended two-account route: keep tokens isolated and choose the account explicitly at runtime * inspect continuity and context-group relationships * see when plain `ccs` is using a different resume lane than an account profile * review migration follow-up for legacy inferred sharing * jump into the Claude pool auth flow when an account belongs in CLIProxy ## Layout ### Left Action Rail The left rail is the command surface for day-to-day account work: * **Create Account** opens the profile creation dialog * **Auth Claude In Pool** deep-links into `/cliproxy?provider=claude&action=auth` * **Open Claude Pool Settings** jumps to the Claude provider inside `/cliproxy` * **Migration Follow-up** appears when legacy inferred sharing still needs confirmation * **Quick Commands** mirrors the most common CLI flows with copy buttons ### Main Workspace The main panel is a continuity-first view of your auth profiles: * **Continuity overview** summarizes isolated lanes, shared lanes, deeper-continuity readiness, and CLIProxy-adjacent counts * **Route guide** explains isolated account usage, shared settings and instructions, and opt-in history sync * **Account matrix** lists CCS auth profiles, default-account state, and group relationships * **Badges** call out the workspace scope and history-sync posture before you edit anything The workspace separates three concepts that are easy to confuse: | Concept | Default | How to inspect | | ------------------------------------ | ------------------------------------ | ---------------------------------------- | | Credentials and tokens | isolated per account profile | `ccs auth show ` | | `settings.json` and user `CLAUDE.md` | shared for non-bare account profiles | route guide or `ccs auth show ` | | Local history and resume continuity | isolated unless sharing is enabled | continuity overview and account matrix | Non-bare account profiles link settings and user instructions through CCS shared state: ```text theme={null} ~/.ccs/instances//settings.json -> ~/.ccs/shared/settings.json -> ~/.claude/settings.json ~/.ccs/instances//CLAUDE.md -> ~/.ccs/shared/CLAUDE.md -> ~/.claude/CLAUDE.md ``` This keeps normal Claude settings and instructions aligned without copying account credentials. `~/.claude/CLAUDE.md` is canonical; CCS preserves divergent copies for explicit recovery instead of overwriting it. History sync is separate and remains opt-in. ### Mobile View On smaller screens the workspace collapses into a stacked layout. The same actions remain available, but the side rail becomes a compact card above the account matrix. ## Relationship To Shared Data `/accounts` and `/shared` live in the same sidebar group, but they solve different problems: | Route | Use it for | | ----------- | ------------------------------------------------------------------ | | `/accounts` | CCS auth profiles, continuity, default-account management | | `/shared` | shared resource policy plus browsable commands, skills, and agents | If you need to inspect shared commands, skills, or agents, or recover a `CLAUDE.md` conflict, see [Shared Data](/features/config/shared-data). ## CLI Parity The workspace stays aligned with the CLI rather than replacing it: ```bash theme={null} ccs auth create work ccs auth create personal ccs work ccs personal ccs auth create work --share-context --context-group sprint-a --deeper-continuity ccs auth show work ccs auth backup default ccs auth default work ccs cliproxy auth claude ``` Use the dashboard when you want structure and visibility. Use the CLI when you need scripts, terminals, or versioned setup. ## Related * [Claude Accounts](/providers/concepts/claude-accounts) * [CLIProxy API](/features/proxy/cliproxy-api) * [Shared Data](/features/config/shared-data) # Analytics Source: https://docs.ccs.kaitran.ca/features/dashboard/analytics Track usage metrics, costs, and session statistics across all providers # Analytics Dashboard The Analytics dashboard provides comprehensive visibility into your AI usage patterns, costs, and performance metrics across all configured providers — including Claude, CLIProxy OAuth providers, and CLIProxy multi-provider sources. ## Overview Access analytics through the dashboard: ```bash theme={null} ccs config # Navigate to Analytics tab ``` Analytics Dashboard - Dark Analytics Dashboard - Light ## Data Sources Available since v7.51.0 — unified multi-provider analytics CCS aggregates usage data from three sources into a single unified view: Local session data from `~/.claude/` — costs, tokens, session history for Claude account profiles Usage from all configured CCS profiles (GLM, API profiles, account profiles) Aggregated usage from all CLIProxy OAuth providers (Gemini, Codex, AGY, GHCP, Kimi, etc.) ### CLIProxy Background Sync CLIProxy usage data syncs automatically every **5 minutes** in the background: * Snapshot stored at `~/.ccs/cache/cliproxy-usage/latest.json` * Dashboard reads from snapshot for instant load (no blocking API calls) * Manual refresh available via the refresh button or API endpoint ## Key Metrics Five summary cards display high-level metrics: Combined input/output tokens across all providers Aggregate spending across Claude, Gemini, GPT, GLM, Qwen models Tokens served from cache, reducing API costs Breakdown of costs by request direction ## Dashboard Widgets ### Usage Trends Area chart showing token/cost trends over time with: * Configurable date ranges: 24H, 7D, 30D, Month, All Time * Custom date picker for specific periods * Auto-refresh with "Updated X ago" indicator * **Daily and hourly granularity** — drill down to per-hour breakdowns ### Cost by Model Horizontal bar chart breaking down costs per model: * Claude Opus/Sonnet 4.6 Thinking * Gemini 3 Pro / Flash variants * GPT 5.2, GLM 4, Qwen3 Coder * Color-coded bars for quick comparison ### Model Usage Donut chart showing distribution of requests across models: * Percentage breakdown by model * Visual representation of dominant providers * **Monthly aggregates** for billing overview ### Session Stats * **Total Sessions**: Count of coding sessions * **Avg Cost/Session**: Average spending per session * **Recent Activity**: List of recent sessions with timestamps ### CLIProxy Stats Real-time proxy performance metrics: * **Success Rate**: Percentage with total/failed counts * **Total Tokens**: Aggregate tokens through proxy * **Models Used**: Per-model breakdown with request counts * **Anomaly Detection**: Highlights unusual usage spikes or error rates ### Hourly Breakdown Available since v7.51.0 Granular per-hour usage view: * Token and cost breakdown by hour of day * Identify peak usage patterns * Useful for rate limit planning ## Time Range Controls | Range | Description | | -------- | ------------------------------ | | 24H | Last 24 hours | | 7D | Last 7 days (default) | | 30D | Last 30 days | | Month | Current calendar month | | All Time | Complete history | | Custom | Date picker for specific range | ## API Endpoints Available since v7.51.0 — programmatic access to analytics data The CCS dashboard server exposes analytics endpoints at `http://localhost:3000`: | Endpoint | Method | Description | | --------------------- | ------ | ---------------------------- | | `/api/usage/summary` | GET | High-level aggregate totals | | `/api/usage/daily` | GET | Day-by-day breakdown | | `/api/usage/hourly` | GET | Hour-by-hour breakdown | | `/api/usage/models` | GET | Per-model usage and costs | | `/api/usage/sessions` | GET | Session list with stats | | `/api/usage/insights` | GET | Anomaly detection results | | `/api/usage/refresh` | POST | Trigger manual CLIProxy sync | **Example:** ```bash theme={null} # Get summary (requires ccs config running) curl http://localhost:3000/api/usage/summary # Force refresh CLIProxy data curl -X POST http://localhost:3000/api/usage/refresh # Get hourly breakdown curl http://localhost:3000/api/usage/hourly ``` ## Storage Analytics data is stored locally. No data is sent to external servers. | Path | Description | | ----------------------------------------- | ----------------------------------------------- | | `~/.ccs/usage/` | Local session usage data | | `~/.ccs/cache/cliproxy-usage/latest.json` | CLIProxy usage snapshot (refreshed every 5 min) | # Dashboard Authentication Source: https://docs.ccs.kaitran.ca/features/dashboard/auth Optional dashboard login with host-setup guidance and remote read-only fallback # Dashboard Authentication Protect the CCS dashboard with optional username/password authentication. Authentication is still disabled by default, but the remote-access behavior is now much clearer than older CCS releases. CCS does not ship a default dashboard username or password. Enable dashboard auth whenever the bind is reachable from another device, including when you run `ccs config --host 0.0.0.0`. ## Access Modes | Situation | What users see | | --------------------------------------------- | --------------------------------------------------------------------------------- | | Localhost access, auth disabled | Dashboard opens normally without login | | Remote/IP access, auth disabled | Dashboard UI can open, but sensitive management routes stay localhost-only | | Remote/IP access, auth enabled but incomplete | Login page shows a setup-state message instead of a misleading blank sign-in form | | Remote/IP access, auth enabled and configured | Full authenticated dashboard access | When auth is disabled, remote users can still inspect read-only dashboard surfaces, but write-capable routes stay locked to localhost until the host owner runs `ccs config auth setup`. ## Quick Setup ### Recommended Path ```bash theme={null} ccs config auth setup ccs config auth show ccs config ``` The setup wizard: * prompts for username and password * hashes the password with bcrypt before saving * writes the result into `~/.ccs/config.yaml` * preserves credentials if you later disable auth and want to re-enable it ### Manual Configuration ```yaml theme={null} dashboard_auth: enabled: true username: admin password_hash: "$2b$10$your-bcrypt-hash-here" session_timeout_hours: 24 ``` ```bash theme={null} export CCS_DASHBOARD_AUTH_ENABLED=true export CCS_DASHBOARD_USERNAME=admin export CCS_DASHBOARD_PASSWORD_HASH='$2b$10$your-bcrypt-hash-here' ``` Environment variables override `config.yaml`. ## Login Flow When authentication is enabled: 1. Open the dashboard URL printed by `ccs config` 2. If auth is configured correctly, CCS redirects you to the login page 3. Enter username and password 4. On success, CCS returns you to the original destination 5. The session persists for the configured timeout (24 hours by default) The login page also makes the host setup state explicit for remote users, includes a show/hide password control, and exposes a theme switch before sign-in. ## Remote Read-Only Fallback When auth is disabled and the dashboard is reachable beyond localhost: * remote users can still open read-only dashboard views * sensitive management routes stay localhost-only * AI Provider management, CLIProxy auth/status helpers, and other write-capable endpoints reject non-loopback requests This means you can inspect the dashboard remotely without silently opening full management access. ## Configuration Reference | Key | Type | Default | Description | | ----------------------- | ------- | ------- | --------------------------------- | | `enabled` | boolean | `false` | Enable or disable dashboard login | | `username` | string | `""` | Login username | | `password_hash` | string | `""` | Bcrypt password hash | | `session_timeout_hours` | number | `24` | Session lifetime in hours | ## Environment Variables | Variable | Maps to | | ----------------------------- | ------------------------------ | | `CCS_DASHBOARD_AUTH_ENABLED` | `dashboard_auth.enabled` | | `CCS_DASHBOARD_USERNAME` | `dashboard_auth.username` | | `CCS_DASHBOARD_PASSWORD_HASH` | `dashboard_auth.password_hash` | | `CCS_SESSION_SECRET` | Custom session encryption key | ## Security Notes * CCS uses HTTP-only session cookies instead of `localStorage` * Login attempts are rate-limited * Passwords are stored as bcrypt hashes * Remote write access fails closed when auth is disabled ## Troubleshooting ### Remote users see setup guidance instead of a login form That means auth is enabled or intended, but the host has not finished configuration. Run: ```bash theme={null} ccs config auth setup ``` If you are on the same machine, reopen the localhost dashboard URL instead of the network URL. ### Remote dashboard is visible but read-only That is expected when dashboard auth is disabled. Either: * keep it read-only for lightweight remote inspection, or * run `ccs config auth setup` on the host to unlock remote changes ### "Too many login attempts" Rate limiting triggered. Wait 15 minutes or restart the dashboard. ### Session expires unexpectedly Increase `session_timeout_hours` or check that the session secret is stable between restarts. # CCS Bar Source: https://docs.ccs.kaitran.ca/features/dashboard/ccs-bar Native macOS menu-bar companion for quota, spend, and account controls # CCS Bar CCS Bar is the native macOS menu-bar companion for CCS. It gives you a fast quota and spend glance without opening the dashboard, then lets you jump into account controls when you need them. CCS Bar is macOS-only. It talks to your local CCS server over loopback and does not call Claude, Codex, or CLIProxy providers directly. CCS Bar v1 expects the default local CCS data directory at `~/.ccs`. Custom `CCS_HOME` or `CCS_DIR` layouts may not be discovered by the native app yet. ## Current Snapshot CCS Bar macOS menu-bar panel with sanitized quota, spend, and account rows The screenshot uses sanitized demo account names and usage values. The layout matches the current panel structure: native subscription rows first, spend summary next, pool accounts below, and quick actions in the footer. ## Install And Run ```bash theme={null} ccs bar install ``` This downloads `CCS Bar.app` from the `ccs-bar-latest` release into `~/Applications`, clears the macOS Gatekeeper quarantine, and records how to start the local server so the app can launch it on its own. Launch CCS Bar from Spotlight, Finder, or the Dock. The first time you open the menu, it starts the local CCS server in the background and connects. You do not need to keep a terminal open. ```bash theme={null} ccs bar ccs bar --port 3999 ``` `ccs bar` starts the server in the background and returns your prompt right away, then opens the app. If a server is already running it reuses it. Add `--port` to choose an exact loopback port. ```bash theme={null} ccs bar install --launch ccs bar uninstall ``` ## Updating CCS Bar keeps itself current. When a newer build is published it shows an **Update available** row at the top of the menu. Click **Update Now** and the app downloads the new version, replaces itself, and reopens. You never need a terminal. Automatic checks are on by default. You can turn them off in **Settings > Updates** ("Check for CCS Bar updates automatically"). You can also update at any time from the CLI with `ccs bar install`, which always fetches the latest published build. The in-app updater runs `ccs bar install` for you, so keep the CCS CLI on your PATH and reasonably up to date. ## Commands | Command | What it does | | -------------------- | ------------------------------------------------------------------------------------------------ | | `ccs bar` | Start the background server if needed, then open the app | | `ccs bar --port ` | Start or move the server to an exact port from 1 to 65535 | | `ccs bar stop` | Stop the background server | | `ccs bar status` | Show the process-record, PID, and HTTP reachability state | | `ccs bar serve` | Run the server in the current terminal (advanced; `ccs bar` runs this for you in the background) | | `ccs bar install` | Install or update the app | | `ccs bar uninstall` | Remove the app | ### Port And Lifecycle Behavior * `--port` accepts only an integer from `1` to `65535`. CCS fails instead of silently choosing another port when the value is invalid or occupied. * The selected port is sticky. Later launches try it first, including after `ccs bar stop`; if it is unavailable, a launch without `--port` can use a standard fallback port. * When moving a running server, CCS checks the destination before stopping the current server. If the replacement cannot start or become ready, CCS tries to restore the prior server. If restoration also fails, it preserves the prior discovery and launch files for recovery. * `ccs bar stop` verifies both the PID and the process start identity before it sends `SIGTERM`. A mismatch, permission error, signal failure, or timeout leaves the recovery files untouched instead of risking another process or losing diagnostic state. Older CCS versions stored only a number in `server.pid`. Current versions treat that legacy record as unverifiable: `ccs bar status` reports it as invalid, and `ccs bar stop` refuses to signal the PID or delete recovery files. Do not run `kill` against that number alone because macOS may have reused it. Confirm and quit the CCS server in Activity Monitor, or restart the Mac; only after confirming it is stopped should you move the stale `server.pid` and `bar.json` aside and run `ccs bar` again. ## What It Shows Claude Code and Codex rows show quota windows, reset timing, and the tightest remaining window first. Codex usage refreshes live, and a refresh control on the card pulls the latest reading on demand. A spend chart you can switch between Today, 7-day, and 30-day, with time-axis labels (hours for today, days for the wider windows). Totals come from local CCS usage data. Pause, resume, set default, solo an account, or use tier-lock from the menu. Open the dashboard, refresh data, change icon style, or open settings without leaving the menu. ## How It Works CCS Bar loopback data flow diagram The CCS web server runs as a background process, separate from your terminal. When you open the app it checks the usual local ports for a running server, and if it does not find one it starts the server itself using the launch details recorded at install time. That is why a plain double-click works without the CLI. CCS Bar keeps a few small files under `~/.ccs`: | File | Purpose | | ------------------------ | ------------------------------------------------------------------------------------------ | | `~/.ccs/bar.json` | The live server address the app connects to | | `~/.ccs/bar/launch.json` | How to start the server, recorded at install, so the app can start it without a shell PATH | | `~/.ccs/bar/server.pid` | Verified background-process record used by `ccs bar stop` and `ccs bar status` | `~/.ccs/bar.json` looks like this: ```json theme={null} { "baseUrl": "http://127.0.0.1:3000", "port": 3000, "authMode": "loopback" } ``` The app then calls local endpoints: | Endpoint | Used for | | ----------------------------------- | ------------------------------------------------------- | | `GET /api/bar/summary` | account rows, quota, health, reset timing | | `GET /api/bar/summary?refresh=true` | provider-backed refresh when the menu opens | | `GET /api/bar/analytics` | spend windows, sparkline, top models, surface breakdown | | account action endpoints | pause, resume, default, solo, tier-lock | Provider traffic stays in CCS. The native app only talks to localhost. ## Panel Map Annotated CCS Bar panel map The panel is organized for quick triage: * **Header**: CCS identity, app version, refresh state * **Subscriptions**: Claude Code and Codex first, sorted by the tightest quota * **Spend**: a Today / 7-day / 30-day chart with time-axis labels below quota * **Pool accounts**: CLIProxy account rows after native subscriptions * **Footer**: dashboard, icon style, settings, refresh, quit ## Feedback Wanted CCS Bar is new enough that real workflow feedback matters. Please open an issue for rough edges, missing controls, unclear quota labels, menu sizing, install friction, or any idea that would make the bar more useful. Bugs, confusing states, install problems, and missing provider data. Workflow ideas, panel layout feedback, and new account actions. ## Troubleshooting | Symptom | What to try | | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | Menu shows "CCS is not running" | Open the menu again to let the app start the server, or run `ccs bar status` to check and `ccs bar` to start it | | Requested port is busy | Choose another free port, or stop the process using that port; CCS leaves an existing Bar server running when the destination preflight fails | | `server.pid` is invalid after an upgrade | Do not signal the recorded number blindly; follow the legacy PID safety steps above | | Install says the server predates CCS Bar | Update CCS, restart `ccs bar`, then reinstall | | macOS blocks first launch | Right-click the app and choose Open, or rerun `ccs bar install` | | Quota looks stale | Reopen the menu, use the footer refresh, or the refresh control on the Codex card to force a live pull | | Remote dashboard bind does not work | Keep CCS Bar on loopback; v1 expects `127.0.0.1` | # Live Auth Monitor Source: https://docs.ccs.kaitran.ca/features/dashboard/live-auth-monitor Live provider health, request distribution, and provider drill-downs from the CCS home route # Live Auth Monitor The home route now exposes a live provider-health monitor rather than the older radial-only view. It starts as a provider grid, then drills into one provider at a time for account-level flow inspection. ## Overview Access the auth monitor from the dashboard Home page: ```bash theme={null} ccs config # View "LIVE Account Monitor" section ``` ## Landing View The default view shows the current request distribution by provider: * live pulse plus "updated Xs ago" freshness indicator * summary cards for accounts, success, failed, and success rate * provider cards with account count, inline success/failure totals, success-rate bar, and account dots * click a provider card to open the focused account-flow view ## Provider Drill-Down Selecting a provider opens the detailed flow view for that provider: * account-level request flow visualization * per-account state and request totals * pause or resume actions without leaving the page * quota tooltips and provider-specific badges where quota-backed providers expose them * back navigation to return to the provider grid ## Status Signals Use the cards and drill-down together: * green-biased cards indicate clean request flow * amber or red signals point to degraded or failed providers * the monitor keeps selection in local storage, so reopening the dashboard can return you to the same provider drill-down The monitor refreshes continuously. When investigation becomes log-heavy, use the Home route's logs handoff card to jump into `/logs` for request-level inspection. ## Related * [Dashboard Overview](/features/dashboard/overview) * [Dashboard Logs](/features/dashboard/logs) * [CLIProxy API](/features/proxy/cliproxy-api) # Dashboard Logs Source: https://docs.ccs.kaitran.ca/features/dashboard/logs Structured CCS telemetry stream plus upstream CLIProxy error inspection # Dashboard Logs CCS includes a dedicated `System -> Logs` workspace for operational visibility. It is now a dedicated operations surface with a structured telemetry stream and an upstream-error compatibility tab. ## Access ```bash theme={null} ccs config # Open System -> Logs # Or navigate directly to /logs inside the current dashboard session ``` ## Workspace Layout The route exposes two tabs: * **Stream** - CCS-owned structured runtime telemetry * **Upstream errors** - legacy CLIProxy error files for compatibility ### Stream The main stream view is a log workspace, not a raw file dump: * `Live activity` header with live/syncing/disconnected status pill * entry, trace, and error counters * desktop 3-pane layout: filters, entry list, detail panel * mobile detail sheet when you select an entry * request-aware filters for source, level, module, stage, requestId, time window, and free-text search * "hide dashboard internals" filtering for quieter review * live-tail pause/resume controls with pending-count feedback ### Entry Inspection Selecting an entry opens a detail panel with: * **Overview** tab for timestamp, stage, requestId, latency, module, and source * **Context** tab for structured metadata with redaction-aware reveal controls * **Raw** tab for copyable JSON * **Show trace** action when the entry belongs to a correlated request trace ### Upstream Errors The second tab keeps provider and CLIProxy error files visible without making them the primary logging model. Use it when you need the old error-log lane or when only `cliproxy.logging` is enabled. ## Storage Model ### CCS-Owned Structured Logs Native CCS logs live under: ```text theme={null} ~/.ccs/logs/current.jsonl ~/.ccs/logs/archive/ ``` These logs are controlled by the top-level `logging` config block and support: * minimum log level * log rotation by size * archive retention by day count * context redaction * a bounded in-memory buffer for dashboard reads ### CLIProxy Runtime Logs CLIProxy runtime files still live under: ```text theme={null} ~/.ccs/cliproxy/logs/ ``` Those files are controlled separately through `cliproxy.logging`. ## Configuration ```yaml theme={null} logging: enabled: true level: info rotate_mb: 10 retain_days: 7 redact: true live_buffer_size: 250 ``` This is separate from: ```yaml theme={null} cliproxy: logging: enabled: false request_log: false ``` Use top-level `logging` for CCS-owned runtime events. Use `cliproxy.logging` only when you need extra CLIProxy runtime files for troubleshooting. ## Operational Notes * Dashboard `/api/logs` reads are intentionally skipped by request logging so the log viewer does not recursively log itself. * The Home route links here through the logs handoff card once you need request-level inspection. * Remote users can inspect logs only within the dashboard access rules currently enforced by dashboard auth and localhost-only fallbacks. * Redaction is enabled by default so persisted context does not leak obvious secrets into the log stream. ## Troubleshooting ### The Logs page looks empty * Check whether top-level `logging.enabled` is still `true` * Trigger a fresh CCS action, then refresh the page * If you only enabled `cliproxy.logging`, look in the **Upstream errors** tab ### I only need verbose CLIProxy request traces Enable `cliproxy.logging.request_log` instead of raising the global CCS logging level unless you specifically want broader CCS runtime telemetry. ## Related * [Dashboard Overview](/features/dashboard/overview) * [CLIProxy API](/features/proxy/cliproxy-api) * [Configuration Schema](/reference/config-schema) * [File Locations](/reference/file-locations) # Dashboard Source: https://docs.ccs.kaitran.ca/features/dashboard/overview Current route map and workspace anatomy for the CCS dashboard # Dashboard CCS ships a routed dashboard, not a one-screen settings modal. The current UI in `ccs/cli` `dev` is organized into persistent workspaces with a sidebar, a header utility bar, and direct routes you can bookmark inside the active dashboard session. ## Open The Dashboard ```bash theme={null} ccs config ccs config --host localhost ccs config --host 0.0.0.0 ``` CCS binds to `localhost` by default, prints the current session URL, and opens that URL in your browser. When the bind is non-loopback, the dashboard also surfaces remote-access guidance and auth setup expectations. ## Shell Anatomy ### Sidebar The left sidebar is grouped into four route clusters: * **General**: Home and Analytics * **Identity & Access**: API Profiles, CLIProxy, Copilot, Accounts, Shared Data * **Compatible CLIs**: Claude Extension, Codex CLI, Factory Droid * **System**: Health, Logs, Settings The current Cursor provider flow lives inside **CLIProxy**. The older local Cursor IDE bridge survives only as a deprecated compatibility surface. ### Header Utilities The top bar carries live utilities that stay visible across routes: * connection status * language switcher * CCS Bar link for the native macOS menu-bar companion * docs link * GitHub link * privacy toggle * theme toggle * authenticated user menu when dashboard auth is enabled ### Global Dialogs OAuth-driven flows can open project-selection and device-code dialogs above the current page without changing your route. ## Current Route Map | Group | Label | Route | Use it for | | ----------------- | ----------------- | --------------------------- | -------------------------------------------------------------------- | | General | Home | `/` | landing stats, live account monitor, logs handoff | | General | Analytics | `/analytics` | usage, cost, and session breakdowns | | Identity & Access | API Profiles | `/providers` | API and local-model profile CRUD | | Identity & Access | CLIProxy Overview | `/cliproxy` | OAuth providers, accounts, advanced variants, routing | | Identity & Access | AI Providers | `/cliproxy/ai-providers` | API-key and connector routes inside CLIProxy | | Identity & Access | Control Panel | `/cliproxy/control-panel` | embedded upstream CLIProxy management center | | Identity & Access | GitHub Copilot | `/copilot` | copilot-api install, auth, and daemon status | | Identity & Access | Cursor Provider | `/cliproxy?provider=cursor` | current Cursor OAuth auth, accounts, and provider config flow | | Identity & Access | Accounts | `/accounts` | CCS auth profiles and continuity lanes | | Identity & Access | Shared Data | `/shared` | shared commands, skills, and agents | | Compatible CLIs | Claude Extension | `/claude-extension` | IDE bindings and apply/reset flows | | Compatible CLIs | Codex CLI | `/codex` | Codex diagnostics, control center, raw TOML | | Compatible CLIs | Factory Droid | `/droid` | Droid diagnostics, quick controls, raw JSON | | System | Health | `/health` | doctor-style system health and grouped checks | | System | Logs | `/logs` | structured runtime telemetry and legacy errors | | System | Settings | `/settings` | split-view CCS configuration workspace | | Deprecated | Cursor IDE Bridge | `/cursor` | legacy local Cursor daemon bridge; use only with `ccs legacy cursor` | | Direct only | Updates Center | `/updates` | rollout inbox and support-matrix notices | ## Workspace Notes ### Home The home route is an operational landing page: * hero counters for profiles, CLIProxy, accounts, and health * the live auth monitor with provider drill-down * a dedicated handoff card that moves log inspection into `/logs` * an embedded error-log monitor under the fold ### Identity And Access This cluster mixes CCS-native profiles and proxy-driven providers: * **API Profiles** is the CRUD workspace for settings-based profiles * **CLIProxy Overview** is the OAuth and variant workspace * **AI Providers** is the API-key and connector workspace inside CLIProxy * **GitHub Copilot** remains a dedicated provider page * **Cursor** now belongs to the CLIProxy provider set; the old Cursor IDE bridge is deprecated compatibility * **Accounts** is the CCS auth-profile workspace * **Shared Data** is the asset browser for commands, skills, and agents That split matters: CCS auth profiles, API profiles, and CLIProxy provider routes are adjacent in the UI, but they are not the same persistence model. ### Compatible CLIs The compatible-CLI pages are dedicated control centers, not generic settings forms: * [Claude IDE Extension](/features/workflow/claude-extension) * [Codex Adapter](/features/workflow/codex-adapter) * [Droid Adapter](/features/workflow/droid-adapter) ### System The System group now behaves like an operations cluster: * **Health** mirrors `ccs doctor` status in a rich UI * **Logs** is the dedicated log operations workspace * **Settings** is the split-view configuration surface for global CCS config ## Where To Read Next | If you want to understand... | Read this | | -------------------------------------------- | ------------------------------------------------------------ | | account-profile workflows and continuity | [Accounts Workspace](/features/dashboard/accounts-workspace) | | the split-view config surface | [Settings Workspace](/features/dashboard/settings-workspace) | | OAuth providers, variants, and routing | [CLIProxy API](/features/proxy/cliproxy-api) | | API-key and connector routes inside CLIProxy | [AI Providers Workspace](/features/proxy/ai-providers) | | live auth-state behavior | [Live Auth Monitor](/features/dashboard/live-auth-monitor) | | log inspection and retention controls | [Dashboard Logs](/features/dashboard/logs) | # Settings Workspace Source: https://docs.ccs.kaitran.ca/features/dashboard/settings-workspace The split-view settings workspace for WebSearch, image analysis, channels, proxy, auth, and backups # Settings Workspace The Settings workspace at `/settings` is the dashboard's routed configuration surface. On desktop it uses a **split view**: form-based controls on the left, a live read-only snapshot of `~/.ccs/config.yaml` on the right. ## Access ```bash theme={null} ccs config # Sidebar -> System -> Settings # Direct route -> /settings ``` ## Current Layout ### Desktop * **Left panel**: tabbed configuration sections * **Right panel**: `config.yaml` viewer with copy and refresh actions * **Resize handle**: lets you rebalance forms vs raw config ### Mobile The page collapses into a stacked layout. The raw `config.yaml` viewer drops behind the active section so the forms stay usable on narrow screens. ## Current Tabs | Tab | What it manages | Related doc | | ----------- | ----------------------------------------------------------------------- | ----------------------------------------------------------- | | `WebSearch` | provider readiness, API keys, install hints, and CCS search routing | [WebSearch](/features/ai/websearch) | | `Image` | MCP-first image analysis state, repair actions, and profile coverage | [Image Analysis](/features/ai/image-analysis) | | `Channels` | official-channel selection, token status, and launch preview | [CLI Commands](/reference/cli-commands) | | `Env` | top-level global environment variables saved in CCS config | [Configuration](/getting-started/configuration) | | `Thinking` | thinking mode, overrides, tier defaults, and provider overrides | [Extended Thinking](/features/ai/extended-thinking) | | `Browser` | Claude Browser Attach and Codex Browser Tools setup, status, and policy | [Browser Automation](/features/workflow/browser-automation) | | `Proxy` | local vs remote CLIProxy server settings and connectivity | [Remote Proxy](/features/proxy/remote-proxy) | | `Auth` | dashboard authentication enablement, secret generation, and status | [Dashboard Authentication](/features/dashboard/auth) | | `Backups` | backup inventory, restore, and cleanup workflows | [File Locations](/reference/file-locations) | ## Raw Config Pane The right-hand pane is a **viewer**, not a second editor: * shows the current `~/.ccs/config.yaml` * supports copy and refresh actions * helps you verify what the forms actually persisted If the file does not exist yet, the workspace points you back to: ```bash theme={null} ccs migrate ``` ## Operational Notes * Section content is lazy-loaded, so the active tab can recover independently if one section fails * Structured settings stay in the form controls; raw YAML remains read-only in this workspace * The page is route-aware, so you can bookmark `/settings` directly inside the current dashboard session ## When To Use This Page Use the Settings workspace when the change belongs to **shared CCS behavior**: * search and image-analysis tooling * announcement and support channels * global env defaults * proxy topology * browser automation exposure policy * dashboard auth * backup hygiene Use the profile workspaces instead when the change is specific to **one provider or one compatible CLI**. ## Related * [Dashboard Overview](/features/dashboard/overview) * [WebSearch](/features/ai/websearch) * [Image Analysis](/features/ai/image-analysis) * [Remote Proxy](/features/proxy/remote-proxy) # Account Pools Source: https://docs.ccs.kaitran.ca/features/pool Run several Claude accounts as one pool and auto-continue when an account hits its limit # Account Pools An account pool lets you put several Claude accounts behind one provider profile so a session keeps going when one account hits its rate limit. Instead of seeing a limit error and switching accounts by hand, the pool moves the conversation to the next available account for you. A pool is three things working together: 1. **Several accounts** authenticated under the built-in `claude` CLIProxy provider. 2. **One provider profile** you launch with `ccs claude`. 3. **Auto-continue on limit**: when the active account is rate limited, CLIProxy hops to the next account in the pool so the turn completes. Account pools route through your local CLIProxy. They are separate from native account profiles (`ccs work`, `ccs personal`). The two systems do not share session history. See [When not to pool](#when-not-to-pool) and [Migrating from native profiles](#migrating-from-native-profiles). ## Terminology These words get mixed up. Here is what each one means in CCS. | Term | Meaning | | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Account profile** | A native Claude account lane created with `ccs auth create `, run with `ccs `. Has its own `CLAUDE_CONFIG_DIR` and its own session history. Does **not** pool. | | **OAuth account** | A single Claude login (one email, one set of tokens). The unit a pool is built from. | | **Variant** | A user-defined CLIProxy provider entry under `config.cliproxy.variants` (for example, a custom Codex model variant). | | **Provider** | A CLIProxy backend such as `claude`, `agy`, `gemini`, or `codex`. A pool lives under one provider. | | **Pool** | Two or more OAuth accounts under one CLIProxy provider with pool routing enabled. Auto-continues on limit. | ### Codex has two separate lanes Codex can confuse you the same way, because the word "pool" shows up in two different places: * **CLIProxy Codex pool**: OAuth accounts under the `codex` CLIProxy provider, reached with `ccs codex`. This is the pool world described on this page. * **Native Codex runtime lane**: the `ccsx`, `ccsxp`, and `ccsd` aliases route a profile to the native Codex CLI. That is a runtime target, not a CLIProxy account pool. See [Codex Adapter](/features/workflow/codex-adapter). Same two-worlds split as Claude (CLIProxy lane vs native lane), different provider. When you read "Codex pool" make sure you know which lane is meant. ## Set up a pool in three commands ```bash theme={null} ccs claude --auth ``` Opens your browser for Claude OAuth. The token is stored under the built-in `claude` CLIProxy provider. ```bash theme={null} ccs claude --auth --add ``` Run this once per extra account. Each `--add` opens a fresh OAuth flow and stores the new account alongside the first. For a three-account pool, run it twice. When you cross from one account to two, CCS offers to turn on pool routing for you (interactive terminals only). You can accept there, or enable it later with `ccs cliproxy pool --enable`. ```bash theme={null} ccs claude ``` `ccs claude` runs Claude Code through the local CLIProxy with all your authenticated accounts behind it. When one account is rate limited, the pool continues on the next one. To confirm pool routing is on: ```bash theme={null} ccs cliproxy pool ``` ## How failover behaves ### Fill-first plus session affinity Pool routing uses two settings together: * **fill-first**: drain one account fully before moving to the next, instead of spreading requests evenly. This keeps as much of your conversation as possible on a single account. * **session affinity**: pin one conversation to one account (TTL 1h) so a multi-turn session stays put until it has to move. The result: your conversation sticks to one account until that account hits its limit, then hops. ### A pre-stream limit hops transparently When the active account is rate limited **before** the response starts streaming, CLIProxy switches to the next account and the turn completes there. You do not see an error. The hop is transparent. ### The turn right after a hop is slower Here is the cost to know about. When the pool hops to a new account, the new account has none of your conversation cached. The next turn re-processes your **whole** conversation from the start on the new account. That means the turn right after a hop is noticeably slower, and the slowdown is proportional to how large your conversation is. A short conversation re-processes quickly. A long one (tens of thousands of tokens of context) takes longer, because the entire context has to be read again on the fresh account. CCS does not publish a fixed latency number here because it depends on context size, model load, and provider response time. Treat the first turn after a hop as a full-context turn, not a warm-cache turn. This happens once per hop. After the hop, the conversation is cached on the new account again and turns return to normal speed until the next hop. ## When not to pool A pool is the right tool when you want one continuous session that survives rate limits. It is the wrong tool when you want accounts kept apart. **If you want strict separation between accounts** (work vs personal, separate billing, separate history), use native account profiles instead: ```bash theme={null} ccs auth create work ccs auth create personal ccs work "review this PR" ccs personal "help with a side project" ``` Native profiles keep credentials, tokens, and session history isolated per account. They do not auto-continue across accounts. See [Claude Accounts](/providers/concepts/claude-accounts). **Bare `ccs` does not pool.** Running plain `ccs` launches your native default account lane, not the CLIProxy pool. Pooling only happens when you launch through `ccs claude` with pool routing enabled. If you want pooled failover, use `ccs claude`; if you want your single native account, use `ccs`. ## Leaving a pool To turn pool routing off, use the disable command. Do not hand-edit routing back to plain round-robin (see the warning below). ```bash theme={null} ccs cliproxy pool --disable ``` This regenerates the CLIProxy config with cooling disabled (stability mode) and restores your original routing settings. The exact output: ``` [OK] Pool routing disabled. CLIProxy config regenerated with cooling disabled (stability mode). Your original routing settings are restored. If you have multiple accounts and want fair distribution, round-robin is active. To avoid cache-burn with large multi-account fleets, consider reducing to 1 account or re-enabling pool routing: ccs cliproxy pool --enable ``` ### Why not just switch to round-robin It is tempting to "leave the pool" by setting routing to plain round-robin with no session affinity. Do not do this with a multi-account fleet. Round-robin with no affinity spreads each request across accounts. Without affinity, consecutive turns of the same conversation land on different accounts, and each landing re-processes your whole conversation on a cold account. That is the cache-burn footgun: you pay the full context-recompute cost on most turns, not just on a hop. `ccs cliproxy pool --disable` avoids this. It restores a safe non-pool config (cooling disabled, your original routing), instead of leaving you in the worst-case round-robin-no-affinity state. ## Migrating from native profiles If you already run native account profiles (`ccs work`, `ccs personal`) and want to pool those same accounts, read this first. The two lanes do not share credentials or history. ### You re-authenticate each account fresh You cannot import credentials from a native profile into the pool. A native profile's refresh token is bound to a different OAuth client, so the pool cannot reuse it. To pool an account you already use natively, authenticate it again under the `claude` CLIProxy provider: ```bash theme={null} ccs claude --auth # first account, fresh OAuth ccs claude --auth --add # each additional account, fresh OAuth ``` Same Claude login, new OAuth grant. This is required, not optional. ### Session history does not follow Pooled sessions live in the CLIProxy lane. Your native profile's session history and your `--continue` / resume inventory stay in the native lane. They do **not** move into the pool. After migrating, a pooled `ccs claude` session starts with a clean history; your old `ccs work` transcripts remain reachable only through `ccs work`. ### Pause the native profile for the same account Once an account is in the pool, do not keep launching the same account through its native profile at the same time. Running one Claude account in two lanes concurrently (native profile in one terminal, pool in another) is the one behavior that raises account risk. See [Safety notes](#safety-notes). To avoid it, pick one lane per account. If you migrate an account into the pool, stop using its native profile for live sessions, or remove the native profile so there is no second lane to launch by accident. ## Caveats Read these before you rely on a pool. ### Mid-stream errors do not re-route The transparent hop only applies when a limit is hit **before** the response starts streaming. If an account fails **after** the first chunks have already streamed, that turn is not re-routed: you see a visible error for that turn. The pool hops on the **next** turn, not retroactively. The exact visible error text can vary by Claude Code version and provider response, so the important rule is timing: after chunks start streaming, CCS cannot rewind and replay that same turn on a different account. ### All accounts cooling vs a paused account These are two different failure states with two different errors: * **All accounts cooling**: every account in the pool is rate limited at once. You get a 429 with a reset time telling you when the soonest account frees up. * **A paused account**: the only candidate is paused (for example, after a ban pattern auto-pause), which surfaces as a different error, not a 429-with-reset. Use `ccs cliproxy quota` to tell them apart. Cooling accounts show `cooling until