mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 16:16:52 +00:00
Closes #1218. When the user invokes `ccs <profile> agents` (and other Claude subcommands like `mcp`, `doctor`, `plugin`, ...), CCS was unconditionally injecting session-only Claude flags (`--append-system-prompt`, `--disallowedTools`, `--settings`, official-channels plugin specs) and forwarding the `DISABLE_TELEMETRY=1` env var from profile settings. Each of those either errored out the subcommand (`error: unknown option '--append-system-prompt'`) or silently flipped Claude into non-interactive list mode, so the new `claude agents` agent view never opened under CCS. Add a small `claude-subcommand-detector` that recognizes the documented Claude subcommand set after skipping known value-taking flags, then have the three steering-prompt injectors (websearch, image-analysis, browser), the cliproxy and settings launchers, and the official-channels plan short-circuit when a subcommand invocation is detected. Also strip `DISABLE_TELEMETRY` from the spawned env only for subcommand invocations — upstream Claude Code uses that var as a kill switch for the subcommand TUIs, and the user's telemetry preference still applies to every normal interactive session. Verified end-to-end against `ccs glm agents` and `ccs ck agents`: the agent view opens correctly, no `unknown option` error, and all 1938 existing tests pass.