-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Problem
CCS delegation system (built Nov 2025) uses basic claude -p with stream-json output. Claude Code has evolved significantly with new CLI capabilities that ccs doesn't leverage, potentially missing cost controls, reliability features, and modern subagent integration.
Current Gap Analysis
Claude Code now supports these flags that CCS doesn't pass through:
| Flag | Purpose | Value for CCS |
|---|---|---|
--max-budget-usd |
Cost limit per session | Prevent runaway delegation costs |
--max-turns |
Limit agentic turns | Prevent infinite loops |
--fallback-model |
Auto-fallback on overload | Reliability when model unavailable |
--agents |
Dynamic subagent JSON | Inject ccs profiles as native subagents |
--json-schema |
Structured output validation | Parseable delegation results |
--tools |
Restrict available tools | Security/scope control |
Key Findings
-
CLI Reference (Dec 2025): Claude Code supports
--agentsflag for dynamic subagent injection at runtime - could bridge ccs profiles into native subagent system. -
Headless Mode: Full
--output-format stream-jsonworks well. Missing--max-budget-usdfor cost guardrails. -
Current Implementation:
HeadlessExecutoralready hasextraArgspassthrough mechanism, but no explicit support for new flags.
Proposed Solution
Add passthrough support for key Claude Code CLI flags to HeadlessExecutor and DelegationHandler:
# New supported flags
ccs glm -p "task" --max-budget-usd 1.00 # Cost limit
ccs glm -p "task" --max-turns 5 # Turn limit
ccs glm -p "task" --fallback-model sonnet # Overload fallbackFiles to Modify
src/delegation/headless-executor.ts- Add flag passthrough logicsrc/delegation/delegation-handler.ts- Expose options in CLI parsingsrc/commands/help-command.ts- Update --help output
Acceptance Criteria
-
--max-budget-usdflag passthrough works -
--max-turnsflag passthrough works -
--fallback-modelflag passthrough works - Flags appear in
ccs --helpoutput - TypeScript strict mode passes
- All existing tests continue to pass