CCG v1 is a Tauri/Svelte desktop app for running Claude Code, Gemini CLI, and Codex CLI as managed native CLI agents, with a strong bias toward headless / programmatic turns rather than ordinary interactive CLI use.
It was built as a local orchestration workbench: spawn agents, inject mission context, monitor status, coordinate reviews/workflows, and keep long-running CLI sessions grounded through working docs and anchors. The bundled desktop UI is the main operator surface, but the engine also exposes a localhost HTTP + SSE API so separate local frontends can drive the same managed-agent, Task, and Workflow primitives.
Maintenance status: CCG v1 is published as-is for reference and reuse. It is not expected to receive active maintenance from PendingReality because development effort has moved to a v2 direction.
- Runs agents you don't have to babysit. Spawn Claude/Gemini/Codex as managed native CLI sessions, primarily through headless/programmatic turns; monitor their state, claim/release them, and assign work.
- Keeps agents on-mission. Each agent has an anchor — an externalized mission statement in a working doc — re-injected every turn so long-running agents don't drift.
- Composes per-turn context. Anchors, memory, inbox messages, skills, and protocol are merged into each turn's prompt, with a cacheable/dynamic split.
- Lets agents coordinate. An inbox delivers agent-to-agent messages; workflows orchestrate multi-step, multi-agent runs (e.g. council planning, spawn chains); a commit lock serializes git across parallel agents.
- Supports separate local frontends. The localhost
/api/v1/*HTTP API plus named SSE events can drive external browser pages or other local UI shells; this repo includes plain HTML reference clients inexamples/custom-frontend/andexamples/frontends/. - Is scriptable over MCP. CCG exposes an MCP server so external agents (or Claude Desktop) can drive it.
- Claude Code — session discovery, resume, fork, hooks
- Gemini CLI — sandbox / YOLO modes
- Codex CLI — session discovery, resume,
--full-auto
- Spawn (interactive or headless), claim/release, assign tasks, track state (idle → working → complete)
- Per-agent working docs and mission anchors
- Anchor system — mission/intent persisted in a working doc, re-injected each turn
- Prompt composition — layered context injection (anchor, memory, inbox, skills, protocol) with a system/message caching split
- Memory — Hindsight integration (pack/hook based)
- Inbox — agent-to-agent notifications with auto-wake
- Workflows — multi-step orchestration with a visual editor (council planning, spawn chains)
- Service registry — register/start/stop background processes (dev servers, watchers)
- Templates — role-based agent configuration (orchestrator, worker, reviewer, …)
- Hooks — react to CLI lifecycle events (session start/end, stop, tool use)
- MCP server — run
ccg --mcpfor external orchestration (stdio transport) - MCP registry — per-project MCP servers with per-CLI enablement
- CLI config sync — sync MCP configs to Claude (
settings.json), Gemini (settings.json), Codex (config.toml)
- Tier 1 local API —
/api/v1/*routes expose projects, agents, Tasks, Workflows, history, anchors, and stop/send controls - Live updates —
/api/v1/eventsstreams named SSE events such asagent.output,agent.completion,task.*, andworkflow.* - Reference clients —
examples/custom-frontend/andexamples/frontends/contain single-file HTML/JS clients that run outside the Tauri app
CCG spawns native CLI agents as managed sessions, primarily for headless/programmatic operation, injects mission context into each turn, and monitors them via hooks and output snapshots:
┌──────────────────────────────────────────────────────────────┐
│ CCG Application │
│ │
│ Tauri + Svelte UI MCP Server (ccg --mcp) │
│ - Agent dashboard - spawn / claim / inject │
│ - Workflow editor - anchor / inbox / workflow │
│ - Graph & composition - service / council tools │
│ │
│ Local HTTP + SSE API │
│ - /api/v1 agents/tasks/workflows/events │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Agent Lifecycle + Registry (agent_lifecycle.rs) │ │
│ └───────────────┬──────────────────────────────────────┘ │
│ │ spawn (headless / interactive) │
│ Prompt Composition ──┐ ┌── Hooks + snapshots │
│ (anchor, memory, │ │ (lifecycle events, │
│ inbox, skills) ▼ │ output capture) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Claude │ │ Gemini │ │ Codex │ │
│ │ CLI │ │ CLI │ │ CLI │ │
│ └──────────┘ └──────────┘ └──────────┘ │
└──────────────────────────────────────────────────────────────┘
- Spawn — managed agents launched per CLI
- Ground — prompt composition injects context each turn (system-prompt files +
-p) - Monitor — hooks report lifecycle events; snapshots capture output
- Coordinate — MCP tools + inbox + workflows
- Expose — local HTTP + SSE routes let separate local frontends drive the same engine
CCG runs an MCP server for external orchestration. Example Claude Desktop config:
{
"mcpServers": {
"ccg": {
"command": "C:\\path\\to\\ccg.exe",
"args": ["--mcp"]
}
}
}Representative tools (the orchestrator set is larger):
| Tool | Description |
|---|---|
ccg_spawn_terminal |
Spawn an agent (claude/gemini/codex) |
ccg_list_terminals |
List active agents and their state |
ccg_inject_command |
Send input/prompt to an agent |
ccg_get_snapshot |
Capture an agent's output |
ccg_claim_terminal / ccg_release_terminal |
Take / release exclusive control |
ccg_propose_anchor |
Set/update an agent's mission anchor |
ccg_send_inbox |
Deliver an agent-to-agent message |
ccg_invoke_workflow |
Run a multi-step workflow |
ccg_register_service / ccg_start_service |
Manage background services |
- Frontend: Svelte 5 + SvelteKit + TailwindCSS
- Backend: Rust (Tauri v2)
- MCP: stdio transport (
ccg --mcp)
- Node.js 18+
- Rust (latest stable)
- Windows: Visual Studio Build Tools
npm install
npm run tauri dev # run the desktop app
npm run check # type-checknpm run tauri buildsrc/ # Svelte frontend
lib/
components/
AgentDashboard.svelte # agent cards, anchors, service status
WorkflowEditor.svelte # visual workflow editor
GraphBoard.svelte # architecture / graph board
PromptCompositionPanel.svelte
McpPanel.svelte # MCP registry
SettingsPanel.svelte
... # session/project/template cards & panels
stores/ # state management
types/ # shared TS types
routes/
+page.svelte # main project / agent view
dashboard/ graph/ graphboard/
src-tauri/ # Rust backend
src/
lib.rs # core Tauri commands, HTTP / MCP routes
agent_lifecycle.rs # spawn / claim / assign / state
headless_commands.rs # CLI agent spawning, workflow steps
prompt_composition.rs # per-turn context injection
working_doc.rs # anchors & working docs
inbox.rs # agent-to-agent messages
workflows.rs # workflow engine
workflow_primitive.rs # workflow step primitives
tasks.rs # task primitive
services.rs # service registry
templates.rs # role templates
hooks.rs # CLI lifecycle hooks
cli_integration.rs # CLI config sync (Claude/Gemini/Codex)
mcp_stdio.rs # MCP server (stdio)
interactive_*.rs # interactive session management
Docs/ # internal, agent-facing docs
00_START_HERE.md # routing layer
reference/ # code-grounded subsystem handrails
guide/ # user-facing quickstart / concepts / config
examples/ # workflow JSON + frontend examples
CCG v1 can be driven by plain local frontends without using the in-app Svelte components. The practical contract is the localhost HTTP API plus named SSE stream:
GET /api/v1/projects,GET /api/v1/agents,POST /api/v1/agents/:id/send,POST /api/v1/agents/:id/stopGET /api/v1/tasks,POST /api/v1/tasks,GET /api/v1/workflows,POST /api/v1/workflows/:id/invokeGET /api/v1/eventsfor liveagent.*,task.*, andworkflow.*updates
See guide/CUSTOM-FRONTENDS.md, examples/custom-frontend/, and examples/frontends/ for the reference clients and the browser/SSE gotchas.
| CLI | Config | Sessions | Resume | YOLO / Auto |
|---|---|---|---|---|
| Claude | ~/.claude/settings.json |
~/.claude/projects/<hash>/sessions/*.jsonl |
claude --resume <id> |
--dangerously-skip-permissions |
| Gemini | ~/.gemini/settings.json |
~/.gemini/tmp/<hash>/chats/*.json |
gemini --resume <id> |
-y |
| Codex | ~/.codex/config.toml |
~/.codex/sessions/YYYY/MM/DD/*.jsonl |
codex resume <id> |
--full-auto |
- Hindsight — long-term episodic memory for agents (pack / MCP integration)
MIT. See LICENSE.