Your Claude Code resident assistant β running 24/7 on your Mac via remote computer use.
No bot middleman. No subprocess overhead. Claude works directly in your workspace and sends you Telegram notifications when it's done.
Independent project. Not affiliated with or endorsed by Anthropic.
Most AI tools start fresh every session. No memory of who you are, what rules you've set, what worked last time. You repeat yourself. They make the same mistakes.
That's not an AI problem. It's a brain structure problem.
Koda runs a 7-layer persistent memory architecture:
| Layer | What it stores | How long |
|---|---|---|
| 1. Identity Profile | Your name, rules, tone, operator config | Permanent β injected every session |
| 2. Short-Term Memory | Recent conversation context | Last 3 days, last 12 entries |
| 3. Long-Term Memory | Rules, strategies, client info, patterns | 30 days, auto-promoted |
| 4. Monthly Rollup | Compound summary of long-term entries | Forever β never deleted |
| 5. Semantic Embeddings | Every conversation as a 3072-dim vector | Up to 20,000 entries, semantic search |
| 6. Workspace Files | Brand, operator config, daily logs, projects | Survives crashes and restarts |
| 7. Background Pulse | Auto-prune, compact, detect patterns | Every 12 hours, 6amβ11pm only |
On top of memory, every message is routed intelligently before execution β direct chat, read-only lookup, exploration, or full worker mode β so the right model handles the right task every time.
The longer you work with it, the smarter it gets about you specifically. Rules set once stay set. Clients mentioned get remembered. Patterns from months ago surface when relevant.
- Runs Claude Code as a resident assistant on your Mac, always available via Claude.ai remote computer use.
- You open the Claude.ai app and watch the work happen live β no command routing, no subprocess spawning.
- Handles coding tasks, browser automation, research, content generation, social posting, and repeatable operations directly.
- Sends Telegram notifications when tasks complete, errors occur, or something needs your attention.
- Keeps durable memory (short-term, long-term, monthly summaries) so context carries across sessions.
- Calls fast/cheap LLMs (Gemini, Groq, Cerebras, OpenRouter) for aux tasks β embeddings, drafts, classification β while keeping final quality on Claude Opus 4.6.
- Generates visual artifacts (infographics, video, slides, images) via browser-first workflows using Comet.
- Logs all meaningful work to Notion (Execution Log, Memory Bank, Learning Ledger).
Most AI bots are wrappers: you type a command, a subprocess spawns, output streams back to chat. That is slow by design.
Claudeking flips it:
- Claude Code runs natively β no spawn overhead, no subprocess latency.
- You watch it work β open the Claude.ai app, see every tool call and edit live.
- Telegram is a notification rail β it pings you when done, not a command interface.
- Mac is always on β 24/7 availability. Pick up any task anytime.
- Multi-model speed β Claude Haiku/Sonnet for fast tasks, Gemini Flash for cheap aux, Groq for ultra-low latency, Opus for quality.
- Founders and operators who want a Claude Code setup that works while they sleep
- Builders who need browser automation + code execution in one runtime
- Anyone tired of babysitting a bot and waiting for subprocess round-trips
- Operators who care about proof, logging, and recoverable workflows
- Resident Claude Code β native tool execution, no subprocess overhead
- Remote computer use β Claude.ai app connects to your Mac and works directly
- Multi-model speed layer β Haiku, Gemini Flash, Groq, Cerebras for fast/cheap aux tasks
- Gemini embeddings β
gemini-embedding-001(3072-dim) for semantic memory recall - Telegram notifications β task complete pings, error alerts, scheduled reminders
- Notion-backed operational memory:
Execution LogMemory BankLearning Ledger- optional
Cron Jobs
- Rotating memory:
- short-term
3 days - long-term
7 to 30 days - monthly summary rollups
- short-term
- Visual artifact generation β infographic, video, slides, image via browser-first workflows (Comet)
- Social posting β X + LinkedIn via API (tweepy + LinkedIn REST v2)
- Live Command Center β
/dashboardfor real-time runtime state
git clone https://github.com/SamDev1303/claudeking.cloud.git
cd claudeking.cloud
npm install
cp .env.example .env
# Fill in your keys, then:
npm run devThe Telegram bot handles outbound notifications. The main interface is Claude.ai (remote computer use) pointed at this workspace.
Type-check:
npm run typecheckBuild:
npm run buildRun (production):
npm run start:resilientKey env vars (see .env.example for the full list):
# Core
TELEGRAM_BOT_TOKEN= # Outbound notifications
ALLOWED_USER_IDS= # Your Telegram user ID
BRAIN_MODEL=claude-opus-4-6
WORKER_MODEL=claude-sonnet-4-6
# Speed helpers (aux tasks)
GOOGLE_AI_KEY= # Gemini Flash + gemini-embedding-001
GROQ_API_KEY= # Llama 4, ultra-low latency
CEREBRAS_API_KEY= # Fastest inference
# Memory
NOTION_API_KEY=
NOTION_DAILY_LOG_DB_ID=
NOTION_MEMORY_BANK_DB_ID=
NOTION_LEARNING_LEDGER_DB_ID=
# Social
X_API_KEY=
X_ACCESS_TOKEN=
LINKEDIN_ACCESS_TOKEN=
LINKEDIN_PERSON_URN=- Claude Code runs natively on the operator Mac β no subprocess spawning.
- Anthropic subscription powers the resident assistant (Claude Opus 4.6 for quality, Sonnet 4.6 for speed).
- Aux tasks (embeddings, drafts, classification, formatting) delegate to Gemini, Groq, Cerebras, or OpenRouter.
- Telegram is outbound-only. It does not accept commands. Use the Claude.ai app for that.
- Browser work uses Comet (Perplexity Chromium) at
http://localhost:9222via CDP. - Visual artifact generation has no non-visual fallback. If browser/CDP is unavailable, the run stops and reports the blocker.
- Memory is profile-first: user identity, core rules, stable preferences. Task/build churn is not promoted.
Pulseis the memory/logging cadence (default: 12-hour intervals).- Notion logging is mandatory for meaningful tasks.
scripts/notion_logger.pyis the lightweight timestamped logger.
One of Claudeking's capabilities is Claude calling Codex CLI as a worker subprocess β a CLI chaining pattern where Claude orchestrates and Codex executes.
# Claude can dispatch execution tasks to Codex directly
node scripts/codex-worker.mjs --task "Refactor the auth module to use JWT"
node scripts/codex-worker.mjs --task "Write tests for src/utils/parser.ts" --model sparkWhat makes this powerful:
- Codex reads
CLAUDE.mdautomatically β no context repetition needed - Claude stays clean for orchestration while Codex handles file-heavy execution
- Output streams in real time; Telegram notification fires on completion
- Runs
gpt-5.3-codex(ChatGPT Plus OAuth) orgpt-5.3-codex-sparkfor lighter tasks - Full file system access with
workspace-writesandbox policy
This is not a subprocess hack β it is deliberate AI-to-AI delegation. One model handles strategy, another handles execution. The right tool for the right layer.
# Direct invocation (no wrapper needed)
~/.nvm/versions/node/v22.16.0/bin/codex exec \
--model gpt-5.3-codex \
--skip-git-repo-check \
-s workspace-write \
"Index all skills and write a summary to claudeking/brain/SKILLS.md"- Resident Claude Code execution with native tool use
- Codex CLI worker β Claude dispatches execution tasks to
gpt-5.3-codexviascripts/codex-worker.mjs - Multi-model speed layer: Haiku, Gemini Flash, Groq, Cerebras, OpenRouter
- Gemini semantic embeddings for memory recall (
gemini-embedding-001, 3072-dim, 100 RPM free tier) - Telegram outbound notification layer
- Structured memory profiles in
data/memory/profiles/ - Active memory compaction, long-term promotion filters, and monthly summaries
- Notion Execution Log, Memory Bank, Learning Ledger, optional Cron Jobs
- Pulse scheduler for memory compaction and safe cron pickup
- Lightweight timestamped Notion logger at
scripts/notion_logger.py - Live Command Center at
/dashboardwith SSE + hosted snapshot sync - Visual artifact generation via Comet browser (infographic, video, slides, image)
- Social posting: X (OAuth 1.0a + media upload) + LinkedIn (REST v2)
- Secret redaction before any output
- Structured audit logging
When the runtime contract changes, update these together:
README.mdCLAUDE.mdβ single source of truthAGENTS.mdβ bootstrap pointer onlydocs/FIRST_TRIAL_RUN.md- relevant
skills/*/SKILL.md public/index.htmlβ user-facing product copy
These Telegram commands are available for status checks and manual triggers:
/setupβ bootstrap user identity and memory/modelβ show current model/modeβ show execution mode/dashboardβ expose live Command Center URL/statusβ runtime status/stopβ cancel running task/selfhealβ attempt recovery/restartβ restart runtime/helpβ command list
claudeking.cloud/
βββ src/ TypeScript source (compiled to dist/)
β βββ index.ts Entry: boot, auth check, Telegram polling
β βββ config/ Config modules
β β βββ runtime.ts Model defaults, Notion IDs, timeouts
β β βββ telegram.ts Bot token, user whitelist, rate limits
β β βββ paths.ts Workspace / memory / identity dir resolution
β β βββ defaults.ts Constants (claude-opus-4-6, claude-sonnet-4-6)
β β βββ helpers.ts Env parsers, binary path finder
β βββ telegram/
β β βββ messages.ts Message handler β route β Claude β Telegram stream
β β βββ commands.ts /setup /model /mode /status /cancel /recall /help β¦
β β βββ handler.ts grammy operator, auth guard, rate limiter, error boundary
β β βββ middleware.ts Output redaction, auth whitelist
β β βββ sender.ts StreamingSender: one message, edit-in-place across phases
β β βββ media.ts Download/upload Telegram media
β βββ claude/
β β βββ client.ts Spawn Claude CLI, NDJSON stream, stall escalation
β β βββ session.ts SessionManager: resume, brain hot-session, disk persistence
β β βββ spawn-mode.ts SpawnMode = "run" | "session" type
β β βββ sandbox.ts SANDBOX_READONLY/FULL/BROWSER policies + applyPolicy()
β β βββ prompt.ts System prompt builder (personality + memory injection)
β β βββ parser.ts NDJSON event parser (thinking, text, tool_*, result, error)
β β βββ types.ts ClaudeEvent, ClaudeRequestOptions interfaces
β βββ memory/
β β βββ store.ts CRUD: events (JSONL) + snapshots (Markdown)
β β βββ profile.ts Per-user profiles (name, tier, prefs)
β β βββ embeddings.ts Semantic recall: Gemini embeddings, cosine similarity, auto-prune
β β βββ journal.ts Execution logs, learning events, manual notes
β β βββ sessions.ts Claude session resume state
β βββ models/
β β βββ router.ts Classify: direct_chat | direct_readonly | worker_required | exploration
β β βββ providers.ts External LLMs (Gemini, Groq, Cerebras, xAI, OpenRouter β¦)
β β βββ aux-router.ts Delegate aux tasks to fast/cheap models
β βββ runtime/
β β βββ types.ts Core enums: RoutingClass, ExecutionMode, BackendId, MemoryKind
β β βββ backends.ts Backend adapter factory
β β βββ dashboard-server.ts SSE server for live command center (127.0.0.1:8787)
β β βββ dashboard-store.ts In-memory dashboard state
β β βββ pulse.ts Cron scheduler (Notion-backed optional)
β β βββ heartbeat-policy.ts Background maintenance schedule
β βββ integrations/
β β βββ notion-daily-log.ts Execution Log, Memory Bank, Learning Ledger writes
β β βββ hostinger-mail.ts SMTP outbound (primary)
β β βββ resend-mail.ts Transactional email via Resend API
β β βββ social-poster.ts X/Twitter + LinkedIn via API
β β βββ voice-actions.ts Twilio calls/SMS + ElevenLabs TTS
β βββ utils/
β β βββ logger.ts Structured logging (INFO/WARN/ERROR/DEBUG)
β β βββ guard.ts Secret redaction before Telegram output
β β βββ env-secrets.ts Load from ~/.claude/env/ (shared, personal, client)
β β βββ run-queue.ts Sequential execution queue per chat
β β βββ buffer.ts Ring buffer for streaming chunks
β βββ browser/cdp.ts Chrome DevTools Protocol connector (Comet at :9222)
βββ skills/ Agent skill playbooks (SKILL.md per skill)
β βββ 00-skill-creator/ Scaffold new skills
β βββ 01-strategy-check/ Pre-task strategy validation
β βββ 05-code-build/ Build + test execution
β βββ 08-notion-logger/ Structured Notion logging
β βββ 09-media-generator/ Image/video/audio generation workflows
β βββ 11-playwright-cdp-debug/ Browser automation debugging
β βββ 12-self-learning/ Self-improvement + lesson promotion
βββ scripts/ Standalone tools
β βββ notion_logger.py Lightweight Notion logger
β βββ post-to-x.py X/Twitter posting (tweepy, OAuth 1.0a)
β βββ post-to-linkedin.py LinkedIn posting (REST v2)
βββ public/ Static landing page (Vercel)
β βββ index.html
βββ claudeking/ Generated output (gitignored)
βββ data/ Runtime memory + embeddings (gitignored)
βββ CLAUDE.md Home base config β single source of truth
βββ AGENTS.md Bootstrap pointer only
βββ .env Secrets (gitignored)
