Fix OpenClaw with Stateful Claude Code Loops

Replace OpenClaw binary with Claude Code + launchd/Tmux architecture
92% ai_automation · James Goldbach · 1m 22s · tfww
Do this: Implement JSON state checkpointing on the Contabo VPS to restore the missing 8am morning briefings, 9pm evening summaries, and Sunday weekly reviews using Claude Code instead of the broken OpenClaw binary.

Comparison to Current State

Core Proposal / Approach DIFFERENT ANGLE

Current: The existing plan proposes cloning an Agency Agents repository to OpenClaw VPS to gain multi-agent capabilities.

New: The new analysis proposes replacing the OpenClaw binary entirely with a Claude Code + launchd/Tmux architecture for 24/7 operation and Telegram integration.

The existing plan focuses on an OpenClaw *extension*, while the new analysis suggests an OpenClaw *replacement* with a fundamentally different architecture.

Problem/Solution Framing BETTER

Current: The existing plan identifies the need to expand OpenClaw to a specialized agency team to reduce development time for AIAS features and TFWW deliverables.

New: The new analysis identifies issues with the current OpenClaw binary (outdated, broken logging) and proposes a migration path that eliminates version mismatch issues by removing the binary dependency.

The new analysis addresses and solves existing critical infrastructure problems, whereas the old plan focuses on adding new capabilities without addressing underlying issues.

Technical Implementation Details BETTER

Current: The existing plan vaguely mentions configuring Backend Developer and Database Architect agents from a GitHub repository.

New: The new analysis details the use of launchd/Tmux for persistence, Telegram integration via Tmux send-key scripts, workarounds for Claude Code's 3-day loop expiration, and multimodal RAG with Gemini Embeddings 2.

The new analysis provides significantly more concrete and detailed technical implementation strategies for achieving persistent, integrated AI operations.

Core Technology / Tool DIFFERENT ANGLE

Current: The existing plan centers on using Claude Code for thumbnail generation, potentially integrating with kie.ai and Nano Banano Pro.

New: The new analysis proposes replacing an OpenClaw binary with Claude Code, run continuously via launchd and Tmux, for general AI automation and integration.

The existing plan focuses on Claude Code as a specific tool for a specific task (thumbnails), while the new analysis sees Claude Code as a foundational, continuously running AI system replacing another binary.

Problem Solved / Use Case DIFFERENT ANGLE

Current: The existing plan aims to eliminate thumbnail editor costs and increase content output velocity for DDB.

New: The new analysis focuses on addressing issues with an outdated OpenClaw binary, restoring cron job functionality, and enhancing ReelBot's knowledge base with multimodal RAG.

The existing plan addresses a specific content production bottleneck, whereas the new analysis tackles broader infrastructure, maintenance, and knowledge management challenges.

Implementation Details / Architecture BETTER

Current: The existing plan outlines creating a personal photo library and feeding it to Claude Code for 'perfect thumbnail' generation.

New: The new analysis details architectural changes like running Claude Code via launchd/Tmux, integrating with Telegram, implementing 3-day loop expiration workarounds, and using Gemini Embeddings 2 for multimodal RAG.

The new analysis provides significantly more technical depth and offers architectural solutions for continuous operation and advanced features like multimodal RAG, which could broadly enhance our AI capabilities.

Similar to: Deploy Multi-Agent Team to OpenClaw (80% overlap)
Overlap: OpenClaw specific project, AI automation focus, Optimizing existing AI infrastructure
Consider merging tasks rather than separate execution.
Eliminates the unstable OpenClaw binary dependency that's currently causing logging failures and missing cron jobs, reducing infrastructure risk and restoring 24/7 agent reliability for the Life OS system.

Migrate broken OpenClaw cron jobs to a persistent Claude Code architecture with JSON state checkpointing, then extend the embedding technique to ReelBot's knowledge base.

Business Applications

HIGH Fix broken OpenClaw agent infrastructure (general)

Migrate from OpenClaw binary to launchd+Tmux+Claude Code architecture to resolve version mismatch and logging failures. Use existing Contabo VPS (217.216.90.203) with systemd user service replaced by launchd-style persistent process.

HIGH Restore missing automation schedules (general)

Implement the config file metadata pattern to persist loop states across the 3-day Claude Code expiration, restoring morning briefings (8am), evening summaries (9pm), and weekly reviews (Sun 10am) that are currently offline.

MEDIUM ReelBot knowledge base enhancement (general)

Integrate Gemini Embeddings 2 multimodal RAG into ReelBot's existing knowledge base API (/knowledge/) to enable video/audio memory retrieval, not just text. This upgrades current similarity detection (Kimi K2.5 + Gemini Flash) to true multimodal.

MEDIUM Consolidate AI infrastructure (general)

Merge OpenClaw's Life OS functions into AIAS Express backend or Claude Upgrades workflow, eliminating the separate Contabo VPS maintenance overhead. Use Supabase for memory persistence instead of file-based RAG.

Implementation Levels

Tasks

0 selected

Social Media Play

React Angle

We should evaluate this migration path seriously given our current OpenClaw stability issues, but adapt it to use our existing Express/Telegram infrastructure rather than the Tmux hack.

Corrections
Repurpose Ideas
Engagement Hook

We actually run OpenClaw in production and have hit the exact logging/cron issues you mentioned. Have you found the Tmux send-key approach stable long-term, or do you lose sessions when Claude Code updates? Considering a hybrid approach using our existing Telegram bot infra instead.

What This Video Covers

James Goldbach - AI automation creator selling a course/community. Posts about Claude Code workflows and AI agent setups. Not a core OpenClaw contributor, offering third-party alternative architecture.
Hook: Contrarian title card 'NEVER USE OPENCLAW AGAIN' with promise to replicate features in 60 seconds
“To achieve zero latency, we actually have to hook up Telegram to a Tmux send key script that will actually type as if the user was typing into the Cloud Code terminal in Tmux”
“To get around the three-day expiration limit on loops from Cloud Code, we can just store the metadata about those loops in a config file that gets restarted every three days with our launch script”
“I'm using the new Gemini Embeddings 2 model to allow for full multimodal RAG, which I believe is an upgrade from OpenClaw”

Key Insights

Analysis Notes

What it is: A technical migration strategy to replace the OpenClaw autonomous agent binary with a custom Claude Code setup using macOS launchd, Tmux terminal multiplexing, and Telegram bot integration. Addresses OpenClaw's limitations by leveraging Claude Code's native capabilities with infrastructure workarounds.

How it helps us: Directly relevant to our current OpenClaw issues (version mismatch v2026.2.26 vs v2026.3.1, missing cron jobs, broken logging since March 2). This architecture would give us full control over the agent loop instead of relying on opaque binary updates. We already have Telegram provider running on OpenClaw (per project data) and could leverage existing ReelBot infrastructure.

Limitations: Requires rebuilding OpenClaw-specific features we use: AgentMail ([email protected]), Discord.js bot integration (@openclaude on 25 channels), multi-model routing (Kimi K2.5, MiniMax fallbacks), and the 21 workspace skills system. The 'zero latency' claim is achieved through a hacky Tmux send-key approach that may be brittle. Creator is selling a template ($$$ barrier).

Who should see this: Dylan/OpenClaw maintainer - this is a systems architecture decision about whether to migrate away from the problematic OpenClaw binary to a more maintainable Claude Code-native setup.

Reality Check

🤔 [PLAUSIBLE] "This setup is 'much more secure' than OpenClaw" — OpenClaw is a closed binary; this open architecture allows auditability. However, Tmux send-key scripts and Telegram bot integrations introduce their own attack surfaces. Commenter @santhej_official notes 'controlled permissions and modular components can significantly improve security and reliability' but this requires proper implementation.
Instead: If security is the priority, implement proper API authentication between Telegram and Claude Code rather than Tmux injection, and use our existing Supabase RLS patterns for memory storage instead of file-based RAG.
⚠️ [QUESTIONABLE] "Zero latency messaging through Tmux send-key scripts" — While technically low-latency, this is a brittle hack that simulates keystrokes. If Tmux session dies or Claude Code prompts change, the injection breaks. Commenter @jarrett.costello suggests '/remote-control' implying there may be cleaner native methods.
Instead: Use our existing ReelBot FastAPI + Telegram bot architecture with proper webhooks to trigger Claude Code via MCP or direct API calls, rather than terminal injection.
⚠️ [QUESTIONABLE] "Full replication of OpenClaw features" — OpenClaw has specific features not mentioned: AgentMail integration, multi-model routing (Kimi, MiniMax), 21 workspace skills, and Discord.js bot capabilities. This replaces the core loop but requires rebuilding the ecosystem. Creator has financial incentive (course sale) to oversimplify migration difficulty.
Instead: Hybrid approach: Keep OpenClaw for Discord/AgentMail/multi-model routing (once fixed), but migrate the broken cron/loop functionality to the proposed Claude Code + config file architecture.

Cost Breakdown →

StepPromptCompletionCost
analysis11,6852,894$0.0116
similarity1,053273$0.0003
plan7,2724,841$0.0139
Total$0.0259