107 lines
4.5 KiB
Markdown
107 lines
4.5 KiB
Markdown
# Agency vs Claude Code — Differences
|
|
|
|
_Last updated: 2025-07-14_
|
|
|
|
---
|
|
|
|
## 1. API Backend — Fundamental Difference
|
|
|
|
| | Claude Code | The Agency |
|
|
|---|---|---|
|
|
| API | **Anthropic SDK** directly (claude-opus-4 etc.) | **OpenRouter** (OpenAI-compatible chat completions) |
|
|
| Auth | Anthropic API key / OAuth | OpenRouter API key |
|
|
| Message format | Anthropic's native format (content blocks array) | OpenAI chat completions format (`role`/`content` strings, `tool_calls`) |
|
|
| Streaming | SSE via Anthropic SDK | SSE via raw HTTP, `LineSplitter` |
|
|
|
|
---
|
|
|
|
## 2. UI — Completely Different Paradigm
|
|
|
|
| | Claude Code | The Agency |
|
|
|---|---|---|
|
|
| Interface | **Terminal TUI** (Ink/React in the terminal) | **Flutter desktop app** (macOS GUI) |
|
|
| Rendering | Custom terminal renderer, ANSI, Yoga layout | Flutter widgets, `shadcn_flutter` |
|
|
| Input | Keyboard-driven, vim mode, raw stdin | Mouse + keyboard, text fields, buttons |
|
|
|
|
---
|
|
|
|
## 3. Bash Permission System — Major Gap
|
|
|
|
This is the biggest functional divergence. Claude Code's `bashPermissions.ts` has ~2,600 lines of sophisticated security analysis:
|
|
|
|
- **Tree-sitter AST parsing** — parses the actual bash AST to detect injections, `too-complex` structure, etc.
|
|
- **20+ security validators** — backslash-escaped operators, brace expansion, unicode whitespace, mid-word `#`, quoted newlines, carriage return differentials, IFS injection, `zmodload`/zsh dangerous commands, ANSI-C quoting obfuscation, heredoc-in-substitution, process substitution, malformed tokens, etc.
|
|
- **Classifier** — a Haiku-based ML classifier for allow/deny/ask rules described in natural language (e.g. "don't run anything that deletes files")
|
|
- **Compound command splitting** — splits `cmd1 && cmd2` and checks each subcommand independently, with cd+git security checks
|
|
- **Safe wrapper stripping** — `timeout`, `nohup`, `nice`, `stdbuf` stripped before rule matching
|
|
- **Speculative classifier** — starts the AI classifier check in parallel while the permission dialog is shown
|
|
|
|
The Agency's `PermissionManager` is a stub by comparison — a simple string-matching check against allow/deny rules.
|
|
|
|
---
|
|
|
|
## 4. Missing Tools
|
|
|
|
Claude Code has many tools the Agency doesn't:
|
|
|
|
| Tool | Claude Code | Agency |
|
|
|---|---|---|
|
|
| `LSPTool` | ✅ (go-to-def, hover, diagnostics) | ❌ |
|
|
| `AskUserQuestionTool` | ✅ | ❌ |
|
|
| `NotebookEditTool` | ✅ (Jupyter) | ❌ |
|
|
| `PowerShellTool` | ✅ | ❌ |
|
|
| `TodoWriteTool` | ✅ | ❌ |
|
|
| `ConfigTool` | ✅ | ❌ |
|
|
| `EnterPlanModeTool` / `ExitPlanModeTool` | ✅ | ❌ |
|
|
| `EnterWorktreeTool` / `ExitWorktreeTool` | ✅ | ❌ |
|
|
| `BriefTool` | ✅ | ❌ |
|
|
| `ListMcpResourcesTool` / `ReadMcpResourceTool` | ✅ | ❌ |
|
|
| `ScheduleCronTool` | ✅ | ❌ |
|
|
| `TaskCreate/Get/List/Update/Stop/Output` | ✅ (separate tools) | Merged into `ExecuteTask` |
|
|
| `REPLTool` | ✅ | ❌ |
|
|
| `SendMessageTool` | ✅ | ❌ |
|
|
| `SleepTool` | ✅ | ❌ |
|
|
| `TeamCreateTool` / `TeamDeleteTool` | ✅ | ❌ |
|
|
| `ToolSearchTool` | ✅ | ❌ |
|
|
|
|
---
|
|
|
|
## 5. Plan Mode / Worktree Mode
|
|
|
|
Claude Code has distinct **plan mode** (read-only, no writes) and **worktree mode** (isolated git worktrees for parallel agents). The Agency has no equivalent.
|
|
|
|
---
|
|
|
|
## 6. Agent Architecture
|
|
|
|
Claude Code has a full multi-agent swarm system:
|
|
- Built-in agents: `exploreAgent`, `planAgent`, `verificationAgent`, `generalPurposeAgent`, `claudeCodeGuideAgent`
|
|
- `forkSubagent` — spawns sub-agents in parallel tmux panes or in-process
|
|
- Permission forwarding between leader/worker agents
|
|
- Agent memory snapshots
|
|
|
|
The Agency has a simpler single-level advisor pattern (one extra model call for a second opinion).
|
|
|
|
---
|
|
|
|
## 7. Analytics / Statsig / Feature Gates
|
|
|
|
Claude Code has Statsig feature gates, GrowthBook, analytics events (`logEvent`) throughout. The Agency has stub analytics.
|
|
|
|
---
|
|
|
|
## 8. Migrations, Slash Commands, Voice, Vim Mode
|
|
|
|
All present in Claude Code (`/commit`, `/review`, `/advisor`, `/brief`, vim insert/normal/visual modes, voice input) — none in the Agency.
|
|
|
|
---
|
|
|
|
## 9. Bridge / Remote Control
|
|
|
|
Claude Code has a full REPL bridge for remote control (VS Code extension, web UI, etc.) with JWT auth, polling, session runners, and flush gates. The Agency has a bridge stub but it's not the same system.
|
|
|
|
---
|
|
|
|
## Summary
|
|
|
|
The Agency has the **skeleton** of Claude Code (tool loop, session history, CLAUDE.md system prompt injection, hooks, MCP types), but is missing the **security depth**, **tool breadth**, **agentic infrastructure**, and **AI-native UI conventions** of the original.
|