Loop: Run Persistent Claude Code Agents in Docker for Continuous Tasks
What It Does
Loop is an opinionated development environment that packages Claude Code agents into Docker containers with persistent memory, scheduling capabilities, and multi-platform interfaces. Unlike running claude code commands manually in your terminal, Loop creates managed agents that can handle recurring tasks, maintain conversation history across sessions, and operate through desktop, Slack, or Discord interfaces simultaneously.
The core architecture separates orchestration from execution: an Orchestrator manages messages and sessions, while a DockerRunner creates containers that run claude --print with mounted project directories. This preserves your local file paths inside the container, so agents can work on your actual codebase.
Setup
Installation is straightforward:
# macOS with Homebrew (CLI only)
brew install radutopala/tap/loop
# Or download the desktop app from Releases
# Then initialize configuration
loop onboard:global
Edit ~/.loop/config.json to enable platforms and add credentials:
{
"platforms": ["local"],
"anthropic_api_key": "sk-ant-..."
}
You can use either an Anthropic API key (pay-per-token) or a Claude Code OAuth token from your Pro/Max subscription. The desktop app provides an IDE-like interface with chat, terminal, file editor, and diff viewer.
When To Use It
Loop shines for three specific Claude Code workflows:
Scheduled Maintenance Tasks – Use the built-in scheduler to run agents on cron intervals. Example: daily dependency updates, weekly code quality scans, or hourly log analysis.
Team Collaboration Bots – Connect Loop to Slack or Discord so team members can
@mentionClaude agents for code reviews, debugging help, or documentation generation without leaving their chat platform.Long-Running Projects with Memory – Loop's SQLite database with Ollama embeddings gives agents persistent memory across sessions. This is ideal for multi-day refactoring projects where the agent needs to remember previous decisions and context.
The MCP (Model Context Protocol) server inside containers provides tools for scheduling, listing, and canceling tasks directly from Claude's interface. This creates a feedback loop where Claude can manage its own execution schedule.
Key Configuration Notes
- Loop runs on macOS or Linux with Docker Desktop (macOS) or Docker Engine (Linux)
- The daemon manages via
launchdon macOS orsystemduser services on Linux - You can run multiple platforms simultaneously:
["local", "discord", "slack"] - Project directories are mounted at their original paths inside containers, maintaining your local development environment
- Memory indexing uses Ollama for embedding generation and semantic search
This approach transforms Claude Code from a command-line tool you invoke manually into a persistent development assistant that can work autonomously on your schedule.





