Skip to main content

Task Delegation

CCS includes intelligent task delegation via the /ccs meta-command, allowing you to route tasks to the most appropriate model.

Basic Delegation

# Delegate planning to GLM (saves Sonnet tokens)
/ccs glm /plan "add user authentication"

# Delegate coding to GLM
/ccs glm /code "implement auth endpoints"

# Quick questions with Haiku
/ccs haiku /ask "explain this error"

Continue Previous Session

Resume the last delegation session to continue a task:
# Continue last delegation with follow-up
/ccs:continue "add error handling to that feature"

# Works with any previous delegation context
/ccs:continue "also add unit tests"
This preserves the context from your previous delegation, enabling multi-step workflows without repeating information.

Benefits

  • Save tokens by delegating simple tasks to cheaper models
  • Use right model for each task automatically
  • Reusable commands across all projects (user-scope)
  • Seamless integration with existing workflows
  • Session continuity with /ccs:continue

Headless Delegation

Execute prompts without interactive session using -p or --prompt:
# Direct prompt execution
ccs -p "your prompt"
ccs --prompt "your prompt"

# With specific profile
ccs glm -p "implement feature"
ccs gemini --prompt "analyze this code"
Use cases:
  • CI/CD pipelines
  • Automated scripts
  • Batch processing
  • Remote/headless servers

Workflow Example

Scenario: Building a new payment integration feature
# Step 1: Architecture & Planning (needs Claude's intelligence)
ccs
/plan "Design payment integration with Stripe"
# → Claude Sonnet 4.5 thinks deeply about edge cases

# Step 2: Implementation (straightforward, use GLM)
ccs glm
/code "implement the payment webhook handler"
# → GLM 4.6 writes code efficiently, saves usage

# Step 3: Code Review (needs deep analysis)
ccs
/review "check payment handler for security"
# → Claude Sonnet catches subtle vulnerabilities

# Step 4: Bug Fixes (simple)
ccs glm
/fix "update error message formatting"
# → GLM handles routine fixes

# Step 5: Continue with follow-up
/ccs:continue "also add logging to the webhook"
# → Continues from previous context
Result: Best model for each task, lower costs, better quality.

Task-Model Mapping

Task TypeRecommended ModelWhy
ArchitectureClaude SonnetDeep reasoning, edge cases
PlanningClaude SonnetSystem design
Code ReviewClaude SonnetSecurity, subtle bugs
ImplementationGLM 4.6Efficient, cost-effective
Simple FixesGLM 4.6Routine changes
Long DocsKimi1M context window
Quick IterationsGeminiFast responses
Thinking TasksGLMT / AgyVisible reasoning steps

Rate Limit Management

# Working on complex refactoring with Claude
ccs
/plan "refactor authentication system"

# Claude hits rate limit mid-task
# → Error: Rate limit exceeded

# Switch to GLM instantly
ccs glm
# Continue working without interruption

# Rate limit resets? Switch back
ccs

Profile Selection

Force specific profiles for delegation:
# Force GLM for simple tasks
/ccs --glm "task description"

# Force Kimi for long context
/ccs --kimi "analyze this large codebase"

# Force Gemini for quick iterations
/ccs --gemini "quick prototype"