How I manage persistent Claude Code loops: Spool
Recorded: Oct. 14, 2026, 11:10 p.m.
| Original | Summarized |
GitHub - enes-alatas/spool: fleet of persistent Claude Code coworkers you talk to in Telegram and Slack. Each in its own container, on your own plan without API costs. · GitHub Skip to content Navigation MenuSign inAppearance settingsPlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub Copilot appDirect agents from issue to mergeMCP RegistryIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesCode QualityEnforce quality at mergeAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricingSearch/Sign inSign upAppearance settings You signed in with another tab or window. Reload to refresh your session. Dismiss alert enes-alatasspoolRepository navigationCodeIssues28 (28)Pull requests3 (3)ActionsProjectsSecurity and qualityInsightsMore items spoolPublicNotificationsYou must be signed in to change notification settingsFork0 (0)Star8 (8)You must be signed in to star a repositoryAbout fleet of persistent Claude Code coworkers you talk to in Telegram and Slack. Each in its own container, on your own plan without API costs.Topicsai-agentsclaude-codegomulti-agentself-hostedslack-bottelegram-botResourcesReadmeApache-2.0 licenseContributingContributingSecurity policySecurity policyActivityStars8 starsWatchers0 watchingForks0 forksReport repositorymainBranchesTagsGo to fileCodeOpen more actions menuLatest commit History748 Commits748 CommitsFolders and filesNameNameLast commit messageLast commit date.claude/skills.claude/skills .github.github cmdcmd dockerdocker docsdocs internalinternal itestitest scriptsscripts webweb .editorconfig.editorconfig .gitignore.gitignore .golangci.yml.golangci.yml AGENTS.mdAGENTS.md CLAUDE.mdCLAUDE.md CONTRIBUTING.mdCONTRIBUTING.md LICENSELICENSE MakefileMakefile README.mdREADME.md SECURITY.mdSECURITY.md go.modgo.mod go.sumgo.sum View all filesRepository files navigationREADMEContributingApache-2.0 licenseSecurityMore items Your Claude Code loops, working together and keeping you in the conversation. spool-demo.mp4 What does Spool make easier? Keep work going. Create and manage persistent loops in one place, with scheduled wakes and resumable sessions. Less switching between sessions and carrying messages between loops. More time deciding what they should work on and reviewing what they produce. Get Spool and build it. Start it and sign in. Run ./bin/spool. On its first start it prints a one-time password for the user admin. Open http://127.0.0.1:8080, sign in as admin with that password, and choose your own. Missed the password? ./bin/spool user reset admin prints a new one. Harness. Run claude setup-token, then choose Add token on the card and paste what it printed. Your loops run on your Claude plan through it. Loops. Choose New loop, and give it a name and a mission. Its first wake builds its workstation, which takes a minute or two the first time; the card is done when that wake's first turn ends. Chat surface. Choose Attach a bot, then Attach Telegram or Attach Slack. Telegram: send @BotFather /newbot in Telegram, and paste the token it gives you. Then choose Get a link code, send the code to your bot in a direct message, and reply YES when it asks. That links your account and makes you the loop's owner. Message the bot once more: the card is done when the loop answers you there. Other ways to run it From a release, once there is one after v0.5.1: it carries the built binary and the images, so you need no Go, Node or make. OPERATIONS.md shows the download, the checksum and the image pulls. How it works Plain claude CLI underneath. Loops are claude subprocesses speaking stream-json over stdin/stdout. Your normal Claude Code login, plan and session limits apply. No API keys, no SDK. Security in brief Contained by default. Each loop runs in its own container with an egress allowlist (Settings → Egress) and no route to your machine but one hub port, which serves the loops' MCP endpoint and nothing else. docs/CONTAINMENT.md has the whole picture, including what containment does not do. SECURITY.md says how to report a vulnerability. Flag --listen --data-dir --runtime --trusted-host --mcp-listen spool --help lists every flag. spool token prints the operator token again. docs/OPERATIONS.md: install on a server, back up, restore and upgrade Working on Spool: CONTRIBUTING.md: how to report a problem and who answers About fleet of persistent Claude Code coworkers you talk to in Telegram and Slack. Each in its own container, on your own plan without API costs.Topicsai-agentsclaude-codegomulti-agentself-hostedslack-bottelegram-botResourcesReadmeApache-2.0 licenseContributingContributingSecurity policySecurity policyActivityStars8 starsWatchers0 watchingForks0 forksReport repositoryReleasesPackagesUsed byContributorsLanguages Footer © 2026 GitHub, Inc. Footer navigation Terms Privacy Security Status Community Docs Contact Manage cookies Do not share my personal information You can’t perform that action at this time. |
The spool project establishes a framework for managing a fleet of persistent Claude Code coworkers, designed to facilitate collaborative work through communication channels like Telegram and Slack, with the added benefit of avoiding API costs for the agents themselves. The primary goal of spool is to simplify the creation, management, and interaction with these autonomous code loops, allowing them to coordinate tasks and maintain context across sessions. Spool addresses the inefficiency of traditional workflow management by enabling persistent loops to remain active through scheduled wakes and resumable sessions, ensuring continuous progress on complex tasks. This persistence, coupled with a centralized control room interface, allows operators to monitor the activity, schedule, pause, wake, or terminate individual loops without needing to engage directly with their terminal sessions. Furthermore, the system promotes efficient coordination by allowing the loops to communicate directly within a shared fleet channel, thereby eliminating the need for constant manual relaying of results or handoffs between separate sessions, which significantly reduces context switching overhead for the user. The operational setup for spool requires specific technical prerequisites, including a Linux, macOS, or Windows environment utilizing WSL2, Docker, git, and specific versions of Go and Node. The initial deployment involves cloning the repository, building the necessary images, and running the core system. The process involves initializing the system with a one-time password and configuring the control room. The setup guides detail connecting the system to Claude via a setup token and configuring chat surfaces, either for Telegram or Slack integration, which links the loops to external communication platforms. The underlying mechanism involves a plain Claude command-line interface, where the loops operate as subprocesses communicating via stream-json over standard input and output. This interaction operates under the normal plan and session limits associated with the user’s Claude subscription, without requiring explicit API keys or SDKs. Spool implements sophisticated pacing controls, allowing idle loops to pause and resume later with their full context, waking up based on defined time intervals or explicit requests, which feature idle loops at no cost. Central to the management of the fleet is the control room web user interface, accessible at http://localhost:8080 by default. This hub provides a live view of each loop’s ongoing conversation streams, scheduling information, cost allocation across different windows, and the ability to perform control actions such as pausing or resuming loops. The system incorporates plan guardrails that monitor usage against defined time windows, automatically pausing loops if usage approaches predefined caps, thus managing resource consumption proactively. Security is integrated as a fundamental design principle. By default, each loop runs in its own container, enforcing containment through egress allowlists and restricting network access solely to the hub port serving the MCP endpoint. This approach limits exposure and ensures that loops operate within defined boundaries. The system incorporates robust access control, requiring users to sign in to the control room, and secrets, such as bot tokens and configuration keys, are sealed within the data directory. The sender allowlist mechanism further restricts communication, ensuring that only explicitly authorized users can interact with the looping agents, and users can manage access permissions for others. The project is structured with extensive documentation detailing all aspects of operation, architecture, and security. Operational procedures cover server installation, backup, and restoration, while documentation on containment, security reporting procedures, and the specific implementation of the chat surfaces for Telegram and Slack are provided. Development workflows are tiered, supporting unit and integration testing, including end-to-end testing that validates session resumption and orchestrator restarts, ensuring quality and reliability throughout the agent lifecycle. The system also provides different runtime options, including a bare execution mode that runs loops uncontained as subprocesses, depending on the user's operational requirements. |