Tailored news hub
home›AI Coding›

How to Delegate LLM Tasks with cc-fleet in Claude Code

Integrate DeepSeek, GLM, Qwen, and other vendor models as secure subagents or teammates

How to Delegate LLM Tasks with cc-fleet in Claude Code
#Agents#Dev Tools#Development#LLM#Open Source

Learn how to use cc-fleet to delegate tasks to various large language models (DeepSeek, GLM, Qwen, Kimi, MiniMax) within Claude Code. This guide covers installation, vendor registration, and leveraging cc-fleet as a secure Claude Code teammate or one-shot headless subagent, protecting your primary credentials and managing vendor API keys securely.

Delegate to Any LLM from Claude Code

cc-fleet turns any large language model (DeepSeek, GLM, Qwen, Kimi, MiniMax, and others) into a real Claude Code teammate or a one‑shot headless subagent. It replaces the default LLM backend with a vendor model that exposes an Anthropic‑compatible API, enabling cost‑effective llm delegation without sharing your primary credentials.

Vendor API keys are stored securely on disk (~/.config/cc-fleet/secrets/, mode 0600) and injected via an apiKeyHelper mechanism. They never appear in environment variables, command‑line arguments, or shell history. The tool consists of a Go CLI for vendor profile management and key dispatch, plus a Claude Code skill that decides when and how to hand off work.

Prerequisites and Quick Install

Requirements

  • Claude Code CLI on your PATH
  • tmux (teammate mode runs inside tmux panes)
  • macOS or Linux (amd64/arm64); Windows is untested
  • For teammate mode, enable the agent‑teams experimental flag: add { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } } to ~/.claude/settings.json and restart Claude Code

The recommended one‑line installer sets up the binary, a ccf alias, and the Claude Code skill in a single step. Customisation flags (e.g., --skill plugin, --version vX.Y.Z) can be passed after | sh -s --.

curl -fsSL https://raw.githubusercontent.com/ethanhq/cc-fleet/main/install.sh | sh

Adding the Skill After a Binary‑Only Install

When you install via npm (npm install -g @ethanhq/cc-fleet), go install, or build from source, only the binary is placed on your system. The Claude Code skill must be installed separately:

claude plugin marketplace add ethanhq/cc-fleet
claude plugin install cc-fleet@ethanhq

The one‑line installer and the prebuilt tarball already perform this step automatically. If you still need the skill after a binary‑only install, run the two commands above.

Registering Vendors in the TUI

Run cc-fleet with no arguments to open the interactive TUI. You provide a vendor’s name, Anthropic‑compatible base URL, models endpoint, default model, and API key. The key is saved immediately in ~/.config/cc-fleet/secrets/ with permissions 0600; the configuration directory is created on first save—no separate initialisation step is needed.

The TUI lists all registered vendors, supports editing, and handles multiple keys per vendor. Switch to the Agent status board (press tab) to see live teammates grouped by session and team, along with their vendor, model, tmux pane, PID, health, and hidden state. From this board you can hide or show panes (h/s) and refresh the view (r).

Teammate Mode – A Persistent Worker

Teammates are full‑fledged Claude Code agent‑team members driven by a vendor model. The skill calls the native TeamCreate mechanism; cc-fleet spawns a vendor‑specific claude process in a tmux pane and communicates via SendMessage. The teammate stays alive across turns and multiple teammates can run in parallel.

For full visibility, always start inside a tmux session (tmux new-session -s cc-fleet). If you are not inside tmux, the teammate runs in a detached server session named cc-fleet-swarm-<team>. You can attach with tmux -L cc-fleet-swarm-<team> attach. Only the teammate pane bills the vendor key; your main session’s authentication remains unchanged.

Subagent Mode – Headless and One‑Shot

Subagent mode runs synchronously, headless, and requires no pane or agent‑teams feature. It is ideal for one‑off analysis and for fanning out independent ai subagents over parallel tasks.

The underlying CLI command is cc-fleet subagent <vendor>. Claude invokes it for you, but you can also run it directly with any of these flags:

FlagUse
--backgroundRun detached; poll with cc-fleet subagent-status
--resume <id>Continue a previous subagent (multi‑turn)
--max-budget-usdBound monetary cost
--max-turnsBound the number of turns

Multi‑turn conversations are possible with --resume, though automatic context continuation is not described. The skill automatically chooses between teammate and subagent mode based on the task.

Best Practices and Constraints

  • Always start a tmux session before launching teammates.
  • Let the skill decide the execution mode; it picks teammate or subagent depending on the work.
  • Prefer subagent mode for quick, one‑off analysis (diff reviews, log summaries).
  • For parallel independent tasks, fan out subagents rather than creating many teammates.
  • Outside tmux, teammates run in detached sessions; attach with tmux -L cc-fleet-swarm-<team> attach.

Known limitations: tested only on macOS and Linux; teammate mode requires tmux and the agent‑teams flag; vendor APIs must be Anthropic‑compatible; no automatic key refresh; multi‑turn subagents need manual resumption; no scaling or resource limits are described for concurrent workers.

Related Articles