kthulu/docs/feature-comparison.md
2026-06-10 04:55:57 -07:00

131 KiB

Kthulu Feature Comparison

Comprehensive comparison of Kthulu against Claude Code, Cursor, Aider, Cline, Continue, Windsurf, GitHub Copilot, and Amazon Q Developer.

Last updated: 2026-03-13


Quick Reference

Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Open Source Yes No No Yes Yes Yes No No No
Self-Hostable Yes No No Yes Yes Yes Enterprise No No
Local Models Yes (GPU) No No Yes Yes Yes No No No
Primary Interface Terminal Terminal IDE Terminal VS Code VS Code VS Code VS Code VS Code
Cost Free (own GPU) $20-200/mo $20/mo Free (API costs) Free (API costs) Free (local) $20/mo $19/mo $19/mo
License Private Proprietary Proprietary Open Apache 2.0 Apache 2.0 Proprietary Proprietary Proprietary

1. Model & Inference

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Cloud API inference - Yes (Anthropic) Yes (OpenAI, Anthropic) Yes (multi) Yes (multi) Yes (multi) Yes Yes (OpenAI, Google) Yes (AWS)
Local GPU inference Yes (model-boss) - - Via Ollama Via Ollama Via Ollama - - -
GPU lease management Yes - - - - - - - -
VRAM allocation control Yes (49GB default) - - - - - - - -
Lease priority levels Yes (Low/Normal/High) - - - - - - - -
Model switching Yes Yes (sonnet/opus/haiku) Yes Yes Yes Yes Yes Yes Limited
Per-agent model selection - Yes (agent frontmatter) - - - - - - -
Auto model routing - Yes (opusplan alias) - - - - - - -
Streaming SSE output Yes Yes Yes Yes Yes Yes Yes Yes Yes
Custom fine-tuned models Yes (QLoRA pipeline) - Yes (Composer, Tab, Apply) - - - Yes (Cascade, SWE-1.5) - Yes (SageMaker)
Retry with backoff Yes (@lilith/retry) Implicit Implicit - - - Implicit Implicit Implicit
JSON repair (model output) Yes - - - - - - - -
Prompt caching - Yes (auto) Yes - - - - - -
Per-model cache controls - Yes (cache breakpoints) - - - - - - -
Extended thinking - Yes (configurable) - - - - - - -
Ultrathink keyword trigger - Yes ("ultrathink" in prompt) - - - - - - -
Effort levels - Yes (low/medium/high) - - - - - - -
Fast mode - Yes (2.5x speed, /fast) - - - - - - -
1M token context window - Yes (with Opus/Sonnet) Yes (long context) - - - - - Yes (100k chars)
Model fallback - Yes (--fallback-model) - - - - - - -
Per-session budget control - Yes (--max-budget-usd) - - - - - - -
Model pinning (3rd party) - Yes (provider-specific) Yes Yes Yes Yes - - -
Bedrock/Vertex support - Yes - - Yes (Bedrock) - - - Yes

Kthulu advantage: Only tool with integrated GPU lease management for local inference. No cloud dependency — all LLM calls stay on local hardware.

Claude Code advantage: Model routing (Opus for planning, Sonnet for implementation), extended thinking with ultrathink trigger, fast mode (2.5x throughput), per-agent model selection, prompt caching with per-model controls, 1M token context window, and per-session budget caps. Supports Bedrock/Vertex for enterprise.


2. Code Editing & File Operations

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Read files Yes Yes Yes Yes Yes Yes Yes Yes Yes
Write/create files Yes Yes Yes Yes Yes Yes Yes Yes Yes
Edit (line-level diff) Yes Yes Yes Yes Yes Yes Yes Yes Yes
Glob pattern search Yes Yes Yes - - - - - -
Grep (regex search) Yes Yes Yes - - - - - -
Multi-file coordinated edits Via agent Yes Yes (Composer) Yes Yes Yes Yes (Cascade) Yes Yes
Inline IDE suggestions - Yes (VS Code) Yes (Tab) - Yes Yes Yes Yes Yes
Visual UI editor - - Yes - - - - - -
Auto-commit changes - On request - Yes (default) - - - - -
Checkpoint / undo system Yes (per-turn checkpoints, /resume, Esc Esc picker) Yes (/rewind, fork) - Git-based - - - - -
Diff viewer (IDE-native) - Yes (VS Code, JetBrains) Yes - Yes Yes Yes Yes Yes
File @-mention with lines - Yes (@file#5-10) Yes - - - - - -
@url fetching - Yes (@url in prompt) - Yes (web pages) - - - - -
@git context inclusion - Yes (@git for diff/log) - Yes (auto repo context) - - - - -
Image paste input - Yes (Ctrl+V paste) Yes Yes (images) - - - - -
Image/PDF file reading - Yes (multimodal) - Yes - - - - -
Notebook editing - Yes (NotebookEdit) - - - - - - -
Bash mode prefix - Yes (! prefix) - Yes (/run command) - - - - -

3. Tool System

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Bash/shell execution Yes Yes Yes - Yes - Yes Yes -
Git operations Yes (5 tools) Yes Yes Yes (auto-commit) - - Yes Yes -
Tree-sitter code search Yes Via plugins - Yes - - - - -
LSP integration Yes (go-to-def, refs, hover) Yes Implicit (IDE) - - - - - -
MCP bridge Yes Yes (hundreds of servers) - - Yes Yes - Yes Yes (CLI)
Browser automation - Yes (Chrome DevTools Protocol) Yes (built-in browser) - Yes (Computer Use) - - - -
Tool protocol Yes (MCP-compatible) MCP native Proprietary - MCP MCP Proprietary MCP MCP
Custom tool registration Yes (ToolRegistry) Yes (MCP + SDK + plugins) Limited - Via MCP Via MCP Via Skills Via .agent.md Via MCP
Tool permission system Yes (PermissionResolver) Yes (Allow/Ask/Deny rules) Yes (sandbox) - Yes - - Implicit -
Mode-based tool filtering Yes (plan/act) Yes (plan mode) - Yes (/architect) Yes - - - -
Tool search / deferred loading - Yes (auto when >10% context) - - - - - - -
Programmatic tool calling - Yes (sandboxed code execution) - - - - - - -

Claude Code advantage: Programmatic tool calling allows Claude to write code that invokes tools without model round-trips (37% token reduction). Tool search defers loading to save context. MCP ecosystem has hundreds of pre-built servers. Browser automation uses Chrome DevTools Protocol for web app verification.


4. Skills, Commands & Extensibility

4a. Skills System

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Custom slash commands Yes (REPL + SkillLoader) Yes (skills + commands) - Yes - - - - -
Skill definitions (YAML+MD) Yes (SkillLoader, .kthulu/skills/) Yes (SKILL.md frontmatter) - - - - - - -
Auto-invocation by context - Yes (description matching) - - - - - - -
Skill-scoped tool restrictions Yes (allowed-tools) Yes (allowed-tools field) - - - - - - -
Skill-scoped model selection - Yes (model field) - - - - - - -
Forked context execution - Yes (context: fork) - - - - - - -
Built-in skills - Yes (/simplify, /batch, /debug, /loop, /claude-api) - - - - - - -
String substitutions - Yes ($ARGUMENTS, $N, env vars) - - - - - - -
Supporting file bundles - Yes (templates, scripts, examples) - - - - - - -
Enterprise-managed skills - Yes (cannot be overridden) - - - - - - -

4b. Custom Commands (distinct from skills)

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Command definitions (MD) - Yes (.claude/commands/*.md) - - - - - - -
Global commands - Yes (~/.claude/commands/*.md) - - - - - - -
Project commands - Yes (.claude/commands/*.md) - - - - - - -
Command = lightweight skill - Yes (MD body becomes prompt) - - - - - - -
Argument passing ($ARGUMENTS) - Yes - - - - - - -

Claude Code commands (verified from ~/.claude/commands/): commit.md, experts.md, specialist.md, parallel.md, team.md, imports.md, c.md, experts-team.md, experts-thinking.md. Commands are simpler than skills — a markdown file whose body becomes the prompt when invoked as /command-name. No YAML frontmatter, no tool restrictions, no model selection. They're the lightweight extensibility layer; skills are the heavy one.

4c. Hooks & Lifecycle

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Hook system Yes (HookRegistry, 6 events) Yes (24 event types) - - - - - - -
Hook scripts directory Yes (.kthulu/hooks/) Yes (.claude/hooks/.sh, ~/.claude/hooks/.sh) - - - - - - -
Hook handler types - Yes (command, HTTP, prompt, agent) - - - - - - -
Pre-action blocking Yes (PreToolUse via HookExecutor) Yes (PreToolUse: approve/deny/modify) - - - - - - -
Hook-based security enforcement - Yes (block-*.sh scripts) - - - - - - -

Claude Code hook scripts (verified from ~/.claude/hooks/): 20+ block-*.sh scripts including block-backup-files.sh, block-bypass-patterns.sh, block-esm-antipatterns.sh, block-git-commits.sh, block-incomplete-implementations.sh, block-js-in-ts-imports.sh, block-mocks-outside-tests.sh, block-node-modules-bash.sh, etc. Plus project-context.sh, verify-task-completion.sh, check-teammate-idle.sh. This is a transparent security and quality enforcement layer — hooks block dangerous patterns before they execute.

4d. Plugins & Marketplace

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Plugin system Via tools Yes (plugins directory) Via extensions - Via MCP Via config Via Skills Via agents -
Plugin installation tracking - Yes (installed_plugins.json) IDE-managed - - - - - -
Plugin marketplace discovery - Yes (known_marketplaces.json) Cursor marketplace - - - - Copilot Extensions -
Plugin blocklist - Yes (blocklist.json) - - - - - - -
Plugin caching - Yes (cache directory) IDE-managed - - - - - -

4e. Instruction File Modules

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Instruction modules directory - Yes (.claude/instructions/*.md) - - - - - - -
Global instruction modules - Yes (~/.claude/instructions/*.md) - - - - - - -
Instruction router protocol - Yes (load specific module by trigger pattern) - - - - - - -
Topic-specific instruction loading - Yes (safety-rules.md, code-standards.md, etc.) - - - - - - -

Claude Code instructions (verified from ~/.claude/instructions/): 16+ topic modules — safety-rules.md, code-standards.md, testing-standards.md, agent-usage.md, agent-cleanup.md, context-initialization.md, command-efficiency.md, mcp-usage.md, pnpm-vite-resolution.md, workspace-architecture.md, project-paths.md, etc. These are loaded on-demand when the agent recognizes trigger patterns (e.g., git operations → load safety-rules.md). Project-level instructions at tooling/claude/dot-claude/instructions/ add 23+ more modules.

4f. Agent SDK & Programmatic Access

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Agent SDK - Yes (Python + TypeScript) - - - - - - -
Programmatic agent creation - Yes (SDK: Agent class) - - - - - - -
Tool definition in code Yes (ToolRegistry) Yes (SDK tool decorators) - - - - - - -
Custom client integration Via model-boss API Yes (Anthropic API + SDK) Via API Via litellm Via API Via API - Via API Via API
Headless programmatic use - Yes (-p flag + JSON output) - - - - - - -
Streaming API Yes (AsyncGenerator events) Yes (SDK streaming) - - - - - - -

Extensibility Summary

Claude Code's 7 extensibility layers (all verified):

  1. Skills — YAML+MD definitions with model/tools/context/auto-invocation (SKILL.md)
  2. Commands — lightweight MD-body-as-prompt slash commands (.claude/commands/)
  3. Hooks — 24 lifecycle events with shell/HTTP/prompt/agent handlers (.claude/hooks/)
  4. Agents — custom agent definitions with full frontmatter spec (.claude/agents/)
  5. Instructions — topic-specific instruction modules loaded by trigger pattern (.claude/instructions/)
  6. Plugins — installable extensions with marketplace discovery (~/.claude/plugins/)
  7. Agent SDK — programmatic agent building in Python and TypeScript

Each layer has global (~/.claude/), project (.claude/), and enterprise (/etc/claude-code/) scopes. All layers compose — a skill can invoke an agent that uses specific hooks and loads relevant instructions.

Kthulu has 2 extensibility layers:

  1. ToolRegistry — register MCP-compatible tools at the code level
  2. SkillLoader — load skill definitions from .kthulu/skills/ (via @lilith/ml-agent-loop)

The @lilith/ml-agent-loop shared library provides the infrastructure for hooks (HookRegistry, HookExecutor), agent definitions (AgentDefinitionLoader), instructions (InstructionLoader), memory (MemoryManager), skills (SkillLoader, SkillExecutor), worktrees (WorktreeManager), background agents (BackgroundAgentTracker), and checkpoints (CheckpointManager). These are compiled to dist/ but the Kthulu CLI does not wire all of them into the REPL — only skills and hooks are partially integrated.


5. Memory & Project Context

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Project instructions file Yes (InstructionLoader, INSTRUCTIONS.md) Yes (CLAUDE.md, checked into git) Yes (.cursorrules) - - - Yes (Memories) Yes (copilot-instructions.md) -
Local instructions (gitignored) Yes (INSTRUCTIONS.local.md via InstructionLoader) Yes (CLAUDE.local.md) - - - - - - -
User-global instructions Yes (~/.agent/INSTRUCTIONS.md via InstructionLoader) Yes (~/.claude/CLAUDE.md) - - - - - - -
Managed/enterprise instructions - Yes (/etc/claude-code/CLAUDE.md) - - - - - - -
Path-specific rules - Yes (.claude/rules/*.md with glob) - - - - - - -
Nested/subdirectory CLAUDE.md - Yes (loads on file access) - - - - - - -
Auto-memory (cross-session) - Yes (per git repo) - - - - Yes (Memories) - -
Memory topic files - Yes (debugging.md, patterns.md) - - - - - - -
@-import in instructions Yes (InstructionLoader.resolveImports, @path/to/file.md) Yes (@path/to/file, 5-hop max) - - - - - - -
Ancestor directory walking - Yes (loads CLAUDE.md up tree) - - - - - - -
Lazy subdirectory loading - Yes (loads when accessing files) - - - - - - -
Survives compaction - Yes (re-injected fresh) - - - - - - -
Project context assembly Yes (ContextBuilder) Via CLAUDE.md + Explore Yes Yes - - Yes - -
Repo map / symbol index Yes (RepoMapBuilder) Via Explore agent Yes (semantic) Yes (tree-sitter) - Yes Yes Yes (instant) Yes

Claude Code advantage: The four-tier CLAUDE.md hierarchy (managed > user > project > local) with path-specific rules, @-imports, lazy loading, and auto-memory creates a persistent knowledge system that no competitor matches. Instructions survive compaction. Auto-memory learns across sessions without user intervention.

Windsurf note: Windsurf's "Memories" system provides persistent cross-session learning and project context, making it the closest competitor to Claude Code's memory system.

Kthulu has: InstructionLoader with 4-tier hierarchy (managed > user > project > local), @-import syntax, YAML frontmatter rules, and priority-based merging. Instructions survive compaction via re-injection in system prompt. Remaining gap: Uses generic naming (INSTRUCTIONS.md, .agent/) instead of branded (KTHULU.md, .kthulu/). Path-specific rules (loadRules) exist but are not called. No auto-memory writes at session end. No ancestor directory walking. No lazy subdirectory loading.


6. Context Management

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Token budget management Yes (ContextManager) Yes (200k window) Implicit Yes Implicit Implicit Implicit Implicit Yes (100k chars)
Context eviction strategy Yes (tool_result>assistant>user) Yes (auto-compaction) - - - - - - -
Rolling summarization Yes (ContextSummarizer) Yes (auto-compaction ~95%) - - - - - - -
Context cache with TTL Yes (5min, 100 entries) - - - - - - - -
Manual compaction - Yes (/compact) - - - - - - -
Configurable compaction threshold - Yes (CLAUDE_AUTOCOMPACT_PCT_OVERRIDE) - - - - - - -
PreCompact hook - Yes (inject context before summary) - - - - - - -
Context usage display - Yes (/context command) - - - - - - -
Semantic embedding search - Yes Yes - - Yes Yes Yes Yes
Cross-session context Via sessions Yes (auto memory + CLAUDE.md) - - - - Yes (Memories) - Yes

Kthulu advantage: Explicit typed ContextManager with configurable budgets and eviction ordering — context management is a first-class API concern.

Claude Code advantage: 200k context window (vs Kthulu's 32k default), configurable auto-compaction with hooks, and instructions that survive compaction. The PreCompact hook allows injecting context before summarization.


7. Planning & Reasoning

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Plan mode (read-only) Yes (READ_ONLY_TOOLS filter) Yes (Shift+Tab) Yes Yes (/architect) Yes Yes - Yes (Plan agent) -
Plan file editing - Yes (Ctrl+G opens in editor) Yes (Markdown) - - - - - -
Plan approval workflow - Yes (team plan approval) - - - - - - -
Step-based plans Yes (PlanStep with status) - Yes (Markdown) - - - - - -
Plan refinement Yes (multi-round) - - - - - - - -
Plan verification Yes (post-execution check) - - - - - - - -
Complexity analysis Yes (0.0-1.0 scoring) - - - - - - - -
Self-reflection Yes (Reflector with critique) - - - - - - - -
Self-verification Yes (typecheck + tests) - - - Yes (auto-fix) - - Yes (self-healing) -
Error recovery strategies Yes (path mutation, mkdir) - - - - - - Yes -
Rollback manager Yes (git stash savepoints) Yes (/rewind + checkpoints) - Git-based - - - - -

Kthulu advantage: The planning pipeline is more structured — typed PlanStep with status tracking, multi-round refinement, post-execution verification, complexity analysis, and self-reflection. Plans are data structures, not markdown.

Claude Code advantage: Interactive plan editing (Ctrl+G opens in system editor), team-based plan approval workflows, and the /rewind checkpoint system for conversation forking.


8. Multi-Agent & Teams

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Sub-agent spawning Yes (SubAgentSpawner) Yes (built-in types) - - - - - Yes -
Parallel sub-agents Yes (spawnParallel) Yes (up to 7) Yes (8 max) - - - Yes (5 max) Yes -
Background agents Yes (BackgroundAgentTracker) Yes (async, notification) Yes (cloud Background Agent) - - - - Yes (Coding Agent, cloud) -
Specialized agent types - Yes (Explore, Plan, code-reviewer, etc.) - - - - - Yes (Explore, Task, Plan, Review) -
Custom agent definitions Yes (AgentDefinitionLoader, .kthulu/agents/*.md) Yes (.claude/agents/*.md) - - - - - Yes (.agent.md, tools field) -
Agent persona/role system Via TeamRole Yes (frontmatter: model, tools, permissions, hooks, memory) - - - - - - -
Full agent frontmatter spec - Yes (model, tools, allowedTools, disallowedTools, permissions, hooks, memory, mcpServers) - - - - - Yes (tools field) -
Agent-specific memory - Yes (user/project/local scope) - - - - - - -
Agent-specific hooks - Yes (per-agent lifecycle) - - - - - - -
Agent-specific MCP servers - Yes (per-agent config) - - - - - - -
Agent worktree isolation Yes (WorktreeManager) Yes (isolation: worktree) - - - - Yes - -
Agent resume - Yes (resume with full context) - - - - - - -
Agent teams (coordinated) Yes (AgentTeam class) Yes (experimental) - - - - - - -
Team lead coordination - Yes (lead assigns tasks) - - - - - - -
Shared task list (DAG) - Yes (dependencies, blockers) - - - - - - -
Inter-agent messaging - Yes (broadcast + direct) - - - - - - -
Team display modes - Yes (in-process, split panes) - - - - Yes (side-by-side) - -
--teammate-mode display - Yes (compact/verbose/quiet) - - - - - - -
Sequential workflow Yes (chained output) Yes (via task ordering) - - - - - - -
Parallel workflow Yes (simultaneous) Yes Yes - - - Yes Yes -
Debate workflow Yes (N-round critique) - - - - - - - -
Predefined team templates Yes (PLAN_REVIEW, IMPLEMENT_VERIFY) - - - - - - - -
Permission isolation Yes (factory pattern) Yes (per-agent permissions) Yes (sandbox) - - - Yes (worktree) - -
Agent max turns Yes (maxTurns per agent, default 8) Yes (--max-turns, agent frontmatter) - - - - - - -
Agent max time / timeout - Yes (per-agent timeout) Yes (Background Agent timeout) - - - - Yes (Coding Agent timeout) -
Batch processing - Yes (/batch: 5-30 worktree agents) - - - - - - -

Claude Code advantage: The agent system is significantly deeper than Kthulu's. Custom agents are defined via markdown with per-agent model selection, tool allowlists/denylists, permission modes, hooks, memory scopes, and MCP server configs. Agent teams (experimental) add a lead-teammate model with DAG-based task lists, inter-agent messaging, and plan approval workflows. The /batch command orchestrates 5-30 parallel agents in isolated git worktrees. Cursor's Background Agent runs in the cloud for async tasks. GitHub Copilot's Coding Agent runs as a cloud-hosted background agent triggered from issues.

Kthulu advantage: Formal AgentTeam class with three distinct typed workflow patterns (sequential, parallel, debate). The debate workflow — where agents critique each other across multiple rounds — is unique. Predefined templates (PLAN_REVIEW, IMPLEMENT_VERIFY) offer ready-to-use coordination patterns.


9. Session Management

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Session persistence Yes (JSON files) Yes (JSONL per project) IDE-resident - IDE-resident - IDE-resident IDE-resident Yes
Session list/browse Yes (CLI + API + Web) Yes (picker with search) - - - - - - -
Session resume Yes Yes (--continue, --resume) - - - - - - -
Session naming Yes (/rename) Yes (/rename) - - - - - - -
Session resume (interrupted) Yes (/resume, Esc Esc picker) Yes (--continue, --resume) - - - - - - -
Session forking - Yes (/rewind fork) - - - - - - -
/fork command - Yes (fork current conversation) - - - - - - -
/export conversation Yes (/export) Yes (export session to file) - - - - - - -
/insights analysis - Yes (session analysis) - - - - - - -
Session archiving - Yes (archive old sessions) - - - - - - -
Session picker keyboard - Yes (arrow keys, search, delete) - - - - - - -
Filter by git branch - Yes - - - - - - -
Session status tracking Yes (Active/Completed/Paused/Errored) - - - - - - - -
Max concurrent sessions Yes (configurable limit) - - - - - - - -
Session events Yes (event emission) - - - - - - - -
Cross-device sessions Via API Yes (teleport, remote control) - - - - - - -
--remote cloud sessions - Yes (cloud execution) - - - - - - -
--teleport web-to-CLI - Yes (transfer session to terminal) - - - - - - -
Mobile session access - Yes (iOS, Remote Control) - - - - - - -
Session from PR - Yes (--from-pr) - - - - - - -
Headless mode Yes (HeadlessRunner, text/json/stream-json) Yes (-p flag, JSON/stream output) - - - - - - -
Session max turns - Yes (--max-turns N) - - - - - - -
Session max time - - - - - - - - -
Session analytics Yes (token/tool/model stats) - - - - - - - -

Claude Code advantage: Session teleportation (move sessions between terminal, web, desktop, mobile), session forking via /rewind and /fork, branch-based filtering, --from-pr linking, --remote cloud execution, --teleport web-to-CLI transfer, /export for conversation export, /insights for session analysis, and headless mode for CI/CD.

Kthulu advantage: Typed session status tracking, concurrent session limits, event emission, and analytics dashboard with charts.


10. Hooks & Automation

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Pre-action hooks - Yes (PreToolUse: block/modify) - - - - - - -
Post-action hooks - Yes (PostToolUse: format/lint) - - - - - - -
Session lifecycle hooks - Yes (SessionStart, Stop, SessionEnd) - - - - - - -
User prompt hooks - Yes (UserPromptSubmit) - - - - - - -
Agent hooks - Yes (SubagentStart/Stop) - - - - - - -
Notification hooks - Yes (permission, idle, auth) - - - - - - -
Config change hooks - Yes (ConfigChange) - - - - - - -
Compaction hooks - Yes (PreCompact) - - - - - - -
Worktree hooks - Yes (WorktreeCreate/Remove) - - - - - - -
Hook handler types - Yes (command, HTTP, prompt, agent) - - - - - - -
Input modification - Yes (PreToolUse can modify params) - - - - - - -
Matcher patterns - Yes (regex, wildcards) - - - - - - -
Hook-based security - Yes (block dangerous commands) - - - - - - -
Recurring tasks - Yes (/loop interval) - - - - - - -

Claude Code advantage: The hook system is entirely unique — 24 event types with 4 handler types (shell, HTTP, LLM prompt, agent). No other tool offers lifecycle automation at this level. PreToolUse can modify tool inputs before execution, enabling transparent security enforcement.

Kthulu has: HookRegistry (6 events) + HookExecutor with PreToolUse/PostToolUse firing in ToolExecutor. SpellFixHandler built-in. Loads hooks from project settings. Remaining gap: Fewer event types (6 vs Claude Code's 24), no hook scripts directory pattern, no HTTP/prompt/agent handler types.


11. Training & Self-Improvement

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Training data collection Yes (SessionTrainingCollector) - Internal - - - Internal - -
SFT data export Yes (JSONL format) - - - - - - - -
Quality feedback scoring Yes (4 dimensions, 0-1 scale) - - - - - - - -
Quality-filtered export Yes (threshold-based) - - - - - - - -
Model evaluation suite Yes (TrainingEvaluator) - Internal - - - Internal - -
Fine-tuning integration Yes (QLoRA via train-language-model) - Internal (RL) - - - Internal - Via SageMaker
Session annotation Yes (tool efficiency, code correctness, reasoning, completion) - - - - - - - -
Auto-memory / learning - Yes (persistent across sessions) - - - - Yes (Memories) - -

Kthulu advantage: The only tool with a user-controlled training feedback loop. Sessions are converted to SFT examples, scored across 4 quality dimensions, filtered by threshold, and exported for QLoRA fine-tuning. The model evaluator benchmarks checkpoints against the base model. Every session makes the next one better.


12. UI & Interface

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Terminal CLI Yes (primary) Yes (primary) - Yes (primary) - - - Yes (GA 2026) Yes
VS Code extension - Yes (graphical panel) Yes (primary) - Yes (primary) Yes (primary) - Yes (primary) Yes
JetBrains plugin - Yes (beta) - - - - - Yes Yes
Custom IDE - - Yes (fork) - - - Yes (primary) - -
Desktop app - Yes (macOS/Windows) - - - - - - -
Web interface - Yes (claude.ai/code) - - - - - Yes (github.com) Yes (Console)
Mobile app - Yes (iOS + Remote Control) - - - - - - -
Web dashboard Yes (React analytics) - - - - - - - -
Session analytics UI Yes (charts, tables) - - - - - - - -
Feedback UI Yes (quality scoring) - - - - - - - -
Streaming markdown render Yes Yes Yes - Yes Yes Yes Yes Yes
Plan visualization Yes (step status icons) Yes (plan files) Yes - - - - - -
Voice input - Yes (/voice, push-to-talk) - Yes - - - - -
Vim mode - Yes (vim keybindings) Yes (vim extension) - - - - - -
Color themes - Yes (light/dark/colorblind/ANSI) Yes - - - - - -
Output styles - Yes (default/explanatory/learning) - - - - - - -
Prompt suggestions - Yes (contextual suggestions) - - - - - - -
Status line Yes (persistent bar: model, mode, permissions, tokens) Yes (custom via hooks) - - - - - - -
Custom keybindings - Yes (keybindings.json) Yes - - - - - -
Slack integration - Yes (@Claude in threads) Yes (BugBot) - - - - - -

Claude Code advantage: Available on 6+ surfaces (terminal, VS Code, JetBrains, desktop, web, iOS) with session teleportation between them. Voice mode, vim keybindings, color themes (including colorblind mode), output styles (explanatory/learning modes), contextual prompt suggestions, custom keybindings, Slack integration.

Kthulu advantage: Dedicated analytics dashboard with session metrics, tool usage charts, and quality feedback UI. No other tool has a monitoring dashboard.


13. Security & Permissions

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Per-tool permission checks Yes (PermissionResolver) Yes (Allow/Ask/Deny rules) Yes - Yes - - Implicit -
Permission modes Yes (5 modes: default, bypass, acceptEdits, dontAsk, auto) Yes (5 modes: default, acceptEdits, plan, dontAsk, bypass) - - - - - - -
Fine-grained permission rules - Yes (Tool(pattern) syntax) - - - - - - -
OS-level sandbox - Yes (bubblewrap/seatbelt) Yes (Seatbelt/Landlock/seccomp-bpf) - - - - - -
Filesystem isolation - Yes (allowWrite, denyRead) Yes - - - - - -
Network isolation - Yes (allowedDomains) - - - - - - -
Hook-based security - Yes (PreToolUse blocks) - - - - - - -
Git-based rollback Yes (RollbackManager) Yes (/rewind) - Yes - - - - -
Plan mode (read-only) Yes Yes Yes Yes Yes Yes - Yes -
Sub-agent permission isolation Yes (factory pattern) Yes (per-agent permissions) Yes (sandbox) - - - Yes (worktree) - -
Managed/enterprise settings - Yes (cannot be overridden) - - - - Yes (FedRAMP IL5, HIPAA) - Yes (AWS certs)
Prompt injection protection - Yes (var randomization, hierarchy) - - - - - - -
Zero Data Retention (ZDR) - Yes (enterprise option) - - - - - - -
IP allowlisting - Yes (enterprise) - - - - - - Yes
mTLS authentication - Yes (enterprise) - - - - - - -
Custom CA certificates - Yes (NODE_EXTRA_CA_CERTS) - - - - - - -
/security-review command - Yes (pre-commit analysis) - - - - - - -
Managed MCP allowlist/denylist - Yes (enterprise MCP controls) - - - - - - -

Claude Code advantage: Defense-in-depth with OS-level sandboxing (bubblewrap on Linux, seatbelt on macOS) + permission rules + hooks. Three independent layers. Managed settings for enterprise control that users cannot override. Enterprise features include ZDR, IP allowlisting, mTLS, custom CA certificates, managed MCP allowlists, and a /security-review command for pre-commit vulnerability analysis.

Cursor note: Cursor's kernel-level sandboxing uses seccomp-bpf on Linux, making it one of the strongest sandbox implementations alongside Claude Code's bubblewrap.

Windsurf note: FedRAMP IL5 and HIPAA compliance certifications position Windsurf for government and healthcare use cases that other tools cannot serve.

Kthulu gap: No OS-level sandboxing, no network isolation, no managed enterprise settings, no security review tooling. Permission system now has 5 modes (default, bypass, acceptEdits, dontAsk, auto) with mid-session switching via DelegatingPermissionResolver and slash commands (/bypass, /auto, /accept-edits, /dont-ask, /default, /permissions).


14. CI/CD & GitHub Integration

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
GitHub Actions integration - Yes (claude-code-action) - - - - - Yes (native) -
GitLab CI/CD - Yes - - - - - - -
@mention in PR/issues - Yes (@claude) - - - - - Yes (@copilot) -
Automated PR creation - Yes Yes (BugBot) - - - - Yes (Coding Agent) -
Automated code review - Yes Yes - - Yes - Yes -
Headless mode (scriptable) Yes (HeadlessRunner -p flag) Yes (-p flag) - - - - - - -
--max-turns CI limiting - Yes (limit agentic loops) - - - - - - -
PR monitoring + auto-fix - Yes (Desktop) - - - - - Yes (Coding Agent) -
Slack → PR workflow - Yes - - - - - - -
/install-github-app setup - Yes (guided setup) - - - - - - -
/install-slack-app setup - Yes (guided setup) - - - - - - -
/security-review pre-commit - Yes (vulnerability scan) - - - - - - -

Claude Code advantage: Full CI/CD integration via headless mode (-p), GitHub Actions, GitLab CI/CD, Slack-to-PR workflows, --max-turns for CI loop limits, guided setup commands (/install-github-app, /install-slack-app), and /security-review for pre-commit vulnerability analysis. Can be embedded in any pipeline.

Copilot note: GitHub Copilot's Coding Agent runs as a cloud-hosted agent triggered from GitHub issues, creating PRs automatically with CI verification.

Kthulu has: HeadlessRunner with text/json/stream-json output, --allowedTools/--disallowedTools for CI security, --dangerouslyAllowAll for full automation, --max-turns for CI loop limits, pipe support (stdin). Remaining gap: No GitHub Actions integration, no @mention in PRs, no automated PR creation.


15. Architecture & Code Quality

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Modular package architecture Yes (16 packages) Monolith Monolith Single package Single extension Multi-package Monolith Multiple Monolith
TypeScript/ESM Yes Yes Yes Python TypeScript TypeScript Unknown TypeScript Unknown
Shared type contracts Yes (@kthulu/shared) Internal Internal - Internal - Internal Internal Internal
Event-driven streaming Yes (AsyncGenerator) Yes Yes - Yes - Yes Yes Yes
Source files 125 .ts files ~1000+ (estimated) Unknown ~100 .py files ~50 .ts files ~200 .ts files Unknown Unknown Unknown

Kthulu Infrastructure Diagram

┌─────────────────────────────────────────────────────────────────────┐
│                        USER INTERFACES                               │
│                                                                      │
│  ┌──────────────┐   ┌──────────────┐   ┌──────────────────────┐     │
│  │   CLI (REPL)  │   │  API (NestJS) │   │  Web Dashboard       │     │
│  │   :terminal   │   │   :3780       │   │  (React) :3781       │     │
│  │               │   │               │   │                      │     │
│  │ • StreamRender│   │ • Sessions    │   │ • Session analytics  │     │
│  │ • ReplSession │   │ • Analytics   │   │ • Tool usage charts  │     │
│  │ • HeadlessRun │   │ • Health      │   │ • Quality feedback   │     │
│  │ • MarkdownRend│   │ • Model proxy │   │ • Training metrics   │     │
│  │ • PlanRenderer│   │               │   │                      │     │
│  └──────┬───────┘   └──────┬───────┘   └──────────┬───────────┘     │
│         │                   │                       │                │
└─────────┼───────────────────┼───────────────────────┼────────────────┘
          │                   │                       │
          ▼                   ▼                       ▼
┌─────────────────────────────────────────────────────────────────────┐
│                    @kthulu/agent-core                                │
│                (re-exports @lilith/ml-agent-loop)                    │
│                                                                      │
│  ┌─────────────────────────────────────────────────────────────┐    │
│  │                  ConversationLoop                            │    │
│  │  • Message handling   • Tool dispatch   • Mode switching     │    │
│  │  • Turn management    • Error recovery  • Budget enforcement │    │
│  └────────────────────────────┬────────────────────────────────┘    │
│                               │                                     │
│  ┌────────────┐ ┌────────────┼────────────┐ ┌─────────────────┐    │
│  │ Planning    │ │ Context    │ Management │ │ Agent System    │    │
│  │             │ │            │            │ │                 │    │
│  │ • Planner   │ │ • ContextManager       │ │ • SubAgentSpawn │    │
│  │ • PlanStep  │ │ • ContextSummarizer    │ │ • AgentTeam     │    │
│  │ • Reflector │ │ • ContextCache (TTL)   │ │ • TeamConfig    │    │
│  │ • Complexity│ │ • ContextBuilder       │ │ • BackgroundTrk │    │
│  │   Analyzer  │ │ • InstructionLoader*   │ │ • WorktreeMgr*  │    │
│  │ • SelfVerify│ │ • MemoryManager*       │ │ • AgentDefLoad* │    │
│  └────────────┘ └─────────────────────────┘ └─────────────────┘    │
│                                                                      │
│  ┌────────────┐ ┌────────────────┐ ┌──────────────────────────┐    │
│  │ Skills*     │ │ Hooks*          │ │ Persistence              │    │
│  │             │ │                 │ │                          │    │
│  │ • SkillLoad │ │ • HookRegistry  │ │ • FlightRecorder         │    │
│  │ • SkillExec │ │ • HookExecutor  │ │ • JsonlFlightStore       │    │
│  │ • SkillDef  │ │ • BuiltinHandle │ │ • PostgresFlightStore    │    │
│  └────────────┘ └────────────────┘ │ • CheckpointManager*     │    │
│                                     └──────────────────────────┘    │
│  * = from @lilith/ml-agent-loop (shared infrastructure)             │
└─────────────────────────────────────────────────────────────────────┘
          │
          ▼
┌─────────────────────────────────────────────────────────────────────┐
│                        TOOL SYSTEM                                   │
│              @kthulu/tool-protocol (MCP-compatible)                  │
│                                                                      │
│  ┌──────────┐ ┌──────────┐ ┌───────────┐ ┌──────────┐             │
│  │ file-ops  │ │   bash    │ │code-search│ │   git    │             │
│  │           │ │           │ │           │ │          │             │
│  │ • Read    │ │ • Execute │ │ • TreeSit │ │ • Status │             │
│  │ • Write   │ │ • Sandbox │ │ • Symbol  │ │ • Diff   │             │
│  │ • Edit    │ │ • PathGrd │ │ • FileWalk│ │ • Commit │             │
│  │ • Glob    │ │           │ │ • Embeddin│ │ • Log    │             │
│  │ • Grep    │ │           │ │   Indexer │ │ • Branch │             │
│  └──────────┘ └──────────┘ └───────────┘ └──────────┘             │
│                                                                      │
│  ┌──────────┐ ┌──────────┐ ┌───────────┐ ┌──────────┐             │
│  │   lsp     │ │ browser   │ │ mcp-bridge│ │sub-agent │             │
│  │           │ │           │ │           │ │          │             │
│  │ • GoDef   │ │ • Navigate│ │ • MCP Cl  │ │ • Spawn  │             │
│  │ • Refs    │ │ • Click   │ │ • Tool    │ │ • Params │             │
│  │ • Hover   │ │ • Type    │ │   Proxy   │ │ • maxTrn │             │
│  │ • LSPBrdg │ │ • Screensht││           │ │          │             │
│  └──────────┘ └──────────┘ └───────────┘ └──────────┘             │
└─────────────────────────────────────────────────────────────────────┘
          │
          ▼
┌─────────────────────────────────────────────────────────────────────┐
│                    TRAINING PIPELINE                                 │
│                                                                      │
│  ┌──────────────────┐ ┌──────────────┐ ┌─────────────────────┐     │
│  │  data-collector   │ │  evaluator    │ │  feedback            │     │
│  │                   │ │               │ │                     │     │
│  │ • SessionTraining │ │ • Training    │ │ • QualityScoring    │     │
│  │   Collector       │ │   Evaluator   │ │ • 4-dimension       │     │
│  │ • SFT Formatter   │ │ • Benchmark   │ │   ratings           │     │
│  │ • Quality Filter  │ │   Runner      │ │ • Threshold filter  │     │
│  │ • JSONL Export    │ │               │ │                     │     │
│  └──────────────────┘ └──────────────┘ └─────────────────────┘     │
└─────────────────────────────────────────────────────────────────────┘
          │
          ▼
┌─────────────────────────────────────────────────────────────────────┐
│                   EXTERNAL INFRASTRUCTURE                            │
│                                                                      │
│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐               │
│  │  model-boss   │ │  PostgreSQL   │ │    Redis      │               │
│  │  (GPU server) │ │  :25462       │ │   :26390      │               │
│  │               │ │               │ │               │               │
│  │ • GPU leases  │ │ • Sessions    │ │ • Pub/sub     │               │
│  │ • VRAM alloc  │ │ • Analytics   │ │ • Caching     │               │
│  │ • Priority    │ │ • Flight logs │ │ • Events      │               │
│  │ • SSE stream  │ │ • Feedback    │ │               │               │
│  │ • Qwen3-Coder │ │               │ │               │               │
│  └──────────────┘ └──────────────┘ └──────────────┘               │
│                                                                      │
│  ┌──────────────────────────────┐ ┌──────────────────────────┐     │
│  │  train-language-model         │ │  @lilith/ml-agent-loop   │     │
│  │  (QLoRA fine-tuning)          │ │  (shared agent infra)    │     │
│  │                               │ │                          │     │
│  │ • QLoRA training              │ │ • ConversationLoop       │     │
│  │ • Checkpoint management       │ │ • Planner, Reflector     │     │
│  │ • Model evaluation            │ │ • SkillLoader/Executor   │     │
│  └──────────────────────────────┘ │ • HookRegistry/Executor  │     │
│                                    │ • InstructionLoader      │     │
│  ┌──────────────────────────────┐ │ • MemoryManager          │     │
│  │  @kthulu/shared               │ │ • WorktreeManager       │     │
│  │  (type contracts)             │ │ • AgentDefinitionLoader  │     │
│  │                               │ │ • BackgroundAgentTracker │     │
│  │ • KthuluSession, ToolDef     │ │ • CheckpointManager     │     │
│  │ • AgentDefinition, SkillDef  │ │ • ContextManager/Summ   │     │
│  │ • HookDefinition, HookEvent  │ │ • ComplexityAnalyzer    │     │
│  │ • ConversationEvent types    │ │ • ErrorRecovery         │     │
│  │ • ModelConfig, LeaseConfig   │ │ • ModelInference        │     │
│  └──────────────────────────────┘ └──────────────────────────┘     │
└─────────────────────────────────────────────────────────────────────┘

Package inventory (16 packages, 125 source files):

Layer Package Purpose
Apps apps/cli Terminal REPL, headless runner, stream/markdown/plan renderers
apps/api NestJS backend — sessions, analytics, health, model proxy
apps/web React dashboard — session analytics, feedback, training metrics
Tools features/tools/file-ops Read, Write, Edit, Glob, Grep
features/tools/bash Shell execution with sandboxing + path guard
features/tools/code-search Tree-sitter parsing, symbol extraction, embedding indexer
features/tools/git Status, diff, commit, log, branch
features/tools/lsp Go-to-definition, references, hover via LSP bridge
features/tools/browser Navigate, click, type, screenshot (Playwright)
features/tools/mcp-bridge External MCP server connector + tool proxy
features/tools/sub-agent Sub-agent spawning with maxTurns
Training features/training/data-collector Session→SFT conversion, quality filtering, JSONL export
features/training/evaluator Model benchmarking, checkpoint comparison
features/training/feedback 4-dimension quality scoring
Core @packages/agent-core Re-exports @lilith/ml-agent-loop + Kthulu-specific modules
@packages/shared Types, interfaces, constants — the contract

Key dependency: @kthulu/agent-core@lilith/ml-agent-loop — the generic agent loop infrastructure (conversation loop, planning, reflection, skills, hooks, instructions, memory, worktrees, background agents, checkpoints, context management) lives in the shared @lilith package ecosystem, not in the Kthulu codebase itself. Kthulu adds project-specific modules: ContextBuilder, RepoMapBuilder, RollbackManager, SessionTrainingCollector, FlightRecorder, and multimodal support.


16. Commands & CLI Interface

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Slash commands ~30 (/plan, /act, /team, /clear, /compact, /status, /diff, /copy, /export, /context, /resume, /permissions, /bypass, /auto, etc.) 60+ (/compact, /rewind, /batch, /voice, /export, /fork, etc.) Command palette ~15 (/run, /architect, /voice, /map, etc.) - - - - /dev, /transform
CLI flags - 40+ (--model, -p, --continue, --remote, --teleport, etc.) - Yes (--model, --edit-format, etc.) - - - - Limited
Interactive REPL Yes Yes - Yes - - - - Yes
Vim mode (input) - Yes (vim keybindings in input) - - - - - - -
Bash mode prefix - Yes (! runs shell commands) - Yes (/run) - - - - -
@-mention system - Yes (@file, @url, @git) Yes (@file) - @file - - - @workspace
Watch mode - - - Yes (auto-respond to file changes) - - - - -
Autocomplete (inline) - Yes (VS Code) Yes (Tab) - Yes Yes Yes Yes Yes
Command palette - - Yes (Cmd+K, Ctrl+K) - - - - - -
Map tokens (repo overview) - Via Explore agent - Yes (--map-tokens) - - - - -

Claude Code advantage: The richest CLI with 60+ slash commands, 40+ flags, @-mention system (files, URLs, git context), vim keybindings, and bash mode prefix. The breadth of CLI interaction patterns is unmatched.

Aider advantage: Watch mode automatically detects file changes and responds, creating a continuous feedback loop. Map tokens provide configurable repo overview context.

Kthulu gap: No CLI flags, no @-mention system, no vim mode, no bash shorthand. Has ~30 slash commands including 5 permission mode commands, /resume with checkpoint picker, /status, /diff, /copy, /export, /context, /compact.

16a. Slash Command Comparison

Per-command mapping between Claude Code's slash commands and Kthulu equivalents.

Claude Code Command Description Kthulu Equivalent Status
/help Show help /help Has
/exit, /quit Exit CLI /exit, /quit Has
/clear, /reset, /new Clear conversation /clear, /reset, /new Has
/compact [instructions] Compact context with optional focus /compact Has
/cost Token/cost stats /tokens Has (partial — no cost $)
/model [model] Switch model - Need (GPU lease model swap)
/plan Enter plan mode /plan Has
/mode Show current mode /mode Has
/rename [name] Rename session /rename Has
/rewind, /checkpoint Rewind to checkpoint /rewind Has (stub — needs impl)
/fork [name] Fork conversation - Defer
/resume, /continue Resume prior session /resume Has (resume interrupted + checkpoint rewind)
/export [filename] Export conversation /export Has
/diff Show uncommitted changes /diff Has
/vim Toggle vim keybindings - Defer
/fast [on|off] Toggle fast mode - N/A (local inference)
/config, /settings Open settings - Need
/permissions, /allowed-tools Tool permissions /permissions, /bypass, /auto, /accept-edits, /dont-ask, /default Has
/init Create CLAUDE.md equivalent - Need (KTHULU.md)
/memory Edit memory files - Defer
/mcp Manage MCP servers - Defer
/doctor Diagnose installation - Need
/login, /logout Auth management - N/A (local-only)
/status Show version/model/account /status Has
/context Context usage visualization /context Has
/color [color] Set prompt color - Defer
/theme Change color theme - Defer
/hooks Manage hooks - Defer
/tasks List background tasks /agents Has (equivalent)
/agents Manage agents /agents, /agent, /agent-result Has
/team Team workflows /team Has
/reflect Self-reflection /reflect Has
/generate-plan Generate task plan /generate-plan Has
/add-dir <path> Add working directory - Defer
/copy Copy last response /copy Has
/pr-comments [PR] Fetch PR comments - Defer
/security-review Security analysis - Defer
/sandbox Toggle sandbox - Defer
/terminal-setup Configure terminal - Defer
/keybindings Configure keys - Defer
/skills List skills - Defer
/ide IDE integrations - N/A
/desktop, /app Open desktop app - N/A
/upgrade Upgrade plan - N/A
/usage Plan usage/limits - N/A
/stickers Order stickers - N/A
/passes Share free week - N/A
/mobile, /ios, /android Mobile app QR - N/A
/feedback, /bug Submit feedback - N/A
/install-github-app GitHub app setup - N/A
/install-slack-app Slack app setup - N/A
/extra-usage Extra usage config - N/A
/insights Session analytics - Defer
/stats Usage visualization - Defer
/remote-control, /rc Remote control - N/A
/remote-env Remote environment - N/A
/plugin Manage plugins - Defer
/reload-plugins Reload plugins - Defer
/release-notes View changelog - Defer
/btw <question> Side question - Defer
/privacy-settings Privacy settings - N/A
/statusline Configure status line Built-in (always visible) Has (non-configurable)

Coverage summary: 30 of ~60 Claude Code commands have kthulu equivalents (Has). 4 are needed (Tier 2). ~17 are deferred. ~12 are N/A (commercial/platform-specific).


17. Terminal Rendering & TUI Components

17a. Content Rendering

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Markdown rendering Yes (headings, bold, italic, lists, HR) Yes (full CommonMark) IDE-native - IDE-native IDE-native IDE-native IDE-native IDE-native
Code block rendering Yes (gray/white, no highlighting) Yes (syntax highlighted via TextMate) IDE-native Yes (pygments) IDE-native IDE-native IDE-native IDE-native IDE-native
Syntax highlighting (terminal) - Yes (language-aware, 150+ grammars) N/A (IDE) Yes (pygments) N/A (IDE) N/A (IDE) N/A (IDE) N/A (IDE) N/A (IDE)
Table rendering - Yes (aligned columns) IDE-native - IDE-native IDE-native IDE-native IDE-native IDE-native
Link rendering (clickable) - Yes (OSC 8 terminal links) IDE-native - IDE-native IDE-native IDE-native IDE-native IDE-native
Image rendering - Yes (Sixel/Kitty protocol in supported terminals) IDE-native - IDE-native IDE-native IDE-native IDE-native IDE-native
Inline code formatting Yes (cyan highlight) Yes (distinct background) IDE-native - IDE-native IDE-native IDE-native IDE-native IDE-native

17b. Diff & Edit Display

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Streaming diff display Yes (basic) Yes (rich) Yes Yes (unified diff) Yes Yes Yes Yes Yes
Relative diff (old→new) - Yes (red/green highlighted, context lines) IDE diff view Yes (unified/diff format) IDE diff view IDE diff view IDE diff view IDE diff view -
File path with line numbers - Yes (file:line clickable links) IDE-native - IDE-native IDE-native IDE-native IDE-native -
Diff context lines - Yes (surrounding lines for edit context) IDE-native Yes (configurable) IDE-native IDE-native IDE-native IDE-native -
Syntax-highlighted diffs - Yes (language-aware diff coloring) IDE-native Yes (via pygments) IDE-native IDE-native IDE-native IDE-native -
Side-by-side diff - Yes (VS Code/JetBrains) IDE-native - IDE-native IDE-native IDE-native IDE-native -
Inline edit approval - Yes (y/n/always per edit) Yes - Yes - - Implicit -

17c. Loading & Processing States

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Spinner during model inference - Yes (animated, tool-name aware) IDE spinner - IDE spinner IDE spinner IDE spinner IDE spinner IDE spinner
Spinner during tool execution - Yes (shows tool name + params) IDE spinner - IDE spinner IDE spinner IDE spinner IDE spinner IDE spinner
Progress indicator for long ops - Yes (file count, search progress) IDE progress bar - IDE progress IDE progress IDE progress IDE progress -
Thinking token display Yes (dim text, streaming) Yes (collapsible, token count, budget %) - - - - - - -
Thinking budget indicator - Yes (tokens used / budget remaining) - - - - - - -
Context usage indicator - Yes (% of context window used) - - - - - - -
Cost-per-turn display - Yes ($ amount per response) - - Yes (per-turn) - - - -
Session cost total - Yes (running total in USD) - - - - - - -
Tool result preview (truncated) Yes (5 lines, --verbose for all) Yes (collapsible, searchable) IDE panel - IDE panel IDE panel IDE panel IDE panel -
Budget warning state Yes (percentage warning) Yes (approaching limit) - - - - - - -
Budget exceeded state Yes (hard stop) Yes (hard stop) - - - - - - -

17d. Interactive TUI Elements

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Permission approval prompt - Yes (approve/deny/always-allow per tool) Yes (sandbox) - Yes (approve/deny) - - Implicit -
Multi-line input Yes (bracketed paste detection) Yes (Shift+Enter, paste detection) IDE-native Yes IDE-native IDE-native IDE-native IDE-native IDE-native
Paste detection (DECSET 2004) Yes (semantic XML tags for pasted content) Yes (paste-aware input) IDE-native - IDE-native IDE-native IDE-native IDE-native -
Input history (up/down arrow) Yes (ring buffer, preserves current input) Yes (arrow key navigation) IDE-native Yes IDE-native IDE-native IDE-native IDE-native -
Message queuing (type-ahead) Yes (FIFO queue during agent runs) Yes (type while agent runs) - - - - - - -
Input mode indicator Yes (plan>/act> prompt prefix) Yes (mode badge, status line) IDE status bar - IDE status bar IDE status bar IDE status bar IDE status bar -
Turn separator Yes (─ line + token count) Yes (styled separator) IDE panel Yes (separator) IDE panel IDE panel IDE panel IDE panel -
Mode change announcement Yes (colored [PLAN]/[ACT]) Yes (with description) - - - - - - -
Checkpoint notification Yes (dim [checkpoint id]) Yes (with description) - - - - - - -
Context compression notice Yes (dim notice) Yes (with summary option) - - - - - - -
Status line (persistent) Yes (model, mode, permissions, tokens, budget, session) Yes (customizable bottom bar) IDE status bar - IDE status bar IDE status bar IDE status bar IDE status bar -
Escape interrupt Yes (Esc or Ctrl+C cancels running agent) Yes (Escape cancels) IDE-native - IDE-native IDE-native IDE-native IDE-native -
Checkpoint picker (Esc Esc) Yes (interactive scrollable list, resume/restore) - - - - - - - -
Resume interrupted work Yes (/resume re-sends with continuation hint) - - - - - - - -
Agent status panel - Yes (sub-agent progress, split panes) - - - - Yes (side-by-side) - -

17e. Output & Export

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Output styles - Yes (default/explanatory/learning) - - - - - - -
Color themes - Yes (light/dark/colorblind/ANSI) Yes (IDE themes) Yes (dark) Yes (IDE) Yes (IDE) Yes (IDE) Yes (IDE) Yes
Prompt suggestions - Yes (contextual next-step hints) - - - - - - -
PR status indicators - Yes (Desktop: CI status, review state) - - - - - Yes (github.com) -
Verbose/debug mode Yes (--verbose on tool results) Yes (--verbose flag) - Yes (--verbose) - - - - -
Export formats - Yes (/export: markdown, JSON) - - - - - - -
Token usage display Yes (/tokens command + analytics) Yes (per-turn inline + session total) - Yes (per-turn) - - - - -

Claude Code advantage: The TUI is significantly more polished — syntax-highlighted code blocks and diffs (150+ grammars), relative diff display showing old→new with context and color coding, animated spinners during both inference and tool execution, thinking budget indicators, context usage percentages, cost tracking per-turn and per-session, collapsible tool results, permission approval prompts with always-allow memory, multi-line input, clickable file links (OSC 8), and a persistent customizable status line. The diff rendering alone is a major UX differentiator — edits are shown as code-review-style changes rather than raw tool output.

Kthulu has (verified from codebase): StreamRenderer handles 14 event types with colored output. Markdown rendering covers headings, bold, italic, inline code, code blocks (unstyled), lists, and horizontal rules. Plan steps render with status icons (○/◉/●/✗). Tool results show 5-line previews with --verbose expansion. Budget warnings/exceeded states, mode change indicators, checkpoint notifications, and context compression notices are all rendered. Token count display via /tokens command.

Kthulu's TUI strengths: Persistent status line showing model, mode, permissions, tokens, budget, and session name. Input history with up/down navigation and current-input preservation. Bracketed paste detection with semantic XML tags. Message queuing (type-ahead during agent runs). Escape interrupt (Esc or Ctrl+C). Esc Esc checkpoint picker with scrollable history, resume, and code restore. /resume command for interrupted work continuation. 5 permission modes switchable mid-session.

Kthulu's remaining TUI gaps: No spinners (tool execution appears to hang silently), no syntax highlighting in code blocks, no diff rendering (edits shown as raw tool output), no permission approval prompts (binary allow/deny without interactive UI), no thinking budget display, no context % indicator, no cost tracking, no agent status panel. The rendering is functional but minimal — users see colored text output without the rich interactive feedback that Claude Code provides.

Kthulu unique TUI features: Checkpoint picker (Esc Esc) with resume/restore is a novel feature not found in Claude Code or any competitor. Resume interrupted work (/resume) with automatic continuation hints is also unique.


18. Desktop & Platform-Specific Features

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Scheduled tasks - Yes (frequency, catch-up on miss) - - - - - - -
Launch.json dev server config - Yes (desktop) - - - - - - -
Visual diff review - Yes (inline comments) Yes - Yes Yes Yes Yes -
PR monitoring + auto-fix - Yes (Desktop) - - - - - Yes (Coding Agent) -
PR monitoring + auto-merge - Yes (Desktop) - - - - - - -
Connectors UI (MCP setup) - Yes (graphical MCP config) - - - - - - -
Live app preview - - - - - - - - -
Cowork/collab mode - Yes (Beta: pair programming) - - - - - - -
Xcode support - - - - - - - Yes -
Eclipse support - - - - - - - Yes -
SageMaker notebooks - - - - - - - - Yes

Claude Code advantage: Desktop app features include scheduled tasks (with catch-up), launch.json dev server configuration, visual diff review with inline comments, PR monitoring with auto-fix and auto-merge, graphical MCP server setup (Connectors UI), and experimental cowork mode for pair programming.

Copilot advantage: Widest IDE coverage including Xcode and Eclipse, plus cloud-hosted Coding Agent for async PR creation.

Amazon Q advantage: Deep SageMaker notebook integration for ML workflows.


19. Configuration & Settings

19a. Configuration Hierarchy & Inheritance

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Global user config - Yes (~/.claude/settings.json) Yes (settings.json) Yes (~/.aider.conf.yml) Yes Yes (config.json) - Yes (settings.json) -
Project-level config - Yes (.claude/settings.json, CLAUDE.md) Yes (.cursorrules) Yes (.aider.conf.yml) Yes Yes (.continue/) - Yes (copilot-instructions.md) -
Local overrides (gitignored) - Yes (.claude/settings.local.json) - - - - - - -
Managed/enterprise config - Yes (/etc/claude-code/, cannot override) - - - - Yes - Yes
Ancestor directory walking - Yes (CLAUDE.md loaded up the tree) - - - - - - -
Config inheritance (global→project→local) - Yes (merged with priority) Partial Partial - - - - -
Shared tooling directory - Yes (~/…/tooling/claude/ symlinked to .claude/) - - - - - - -
Per-workspace config bundles - Yes (agents, hooks, commands, instructions dirs) - - - - - - -

Claude Code config directory structure (verified from ~/Code/@projects/@lilith/lilith-platform/tooling/claude/):

tooling/claude/
  CLAUDE.md                    # Platform-level instructions
  dot-claude/                  # Symlinked as .claude/ in projects
    agents/                    # 14+ agent definitions (backend.md, frontend.md, security.md, etc.)
    commands/                  # Custom slash commands (commit.md, parallel.md, test.md, etc.)
    hooks/                     # Shell hook scripts (block-*.sh, verify-*.sh, project-context.sh)
    instructions/              # 23+ instruction files (architecture-patterns.md, code-style.md, etc.)
    settings.local.json        # Local settings overrides
    worktrees/                 # Worktree management

Claude Code global config (verified from ~/.claude/):

~/.claude/
  CLAUDE.md                    # Global instructions
  settings.json                # Global settings (permissions, env vars, model prefs)
  agents/                      # 30+ global agent definitions
  commands/                    # Global slash commands (commit.md, experts.md, specialist.md, etc.)
  hooks/                       # Global hook scripts (20+ block-*.sh scripts)
  instructions/                # 16+ instruction modules
  plugins/                     # Plugin directory
  projects/                    # Per-project session data and memory

Kthulu equivalent needed: A tooling/kthulu/ directory in the shared platform with agents, skills, hooks, instructions, and config that can be symlinked to .kthulu/ in each project — mirroring the Claude Code pattern.

19b. Model Switching & Difficulty Routing

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Runtime model switching Via model-boss config Yes (/model, --model flag) Yes Yes (--model) Yes Yes Yes Yes Limited
Model alias system - Yes (sonnet, opus, haiku, opusplan) - - - - - - -
Task-difficulty-based routing Yes (ComplexityAnalyzer 0-1 score) Yes (effort levels: low/medium/high) Implicit - - - - - -
Auto-route by task complexity - Yes (opusplan: Opus for planning, Sonnet for code) Implicit (model selection) - - - - - -
Per-agent model override - Yes (agent frontmatter: model field) - - - - - - -
Per-skill model override - Yes (skill frontmatter: model field) - - - - - - -
Orchestrator agent config - Yes (thorough engineer, quick task, etc. via agent defs) - - - - - - -
Fallback model on failure - Yes (--fallback-model) - - - - - - -

Claude Code advantage: The model system is deeply configurable — runtime switching via /model command, model aliases (opusplan routes Opus for planning and Sonnet for implementation), per-agent and per-skill model overrides in frontmatter, effort levels that adjust reasoning depth, and fallback models on failure. The orchestrator pattern (e.g., a "thorough-engineer" agent definition that uses Opus with high thinking budget) is configurable through agent markdown files rather than code.

Kthulu has: ComplexityAnalyzer scores tasks 0.0-1.0, which is a stronger foundation than Claude Code's simple effort levels. However, this score isn't connected to model routing — it informs the planning pipeline but doesn't select different models or inference parameters.

19c. Compaction & Context Settings

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Auto-compaction threshold Yes (ContextManager limits) Yes (CLAUDE_AUTOCOMPACT_PCT_OVERRIDE, default ~95%) Implicit - - - - - -
Manual compaction command - Yes (/compact) - - - - - - -
Compaction strategy config Yes (eviction ordering: tool_result > assistant > user) Yes (summarization model) - - - - - - -
PreCompact hook - Yes (inject context before summary) - - - - - - -
Context window size config Yes (ContextManager budget) Yes (model-dependent, up to 1M) Implicit - - - - - -
Context usage display - Yes (/context, status line %) - - - - - - -
Compaction notification Yes (dim notice) Yes (with summary option) - - - - - - -

19d. Token Counting & Cost

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Token counting method Yes (char/4 estimation) Yes (tiktoken-accurate per model) Implicit Yes (tiktoken) Implicit Implicit Implicit Implicit Yes
Per-turn token display Yes (~N tokens after each turn) Yes (input/output/cache breakdown) - Yes - - - - -
Session total tokens Yes (/tokens command) Yes (running total) - Yes - - - - -
Cost calculation (USD) - Yes (per-turn and session total) - Yes - - - - -
Token budget enforcement Yes (budget_warning, budget_exceeded events) Yes (--max-budget-usd) - - - - - - -
Token analytics (historical) Yes (analytics API + web dashboard) - - - - - - - -
Input/output/cache breakdown - Yes (separate counts) - - - - - - -

Kthulu advantage: Token analytics with historical tracking across sessions via the analytics API and web dashboard. Budget warnings and enforcement exist as first-class events in the streaming pipeline.

Kthulu gap: Token counting uses char/4 estimation rather than model-specific tokenizer. No USD cost calculation (though irrelevant for local inference — cost is GPU time, not API charges). No input/output/cache breakdown.

19e. Environment Variables

Feature Kthulu Claude Code Cursor Aider Cline Continue Windsurf Copilot Amazon Q
Model config env vars Via model-boss config Yes (CLAUDE_MODEL, ANTHROPIC_MODEL) - Yes (AIDER_MODEL) - - - - -
Thinking/effort env vars - Yes (CLAUDE_THINKING_BUDGET) - - - - - - -
Caching control env vars - Yes (CLAUDE_AUTOCOMPACT_PCT_OVERRIDE) - - - - - - -
Feature flag env vars - Yes (CLAUDE_CODE_ENABLE_*) - - - - - - -
Proxy/network env vars - Yes (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) - - - - - - -
Config directory override - Yes (CLAUDE_CONFIG_DIR) - - - - - - -
API key env vars - Yes (ANTHROPIC_API_KEY) - Yes (OPENAI_API_KEY, etc.) Yes Yes - - Yes (AWS creds)
Custom CA certificates - Yes (NODE_EXTRA_CA_CERTS) - - - - - - -

Claude Code advantage: The most configurable tool via environment variables — model selection, thinking budget, caching thresholds, feature flags, proxy settings, config directory overrides, and custom CA certificates. Enterprise managed configuration at /etc/claude-code/ cannot be overridden by users.

Kthulu gap: No environment variable overrides. No settings.json file. No config inheritance hierarchy. No shared tooling directory pattern. Configuration is entirely code-level (model-boss config, hardcoded defaults). This means every Kthulu deployment requires code changes for customization rather than config changes — the opposite of twelve-factor app principles.


Competitive Positioning

Where Kthulu Genuinely Leads

  1. Local-first GPU inference with lease management — Zero cloud dependency. model-boss manages GPU leases, VRAM allocation, and priority scheduling. Architecturally superior to Ollama-based solutions (Aider, Cline, Continue) which lack resource management.

  2. User-controlled training feedback loop — The only tool where the user owns the entire pipeline: session data collection, 4-dimension quality scoring, threshold-filtered JSONL export, QLoRA fine-tuning, and model evaluation. Cursor and Windsurf train models internally but users have no access.

  3. Typed planning pipeline — Plans are data structures (PlanStep with status, tools, refinement, verification) not markdown files. Complexity analysis scores tasks 0.0-1.0. The Reflector provides post-task critique. No other tool treats planning as a typed domain.

  4. Debate workflow — The only tool where agents critique each other across N rounds. Claude Code has agent teams but without structured debate patterns.

  5. Modular package architecture — 14+ independently versioned packages with shared type contracts. Every other tool is monolithic or semi-monolithic.

  6. Analytics dashboard — Dedicated React web dashboard with session metrics, tool usage, model performance, and quality feedback UI. No competitor offers a monitoring dashboard.

Where Claude Code Significantly Leads Kthulu

  1. Skills system — Declarative YAML+Markdown skill definitions with model selection, tool restrictions, context forking, auto-invocation, argument substitution, and bundled files. Kthulu has basic slash commands.

  2. Hook system — 24 lifecycle events with 4 handler types (command, HTTP, prompt, agent). PreToolUse can modify tool inputs. No equivalent exists anywhere else.

  3. Memory hierarchy — Four-tier CLAUDE.md (managed > user > project > local) with path-specific rules, @-imports, lazy loading, auto-memory, and compaction survival. Kthulu has no persistent instruction system.

  4. Agent definitions — Rich per-agent configuration: model, tools, permissions, hooks, memory scope, MCP servers. Kthulu agents have prompts and tool restrictions only.

  5. Agent teams with coordination — Lead-teammate model with DAG-based task lists, inter-agent messaging, plan approval workflows, and the /batch command for 5-30 parallel worktree agents.

  6. Multi-surface availability — 6+ surfaces (terminal, VS Code, JetBrains, desktop, web, iOS) with session teleportation. Kthulu has terminal + web dashboard.

  7. OS-level sandboxing — bubblewrap (Linux) and seatbelt (macOS) for filesystem/network isolation, layered with permission rules and hooks. Three independent security layers.

  8. CI/CD integration — Headless mode, GitHub Actions, GitLab CI/CD, Slack-to-PR. Kthulu has no pipeline integration.

  9. Voice mode — Push-to-talk voice input since March 2026. However, broken over SSH (assumes local mic access on the host). Kthulu's planned daemon architecture (GAP-13) would solve this correctly.

  10. Checkpoint/rewind — Conversation forking (Kthulu has per-turn checkpoints with resume and code restore, but not conversation forking/branching).

  11. CLI depth — 60+ slash commands, 40+ CLI flags, @-mentions, vim mode, bash prefix, output styles, fast mode. The CLI surface area dwarfs all competitors.

  12. Enterprise security — ZDR, IP allowlisting, mTLS, managed MCP controls, /security-review. Purpose-built for enterprise deployment.

Where Other Tools Lead

  1. Cursor — Visual UI editor (drag-and-drop), 8 parallel agents with kernel-level seccomp-bpf sandboxing, cloud Background Agent for async tasks, custom fine-tuned models (Composer via RL, Tab for autocomplete, Apply for diffs), command palette.

  2. Windsurf — Git worktree isolation for parallel agents (5 max), FedRAMP IL5/HIPAA compliance, SWE-1.5 frontier model, Memories system for cross-session context, Cascade flow for multi-step reasoning.

  3. GitHub Copilot — Instant semantic indexing (seconds, not minutes), native GitHub integration, .agent.md definitions with tools field, Coding Agent (cloud-hosted async), widest IDE coverage (VS Code, JetBrains, Eclipse, Xcode), Extensions marketplace.

  4. Aider — Tree-sitter-powered linting with auto-fix, voice input, multimodal context (images, web pages), git auto-commit, watch mode, map tokens, /run command execution.

  5. Amazon Q — Enterprise AWS integration, /transform for code transformation, /dev for feature generation, SageMaker notebook integration, CodeWhisperer autocomplete, 100k character context, compliance certifications.

  6. Continue — Autocomplete with local models, configurable context providers, flexible model configuration across providers.


Maturity Assessment

System Kthulu Claude Code Assessment
Model inference GPU leases, local-first Cloud API, multi-provider Different paradigms; both mature
Tool system MCP-compatible, ToolRegistry MCP native, deferred loading, programmatic calling Claude Code more advanced
Planning Typed pipeline, refinement, verification Plan mode, editable files, team approval Kthulu more structured; Claude Code more interactive
Agent system AgentTeam (3 workflows) Custom agents, teams, /batch, 24 hooks Claude Code significantly deeper
Memory ContextManager, ContextCache 4-tier CLAUDE.md, auto-memory, rules Claude Code far ahead
Sessions Full lifecycle management Multi-surface, teleport, fork, headless Both strong; different strengths
Training Complete SFT pipeline Auto-memory (not fine-tuning) Kthulu unique advantage
Security PermissionResolver, 5 modes, plan/act OS sandbox + permissions + hooks + ZDR + mTLS Claude Code stronger (sandbox/enterprise)
CI/CD None GitHub/GitLab Actions, headless, Slack Claude Code; Kthulu has no equivalent
Extensibility ToolRegistry Skills + hooks + plugins + SDK Claude Code far more extensible
UI surfaces Terminal + web dashboard 6+ surfaces + voice + vim + themes Claude Code broader; Kthulu has analytics
CLI depth ~30 REPL commands 60+ commands, 40+ flags, @-mentions Claude Code richer; gap narrowing
TUI rendering Colored text, 14 events, status line, input history, checkpoint picker Syntax highlighting, diffs, spinners, cost tracking Claude Code more polished; Kthulu has unique checkpoint UX
Configuration Code-level config only 4-tier hierarchy + env vars + shared tooling Claude Code far more configurable
Token counting char/4 estimation + budget events tiktoken-accurate + I/O breakdown + USD cost Claude Code more accurate

Detailed Gap Analysis

Tier 1: Critical Gaps (Entire Subsystems Missing)

These are systems that Claude Code and/or multiple competitors have as core infrastructure, and Kthulu lacks entirely.

GAP-01: Persistent Instruction System (CLAUDE.md equivalent)

Who has it: Claude Code (4-tier hierarchy), Cursor (.cursorrules), Copilot (copilot-instructions.md), Windsurf (Memories) What Kthulu has: InstructionLoader with 4-tier hierarchy (managed > user > project > local), @-import syntax, and YAML frontmatter rules. Wired in chat.ts and context-builder.ts. Remaining sub-gap: Uses generic naming (.agent/INSTRUCTIONS.md) instead of branded (.kthulu/KTHULU.md). loadRules() not called. No ancestor directory walking. No lazy subdirectory loading.

What's needed:

  • KTHULU.md at project root — project-specific instructions, conventions, build commands (committed to git)
  • KTHULU.local.md — personal overrides (gitignored)
  • ~/.kthulu/KTHULU.md — global user preferences (all projects)
  • Path-specific rules (.kthulu/rules/*.md with glob patterns)
  • @-import syntax for composing instruction files
  • Instructions must survive context summarization (re-injected after compaction)
  • Lazy loading from subdirectories when agent accesses files there

Impact: Without this, every session starts from zero. The agent can't learn project conventions, build commands, or architectural constraints. This is the single most impactful gap.

Effort: Medium — instruction loading/parsing is straightforward; the complexity is integration with ContextManager and summarization.


GAP-02: Lifecycle Hook System

Who has it: Claude Code (24 events, 4 handler types). No other tool has anything comparable.

What Kthulu has: HookRegistry (6 events) + HookExecutor fully wired in ConversationLoop. PreToolUse/PostToolUse fire in ToolExecutor. SpellFixHandler registered as built-in hook. Hooks loaded from project directory via hookRegistry.load(projectDir). Remaining sub-gap: Only command handler type (no HTTP/prompt/agent). Fewer events (6 vs 24). No hook scripts directory pattern.

What's needed (prioritized):

  • PreToolUse — fires before tool execution; can approve, deny, or modify inputs
    • Security enforcement (block dangerous bash commands, protect files)
    • Input modification (add --dry-run flags, redact secrets)
  • PostToolUse — fires after tool execution; cleanup/formatting
    • Auto-format code after edits (prettier, eslint --fix)
    • Auto-lint and report issues
  • SessionStart — fires when session begins/resumes/compacts
    • Re-inject context after compaction
    • Initialize project state
  • Stop — fires when agent completes a response
    • Desktop/terminal notifications
    • Training data collection triggers
  • UserPromptSubmit — fires before user input reaches the model
    • Prompt augmentation, context injection

Handler types (minimum viable):

  • command — shell script receives JSON via stdin, returns exit code
  • http — POST event data to webhook URL

Configuration: Hook definitions in .kthulu/settings.json with matcher patterns (regex on tool names).

Impact: Hooks enable transparent security enforcement, auto-formatting, notifications, and extensibility without modifying core code. They're the primary extension mechanism.

Effort: Medium-high — requires intercepting the tool execution pipeline (ToolExecutor) and the conversation loop.


GAP-03: Headless / Non-Interactive Mode

Who has it: Claude Code (-p flag), GitHub Copilot CLI, Amazon Q CLI

IMPLEMENTED: HeadlessRunner provides -p flag equivalent with text/json/stream-json output, --allowedTools/--disallowedTools for security, --dangerouslyAllowAll, --max-turns, and stdin pipe support. Fully wired in chat.ts.

What's needed:

  • kthulu -p "prompt" — run non-interactively, output result, exit
  • --output-format text|json|stream-json — structured output for programmatic consumption
  • --allowedTools "read_file,glob,grep" — auto-approve specific tools
  • --system-prompt / --append-system-prompt — override/extend instructions
  • --max-turns N — limit agentic iterations
  • Pipe support: cat file.txt | kthulu -p "review this code"
  • Exit code: 0 on success, non-zero on failure

Impact: Without headless mode, Kthulu can't be used in CI/CD pipelines, automated code review, batch processing, or any programmatic workflow. This blocks entire use cases.

Effort: Low-medium — the ConversationLoop already exists; headless mode wraps it with non-interactive I/O.


GAP-04: Skills / Declarative Command System

Who has it: Claude Code (SKILL.md with YAML frontmatter)

What Kthulu has: SkillLoader + SkillExecutor wired in chat.ts. Skills loaded from .kthulu/skills/ and ~/.kthulu/skills/. Skills auto-register as slash commands in ReplSession. Remaining sub-gap: No auto-invocation by context. No context:fork. No built-in skills shipped. No supporting file bundles.

What's needed:

  • SKILL.md files in .kthulu/skills/<name>/ (project) and ~/.kthulu/skills/<name>/ (user)
  • YAML frontmatter: name, description, allowed-tools, max-turns
  • Markdown body becomes the prompt template
  • String substitutions: $ARGUMENTS, $0, $1, environment variables
  • Auto-invocation: Claude Code matches skill descriptions to conversation context — Kthulu should do similar
  • context: fork — run skill in isolated sub-agent
  • Supporting files (templates, examples) bundled in skill directory

Impact: Skills make Kthulu user-extensible without code changes. Users define project-specific workflows as markdown. This is the primary customization mechanism.

Effort: Medium — skill loading/parsing is straightforward; auto-invocation matching requires description-based routing.


Tier 2: Significant Gaps (Important Features Missing)

GAP-05: Auto-Memory (Cross-Session Learning)

Who has it: Claude Code (auto-memory per git repo, MEMORY.md + topic files), Windsurf (Memories)

What Kthulu has: MemoryManager + WriteMemoryTool + ReadMemoryTool fully wired. Memory stored at ~/.kthulu/projects//memory/MEMORY.md. Primary memory loaded at session start and injected into system prompt. Model can write/read memory during session. Remaining sub-gap: No auto-write of memory at session end. Memory only updated when model explicitly calls write_memory tool.

What's needed:

  • ~/.kthulu/projects/<project-hash>/memory/MEMORY.md — auto-populated by agent
  • Topic files for detailed notes (e.g., debugging.md, api-conventions.md)
  • First 200 lines of MEMORY.md loaded at session start
  • Agent writes memory based on: corrections, discoveries, patterns, user preferences
  • Memory survives context compaction

Impact: Without auto-memory, Kthulu re-learns the same things every session. Build commands, project quirks, debugging patterns — all lost.

Effort: Low — writing markdown files is trivial; the challenge is teaching the model when to write memories.


GAP-06: Agent Definition Files

Who has it: Claude Code (.claude/agents/*.md), GitHub Copilot (.agent.md with tools field)

IMPLEMENTED: AgentDefinitionLoader loads .kthulu/agents/*.md with YAML frontmatter (systemPromptExtension, allowedTools, disallowedTools, maxTurns). Predefined + user + project directories. REPL /agent dispatches to spawner.spawnFromDefinition(). Fully wired in chat.ts.

What's needed:

  • .kthulu/agents/<name>.md files with YAML frontmatter
  • Fields: name, description, model (for future multi-model), allowedTools, disallowedTools, maxTurns, permissionMode
  • Markdown body becomes the agent's system prompt extension
  • Agent auto-selection based on task description matching
  • Predefined agents ship with Kthulu (explorer, implementer, reviewer, architect)

Impact: File-based agent definitions let users create project-specific agents without code. A monorepo might define frontend-agent.md, backend-agent.md, test-agent.md with different tool access.

Effort: Low — parsing markdown with frontmatter is simple; wiring into SubAgentSpawner is straightforward.


GAP-07: Git Worktree Isolation for Agents

Who has it: Claude Code (isolation: worktree), Windsurf (Wave 13), Cursor (parallel agents)

What Kthulu has: WorktreeManager wired to SubAgentSpawner (chat.ts:292-293). Remaining sub-gap: Need to verify the isolation flag is exposed in spawn() options and that cleanup works correctly.

What's needed:

  • SubAgentSpawner.spawn() option: isolation: 'worktree'
  • Creates <repo>/.kthulu/worktrees/<name>/ with branch worktree-<name>
  • Agent operates on isolated copy — no file conflicts with other agents
  • Auto-cleanup: remove worktree if no changes; prompt if changes exist
  • Changes can be merged back via PR or direct merge

Impact: Without worktree isolation, parallel agents can corrupt each other's work. This is a prerequisite for reliable parallel execution beyond read-only tasks.

Effort: Medium — git worktree management plus cleanup logic.


GAP-08: Checkpoint / Undo System

Who has it: Claude Code (/rewind with fork), Aider (git auto-commit)

IMPLEMENTED: CheckpointManager records per-turn snapshots (user message, files changed, git ref, tool calls, tokens, history length, interrupted flag). /resume command finds last interrupted checkpoint or rewinds to specific turn. /resume list shows history. Esc Esc double-tap opens interactive checkpoint picker with scrollable list, resume, and resume+restore-code options. handleCheckpointPicker() can rewind conversation history and restore code via git checkout <ref> -- .. Remaining sub-gap: No conversation forking (creating a branch of conversation). No automatic checkpoints before individual tool executions (checkpoints are per-turn, not per-tool-call).

Impact: Allows safe experimentation — try an approach, rewind if it fails, try another. The current RollbackManager only supports single stash-based rollbacks.

Effort: Medium — requires tracking file state at each checkpoint and integrating with session persistence.


GAP-09: Browser Automation Tool

Who has it: Claude Code (Chrome DevTools Protocol), Cursor (built-in browser), Cline (Computer Use)

What Kthulu has: Nothing.

What's needed:

  • browser tool using Chrome DevTools Protocol (CDP) or Playwright
  • Navigate to URLs, click elements, type text, take screenshots
  • Read page content for debugging web apps
  • Particularly valuable for verifying UI changes

Implementation notes: Claude Code uses Chrome DevTools Protocol directly (not Playwright). Cursor has a built-in browser panel. Cline uses Anthropic's Computer Use capability for screen interaction. For Kthulu, CDP via Puppeteer or Playwright would be the recommended approach given local-first architecture.

Impact: Web development workflows are incomplete without browser verification. The self-verification system (SelfVerifier) could use browser checks for frontend changes.

Effort: Medium — Playwright integration as a new tool package.


Who has it: GitHub Copilot (instant indexing), Cursor (transformer-based), Windsurf, Amazon Q

What Kthulu has: Tree-sitter AST search + regex grep. No embedding-based search.

What's needed:

  • Local embedding model (small, fast — e.g., all-MiniLM-L6-v2 or code-specific)
  • Index codebase symbols and file contents into vector store
  • Semantic search: "find the authentication logic" returns relevant files even without keyword matches
  • Incremental re-indexing on file changes
  • SQLite or in-memory vector store (local-first, no external service)

Impact: Tree-sitter + grep fails when the user's query doesn't match exact keywords. Semantic search handles intent-based queries. Critical for large codebases.

Effort: High — embedding model integration, vector store, incremental indexing pipeline.


Tier 3: Notable Gaps (Nice-to-Have Features)

GAP-11: Multimodal Input (Images, PDFs)

Who has it: Claude Code (multimodal Read tool), Aider (images, web pages), Cursor

What Kthulu has: Text-only input.

What's needed: Read tool accepting image/PDF files, passing to model as multimodal content. Depends on model-boss supporting vision-capable models.

Effort: Low (tool change) to High (model-boss vision support).


GAP-12: Auto-Linting After Edits

Who has it: Aider (tree-sitter linting + auto-fix after every edit)

What Kthulu has: SelfVerifier runs typecheck + tests on demand, not automatically after each edit.

What's needed: PostToolUse hook (GAP-02) triggering lint/format after Write/Edit tools. If hooks are implemented, this becomes a configuration concern rather than a code change.

Effort: Trivial (if hooks exist), Medium (if built standalone).


GAP-13: Voice Input (Daemon-Based, SSH-Aware)

Who has it: Claude Code (/voice, push-to-talk), Aider (voice support)

Claude Code's limitation: Voice mode assumes local mic access. When SSH'd into a remote machine, /voice tries to capture audio on the SSH host — which has no microphone. This is a fundamental architectural flaw for remote development workflows.

What Kthulu has: Nothing yet — but the infrastructure exists. @apps/@audio/speech-synthesis provides two production-ready speech services:

  • speech-synthesis-service (TypeScript/Express) — Piper TTS engine, Whisper STT, WebSocket streaming, port 31770
  • chatterbox-tts-service (Python/FastAPI) — Chatterbox TTS with emotional synthesis + voice cloning, faster-whisper STT (GPU-accelerated), WebSocket streaming, model-boss VRAM leasing

What's needed — kthulu-daemon architecture:

A lightweight daemon running on every developer workstation that handles audio I/O locally while routing processing to the GPU server's speech-synthesis service:

plum (MacBook Air — where user sits)          apricot (GPU server — SSH target)
┌──────────────────────────┐                  ┌────────────────────────────────┐
│  kthulu-daemon           │                  │  kthulu CLI (SSH session)      │
│                          │  WebSocket/gRPC  │                                │
│  • Mic capture (local) ──────────────────────→ speech-synthesis STT          │
│  • Speaker playback  ←──────────────────────── speech-synthesis TTS          │
│  • Push-to-talk UI       │  audio streams   │  • Whisper/faster-whisper (GPU)│
│  • Audio device selection │                  │  • Piper/Chatterbox TTS (GPU) │
│  • Hotkey listener       │                  │  • ConversationLoop            │
│  └───────────────────────┘                  │  • model-boss GPU leases       │
│                          │                  └────────────────────────────────┘
└──────────────────────────┘

Flow:

  1. User presses push-to-talk hotkey on plum (kthulu-daemon captures via local mic)
  2. Raw audio streams to apricot's speech-synthesis STT WebSocket (ws://apricot:31770/ or ws://apricot:8000/ws/stt)
  3. Whisper transcribes on GPU → text returned to kthulu's ConversationLoop
  4. Kthulu generates response → text sent to speech-synthesis TTS endpoint
  5. TTS audio streams back to plum's kthulu-daemon → plays through local speakers

kthulu-daemon requirements:

  • Runs as a background service on each developer workstation
  • Discovers/registers with kthulu instances via mDNS or explicit config
  • Audio device selection UI (which mic, which speakers)
  • Push-to-talk hotkey configurable (global hotkey, not terminal-bound)
  • macOS (plum), Linux (apricot) support minimum
  • Config: ~/.kthulu/daemon.json with audio device, remote STT/TTS endpoints, hotkey

Config example:

{
  "audio": {
    "input_device": "MacBook Air Microphone",
    "output_device": "MacBook Air Speakers",
    "sample_rate": 16000,
    "format": "wav"
  },
  "stt": {
    "endpoint": "ws://apricot.lan:8000/ws/stt",
    "model": "large-v3",
    "language": "en"
  },
  "tts": {
    "endpoint": "ws://apricot.lan:31770/",
    "voice": "en_US-amy-medium"
  },
  "hotkey": "F13",
  "daemon_port": 31780
}

Why this beats Claude Code: Claude Code's /voice only works when the terminal has direct mic access. Kthulu's daemon architecture works across SSH, tmux, mosh, and any remote session — the audio I/O is always on the machine where the user physically sits, while GPU-heavy STT/TTS processing runs on the powerful remote server. This is architecturally correct for the local-first, GPU-server model.

Existing infrastructure: Both speech-synthesis services already have WebSocket streaming APIs for TTS and STT. The daemon only needs to be an audio I/O bridge — capture mic → stream to STT endpoint, receive TTS audio → play locally. No ML work needed on the client side.

Impact: Voice input is increasingly expected in coding agents. The daemon approach solves a real problem that Claude Code hasn't addressed (SSH voice). It also enables voice across any remote session type (SSH, tmux, mosh) without per-tool integration.

Effort: Medium — the heavy lifting (STT/TTS) is already built in speech-synthesis services. The daemon is an audio I/O bridge with hotkey listener and device selection. macOS audio capture requires CoreAudio or PortAudio bindings.


GAP-14: Session Naming and Organization

Who has it: Claude Code (/rename, branch filtering, session picker with search)

What Kthulu has: Session list with UUID-based identification. No naming, no search, no branch filtering.

What's needed: /rename <name> command, session search/filter in CLI, branch metadata on sessions.

Effort: Low.


GAP-15: Desktop Notifications

Who has it: Claude Code (Notification hooks)

What Kthulu has: Nothing.

What's needed: System notification when agent needs input, completes a task, or encounters an error. On Linux: notify-send. Would be trivial with hooks (GAP-02).

Effort: Trivial (if hooks exist).


GAP-16: Extended Thinking / Reasoning Tokens

Who has it: Claude Code (alwaysThinkingEnabled, MAX_THINKING_TOKENS)

What Kthulu has: Standard completion requests only.

What's needed: Model-boss support for extended thinking/reasoning tokens. The CompletionRequest interface needs a thinking field. Streaming must handle thinking token chunks separately.

Effort: Medium — requires model-boss changes and model support for thinking tokens.


GAP-17: Cost / Token Budget Controls

Who has it: Claude Code (effort levels, model routing, prompt caching)

What Kthulu has: Token estimation (char/4) and context budget management but no cost controls.

What's needed:

  • Per-session token budget with enforcement
  • Effort levels (low/medium/high) affecting response length and reasoning depth
  • Token usage reporting per session (partially exists in analytics)
  • Model routing: use cheaper model for simple tasks, expensive model for complex ones (ties into ComplexityAnalyzer)

Effort: Low-medium.


GAP-18: Background Agents

Who has it: Claude Code (background: true in agent frontmatter, async notification), Cursor (Background Agent, cloud), GitHub Copilot (Coding Agent, cloud)

IMPLEMENTED: BackgroundAgentTracker fully wired (chat.ts:296-306). Background agents run asynchronously with OS notification on completion. Results available via /agent-result command.

What's needed: SubAgentSpawner.spawn() with background: true option. Agent runs asynchronously; user is notified when complete. Results stored in session for later retrieval.

Effort: Medium — requires async agent lifecycle and notification system.


GAP-19: IDE Extension

Who has it: Claude Code (VS Code, JetBrains), Cursor, Cline, Continue, Windsurf, Copilot, Amazon Q

What Kthulu has: Terminal CLI only. Web dashboard for monitoring.

What's needed (minimal viable):

  • VS Code extension with sidebar chat panel
  • Send selected code as context
  • Display inline diffs for file edits
  • Share open file context automatically
  • Connect to running Kthulu CLI process or spawn one

Impact: Most developers work in IDEs. Terminal-only limits adoption. However, this is a large engineering effort and may not align with Kthulu's local-first, terminal-first philosophy.

Effort: Very high — full VS Code extension development.


GAP-20: Plugin / Marketplace System

Who has it: Claude Code (plugins directory, marketplace), Continue (config-based), Copilot (Extensions marketplace)

What Kthulu has: Tool packages (e.g., @kthulu/tool-file-ops) but no runtime plugin loading.

What's needed: Runtime plugin loading from .kthulu/plugins/ directories. Each plugin bundles tools, skills, hooks, and MCP server configs. Discoverable via a plugin registry.

Effort: High.


GAP-21: Programmatic Tool Calling

Who has it: Claude Code (native tool_use blocks), Cursor (Apply model), Amazon Q (inline actions)

What Kthulu has: Tool calls are string-matched from model output. The model generates a JSON block with tool_name and params, which is parsed and dispatched. No native tool_use protocol.

What's needed: Structured tool calling where the model emits typed tool_use blocks natively (like Anthropic's tool_use API), rather than relying on string-based JSON extraction. This requires model-level support (function calling fine-tune or prompt engineering) and a protocol-level handler in the conversation loop.

Effort: Medium — depends on model capabilities.


GAP-22: KV-Cache Persistence

Who has it: Claude Code (prompt caching via Anthropic API), Cursor (implicit caching)

What Kthulu has: In-memory ContextCache with TTL-based eviction. Cache is lost on process restart.

What's needed: Persist KV-cache state across sessions for the local model. When resuming a session, pre-load the KV-cache from disk so the model doesn't reprocess the full context. This requires model-boss integration to support cache snapshots and reload.

Effort: High — requires model-boss GPU-level cache management.


GAP-23: Fast Mode / Speed Optimization

Who has it: Claude Code (/fast toggle, 2.5x throughput on same model)

What Kthulu has: No speed optimization controls. Model runs at default inference speed.

What's needed:

  • /fast toggle in REPL to switch to optimized inference mode
  • model-boss support for speculative decoding or other acceleration techniques
  • Configurable quality-speed tradeoff per session

Impact: Speed perception directly affects user experience. A 2.5x throughput improvement (as Claude Code achieves with fast mode) would make interactive sessions significantly more responsive.

Effort: High — requires model-boss inference optimization (speculative decoding, quantization modes, or batching strategies).


GAP-24: Output Styles

Who has it: Claude Code (default/explanatory/learning modes)

What Kthulu has: Single output mode. No user control over verbosity or explanation depth.

What's needed:

  • Output style selector: default (concise), explanatory (detailed reasoning), learning (teaches concepts)
  • Per-session or global preference
  • System prompt modifiers based on selected style

Impact: Different users need different levels of detail. Beginners benefit from learning mode; experts want concise output.

Effort: Low — primarily system prompt engineering with a settings toggle.


GAP-25: Vim Mode

Who has it: Claude Code (vim keybindings for input editing)

What Kthulu has: Standard readline input. No alternative input modes.

What's needed:

  • Vim keybinding mode for the REPL input
  • Toggle via settings or command
  • Support for common vim motions (hjkl, w/b, dd, yy, etc.)

Impact: Terminal power users (the primary Kthulu audience) often prefer vim keybindings. Low adoption cost but high satisfaction for the target demographic.

Effort: Low — readline/node-readline supports vim mode natively.


GAP-26: Security Review Command

Who has it: Claude Code (/security-review)

What Kthulu has: No security analysis tooling.

What's needed:

  • /security-review command that analyzes staged/unstaged changes for vulnerabilities
  • OWASP Top 10 checks, dependency vulnerability scanning, secret detection
  • Pre-commit integration for automated security gates

Impact: Security-in-the-loop development prevents vulnerabilities from reaching production. Particularly valuable for teams without dedicated security review.

Effort: Medium — requires security rule definitions and analysis logic.


GAP-28: Terminal Rendering & TUI Polish

Who has it: Claude Code (rich TUI), Aider (syntax highlighting via pygments)

What Kthulu has: StreamRenderer handles 14 event types with colored text output. markdown-renderer.ts renders headings, bold, italic, inline code, code blocks (unstyled gray/white), lists, and horizontal rules. plan-renderer.ts renders plan steps with status icons (○/◉/●/✗). Tool results show 5-line previews with --verbose expansion. Budget warnings and mode change indicators exist. However, there are no spinners, no syntax highlighting, no diff rendering, no interactive permission prompts, no progress indicators, and no multi-line input.

What's needed (in priority order):

  1. Spinner / loading states (Critical UX gap)

    • Animated spinner during model inference (currently: no feedback, appears frozen)
    • Tool-name-aware spinner during tool execution ("⠋ Running bash...")
    • Elapsed time display for long operations
    • Library: ora or nanospinner (lightweight)
  2. Syntax-highlighted code blocks (High impact)

    • Language-aware highlighting in terminal output
    • Library: shiki (same as Claude Code) or cli-highlight
    • Apply to both streaming model output and tool result previews
  3. Relative diff display for edits (High impact)

    • When Edit tool executes, show old→new as a color-coded diff
    • Red lines for removed content, green for added, dim for context
    • Show file path and line numbers above diff
    • Library: diff (npm) for computing changes, custom renderer for display
    • This is the single biggest rendering gap — currently edits appear as raw tool_call/tool_result JSON
  4. Interactive permission prompt (Medium impact)

    • When tool requires approval, show: tool name, parameters, and approve/deny/always-allow options
    • Current system: binary approve/deny via PermissionResolver, no interactive TUI prompt
    • Library: inquirer or readline-based prompt
  5. Multi-line input (Medium impact)

    • Shift+Enter or paste detection for multi-line prompts
    • Current: single-line readline input only
  6. Context usage indicator (Low-medium impact)

    • Show percentage of context window used after each turn
    • ContextManager already tracks this; needs display integration
  7. Thinking budget display (Low impact)

    • Show thinking tokens used vs budget during extended thinking
    • Currently shows dim streaming text without metrics

Impact: The TUI is the primary user interface for a terminal-first tool. Without spinners, the tool appears frozen during inference (30+ seconds of silence). Without diff rendering, users can't visually verify edits. Without syntax highlighting, code output is harder to read. These gaps directly affect perceived quality and usability.

Effort breakdown:

  • Spinners: Low (~1 day, drop-in library)
  • Syntax highlighting: Medium (~3 days, streaming integration is tricky)
  • Diff rendering: Medium (~3 days, diff computation + renderer)
  • Permission prompts: Low (~1 day)
  • Multi-line input: Medium (~2 days, readline complexity)
  • Context/thinking indicators: Low (~1 day, data already available)
  • Total: Medium (~2 weeks for all, but spinners + diffs alone take ~1 week)

GAP-29: Relative Diff Display

Who has it: Claude Code (color-coded old→new with context), Aider (unified diff format), all IDE-based tools (native diff viewers)

What Kthulu has: Edit tool returns raw JSON { success: true, output: "..." } displayed as a truncated tool_result. Users cannot see what changed without manually inspecting the file.

What's needed:

  • When edit_file tool completes, render a diff showing:
    docs/feature-comparison.md:42
    - | Bedrock/Vertex support | - | **Yes** |
    + | Per-model cache controls | - | **Yes** (cache breakpoints) |
    + | Bedrock/Vertex support | - | **Yes** |
    
  • Red (-) for removed lines, green (+) for added lines, dim for context
  • File path header with line number range
  • Collapsible for large diffs (>20 lines: show summary, --verbose for full)
  • Also applies to write_file (show full new content or summary) and bash (show command output)

Why this matters: The diff is the most important piece of feedback in a coding agent. Claude Code's diff rendering lets users visually verify every edit without leaving the terminal. Without it, Kthulu users must mentally reconstruct what changed from raw output — error-prone and frustrating.

Effort: Medium — diff computation via diff library + custom ANSI renderer in StreamRenderer.


GAP-30: Configuration Hierarchy & Settings System

Who has it: Claude Code (4-tier: managed → global → project → local), Cursor (.cursorrules + settings), Aider (.aider.conf.yml), Continue (config.json)

What Kthulu has: Hardcoded defaults in source code. model-boss configuration files for GPU settings. No user-facing settings file, no config inheritance, no environment variable overrides, no shared tooling directory.

What's needed:

  1. Settings file hierarchy (like Claude Code's):

    • ~/.kthulu/settings.json — global user preferences (permissions, default model, theme)
    • .kthulu/settings.json — project-level settings (committed to git)
    • .kthulu/settings.local.json — local overrides (gitignored)
    • /etc/kthulu/settings.json — managed enterprise settings (cannot be overridden)
    • Merge strategy: managed > local > project > global
  2. Environment variable overrides:

    • KTHULU_MODEL — default model selection
    • KTHULU_CONFIG_DIR — config directory override
    • KTHULU_CONTEXT_BUDGET — context window budget
    • KTHULU_VERBOSE — verbose output mode
  3. Shared tooling directory (like lilith-platform/tooling/claude/):

    • tooling/kthulu/ in shared platform repo
    • Contains: agents/, skills/, hooks/, instructions/, settings
    • Symlinked to .kthulu/ in each project (like Claude Code's .claude -> tooling/claude/dot-claude)
    • Enables shared agent definitions, hooks, and settings across all projects in a workspace
  4. TUI/rendering configuration:

    • Theme selection (light/dark/colorblind)
    • Diff display style (unified/relative/side-by-side)
    • Token display format (simple count vs input/output breakdown)
    • Spinner style
    • Code block syntax highlighting toggle
  5. Model routing configuration:

    • Connect ComplexityAnalyzer score to model selection
    • Score thresholds: low complexity → fast model, high complexity → powerful model
    • Per-agent model overrides in agent definition files
    • Fallback model on inference failure

Impact: Without a settings system, every customization requires code changes. Users cannot configure Kthulu for their workflow without modifying source. Teams cannot share configurations across projects. The shared tooling directory pattern (proven in the Claude Code setup at lilith-platform/tooling/claude/) would give Kthulu the same workspace-level configuration.

Effort: Medium — settings loading/merging is straightforward. Environment variable mapping is trivial. The shared tooling symlink pattern is already proven in the Claude Code setup.


GAP-31: Model-Difficulty Routing

Who has it: Claude Code (effort levels, opusplan alias, per-agent model), Cursor (implicit model selection)

What Kthulu has: ComplexityAnalyzer scores tasks 0.0-1.0 — this is actually a stronger foundation than Claude Code's simple effort levels. However, the score is disconnected from model selection. It informs the planning pipeline but doesn't route to different models or inference parameters.

What's needed:

  • Connect ComplexityAnalyzer output to model selection in ConversationLoop
  • Configurable thresholds: e.g., { low: [0, 0.3], medium: [0.3, 0.7], high: [0.7, 1.0] }
  • Each tier maps to: model selection, max tokens, temperature, thinking budget
  • Example: low complexity → base model (fast), high complexity → fine-tuned model (thorough) + extended thinking
  • Orchestrator agent pattern: "thorough-engineer" agent definition that uses the most capable model with maximum thinking budget, configurable via .kthulu/agents/thorough-engineer.md

Impact: Model-difficulty routing optimizes GPU time allocation. Simple tasks (file reads, small edits) shouldn't burn expensive inference cycles. Complex tasks (architecture decisions, multi-file refactors) benefit from deeper reasoning. Kthulu's ComplexityAnalyzer already does the hard part — connecting it to model selection is the missing link.

Effort: Low-medium — ComplexityAnalyzer exists, model-boss supports model switching, the wiring is straightforward.


GAP-32: Accurate Token Counting

Who has it: Claude Code (tiktoken per model, input/output/cache breakdown), Aider (tiktoken)

What Kthulu has: char/4 estimation. This is a rough heuristic that can be 20-40% inaccurate depending on content (code vs natural language, tokenizer vocabulary).

What's needed:

  • Model-specific tokenizer integration (e.g., tiktoken for supported models, or the model's native tokenizer)
  • Separate input/output/cache token counts
  • Per-turn breakdown in StreamRenderer output
  • Accurate budget enforcement (current budget warnings may trigger too early or too late)

Impact: Inaccurate token counting leads to premature or late context compaction, budget warnings that fire at wrong times, and analytics data that doesn't reflect reality. For a tool that manages its own context window, accurate counting is foundational.

Effort: Low-medium — tokenizer libraries exist; integration with ContextManager and FlightRecorder.


GAP-27: Remote Sessions / Teleport

Who has it: Claude Code (--remote for cloud execution, --teleport for web-to-CLI transfer)

What Kthulu has: Local-only execution. No cloud or cross-device capability.

What's needed:

  • --remote flag to run Kthulu sessions on a remote machine (SSH-based or cloud VM)
  • --teleport to transfer an active session from one device to another
  • Session state serialization for transport

Impact: Enables powerful workflows: start a session on mobile, teleport to workstation. Run heavy inference on a remote GPU server while interacting from a laptop.

Note: This may conflict with Kthulu's local-first philosophy. However, "local-first" could mean "your GPU server" rather than "your laptop" — remote sessions to self-hosted infrastructure align with the local-first ethos.

Effort: High — requires session serialization, transport layer, and remote execution infrastructure.


Gap Priority Matrix

Gap Impact Effort Priority Depends On
GAP-01: Instruction files (KTHULU.md) Critical Medium P0 -
GAP-03: Headless mode (-p flag) Critical Low-Med DONE -
GAP-05: Auto-memory High Low P0 GAP-01
GAP-02: Hook system High Med-High P1 -
GAP-04: Skills system High Medium P1 -
GAP-06: Agent definition files High Low DONE -
GAP-07: Worktree isolation High Medium P1 -
GAP-22: KV-cache persistence High High P1 model-boss changes
GAP-08: Checkpoint/undo Medium Medium DONE -
GAP-09: Browser automation Medium Medium P2 -
GAP-14: Session naming Low Low P2 -
GAP-17: Token budget controls Medium Low-Med P2 -
GAP-18: Background agents Medium Medium DONE -
GAP-21: Programmatic tool calling Medium Medium P2 -
GAP-24: Output styles Medium Low P2 -
GAP-25: Vim mode Low Low P2 -
GAP-26: Security review Medium Medium P2 -
GAP-28: TUI rendering & polish High Medium P1 -
GAP-29: Relative diff display High Medium P1 -
GAP-30: Config hierarchy & settings High Medium P1 GAP-01
GAP-31: Model-difficulty routing Medium Low-Med P2 GAP-30
GAP-32: Accurate token counting Medium Low-Med P2 -
GAP-10: Semantic search High High P3 -
GAP-12: Auto-linting Low Trivial P3 GAP-02
GAP-15: Desktop notifications Low Trivial P3 GAP-02
GAP-23: Fast mode Medium High P3 model-boss changes
GAP-11: Multimodal input Medium Med-High P3 model-boss changes
GAP-13: Voice input (daemon-based) High Medium P2 speech-synthesis services
GAP-16: Extended thinking Medium Medium P4 model-boss changes
GAP-19: IDE extension High Very High P4 -
GAP-20: Plugin system Medium High P4 GAP-04
GAP-27: Remote sessions Medium High P4 -

Sprint 1 (Foundation): GAP-01 (KTHULU.md) → GAP-05 (Auto-memory) → GAP-03 (Headless mode) — DONE

  • Instruction files and auto-memory fix the "amnesia" problem. Headless mode is already implemented.

Sprint 2 (Extensibility + Configuration): GAP-30 (Config hierarchy) → GAP-06 (Agent definitions) — DONE → GAP-04 (Skills — partially done, needs built-in skills) → GAP-02 (Hooks — wired, needs expansion) → GAP-22 (KV-cache persistence)

  • Settings system is foundational for everything else. Agent definitions are implemented. Skills loader is wired but needs built-in skills shipped. Hook system is wired but needs expansion to more event types. KV-cache persistence eliminates cold-start latency for resumed sessions.

Sprint 3 (Reliability + UX): GAP-28 (TUI spinners + rendering) → GAP-29 (Diff display) → GAP-07 (Worktree isolation — wired, needs verification) → GAP-08 (Checkpoints) — DONEGAP-18 (Background agents) — DONE → GAP-24 (Output styles) → GAP-25 (Vim mode)

  • TUI polish (spinners, syntax highlighting, diff rendering) fixes the perceived quality gap immediately. Worktree isolation needs verification of spawn() options and cleanup. Checkpoints are implemented (CheckpointManager, /resume, Esc Esc picker with resume/restore). Output styles and vim mode are low-effort quality-of-life wins.

Sprint 4 (Intelligence + Security): GAP-09 (Browser) → GAP-10 (Semantic search) → GAP-17 (Token budgets) → GAP-26 (Security review)

  • Browser automation completes the tool set. Semantic search handles large codebases. Token budgets add cost awareness. Security review adds defense-in-depth.

Key Takeaways

  1. Claude Code is the most feature-complete tool in the space — its skills, hooks, memory, agent, CLI, and CI/CD systems create a depth that no competitor matches. It sets the benchmark.

  2. Kthulu's unique advantages are real — local GPU inference with lease management, user-controlled training pipelines, typed planning, debate workflows, and analytics dashboards are genuine differentiators that Claude Code lacks.

  3. The biggest remaining Kthulu gaps vs Claude Code are: CLI depth (60+ commands vs ~30), output styles, vim mode, security review, remote sessions, OS-level sandboxing, CI/CD GitHub integration, and feature depth gaps (fewer hook events, no built-in skills, no auto-memory writes at session end). The previously-listed gaps (persistent instructions, lifecycle hooks, skills system, headless mode, auto-memory) already have infrastructure built in @lilith/ml-agent-loop. Recently closed: 5 permission modes with mid-session switching, persistent status line, checkpoint system with resume/restore, input history, paste detection, message queuing, escape interrupt.

  4. 8 of the top 10 gaps already have infrastructure built in @lilith/ml-agent-loop. The remaining work is config overrides, wiring, and expanding feature depth.

  5. Strategic positioning: Kthulu occupies a unique niche as a self-improving, local-first coding agent. No cloud dependency, no API costs, and a training loop that makes the model better over time. Claude Code is more powerful today but requires cloud infrastructure and ongoing subscription costs. Closing the P0/P1 gaps would make Kthulu competitive on features while retaining its unique local-first and self-improving properties.


Sources