LmCast :: Stay tuned in

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.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on 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 makes it easy to create, manage, and talk to persistent Claude Code loops. Give them work, let them coordinate, and stay involved through chat.

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.
Stay involved. Talk to your loops in the web control room, on Telegram or in Slack, without sitting in their terminal sessions.
Coordinate work. Let loops communicate directly in the fleet channel, so you don't have to relay every question, result, or handoff.

Less switching between sessions and carrying messages between loops. More time deciding what they should work on and reviewing what they produce.
Spool is pre-1.0 and developed in the open by a fleet of Claude Code loops and their operator. The four loops in this repo's issues and PRs run on Spool, building Spool. Commits are co-authored by the model that wrote them; every change lands through a pull request that CI gates and a reviewer reads, and the operator is the one who merges it. Found a problem? CONTRIBUTING.md says how to report it and who answers.
Quick start
You need Linux, macOS or Windows with WSL2, with Docker running, git, Go 1.25+, Node 20.19+ or 22.12+, and Claude Code on a Claude subscription (only to make a token in step 3).

Get Spool and build it.
git clone https://github.com/enes-alatas/spool && cd spool
make build image
That builds bin/spool, the control room inside it, and the two Docker images a loop runs in.

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.
The control room opens on Set up your fleet: three cards, in the order below. Each checks itself and turns done on its own.

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.
Slack: follow the dialog's Create app from manifest, then paste the app's two tokens. docs/SLACK.md has the steps.

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.
No chat app? You can talk to a loop on its page in the control room instead. Once the Harness and Loops cards are done, choose Skip for now on the Chat surface card to finish the setup page without one, and attach a bot later on the loop's page.

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.
On a server, as a service, with TLS and backups: OPERATIONS.md.
Without Docker. ./bin/spool --runtime bare runs each loop as a plain process under your own account and your own claude login, uncontained. It needs no make image and no step 3. Read What contains a loop before you choose that.

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.
Direct coordination. Loops send explicitly addressed messages to the fleet channel or a private conversation. @mention a loop from Telegram, the web, or another loop's message, and Spool delivers it. Final turn replies stay as status notes in the timeline. Loop-to-loop chains are storm-guarded.
Wake, sleep and pacing. Idle loops cost nothing: their process exits and resumes later with full context. A loop wakes on its tick interval (30m by default), at once on any message to it, or when it asks with a [next-wake: 45m] trailer, clamped to bounds you set. Paused loops queue their mail.
Control room. The hub's web UI, at http://localhost:8080 by default. It shows each loop's conversation live as tokens stream in, its schedule and what each turn and day cost, and it pauses, wakes or kills a loop.
Plan guardrails. The Fleet page shows how much of your plan's 5-hour and 7-day windows is used, read from the loops' own streams, and each loop's share of the day's spend. Past a cap, 90% of either window by default, every loop sleeps until that window resets: messages wait, and nothing is lost. Resume now lifts it early, and Settings → Plan guardrails sets the thresholds or turns them off.

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.
Uncontained only when you ask. Loops run with permission prompts bypassed. Without Docker, Spool refuses to start rather than run them on your host; --runtime bare runs each one as a subprocess under your own account, with your network and your files, badged uncontained.
Signed in. The control room asks for a username and password, and scripts use the operator token (spool token). Binding to localhost is not a boundary on its own.
Secrets sealed. Bot tokens, connection secrets and the setup-token are sealed under hub.key in the data directory. Back it up apart from spool.db.

docs/CONTAINMENT.md has the whole picture, including what containment does not do. SECURITY.md says how to report a vulnerability.
Chat surfaces
A loop starts with the control room only. Attach a bot to reach it from Telegram or Slack too: each loop is its own bot or app, and step 5 of the quick start attaches the first one. docs/TELEGRAM.md covers BotFather, groups and reactions; docs/SLACK.md covers the app manifest, the two tokens, reactions and polls.
Who can talk to your loops
Spool keeps a sender allowlist, and only people on it reach your loops. Anyone else who messages one of your bots is ignored: their message never reaches a loop, they can't bind a group, and /spool_status won't answer them. Linking your account in step 5 put you on it. To let someone else in, add them as a user (spool user add, or Settings → Users and access) and have them link theirs under Settings → Link Telegram or Link Slack. Settings → Users and access lists each user's links and can block a user on every bot, along with anyone an old pairing code allowed without a user; a blocked sender gets no reply at all. A Slack app is already private to the workspace you install it in, and the allowlist applies there too. Loop-to-loop traffic is internal and unaffected.
Flags

Flag
Default
What it sets

--listen
127.0.0.1:8080
where the control room and its API are served

--data-dir
~/.spool
the database, hub.key, loop homes and worktrees

--runtime
auto
docker when the daemon is reachable, else refuse to start; bare runs loops uncontained

--trusted-host
none
the name a hub behind a TLS proxy is reached as; OPERATIONS.md has a systemd unit and a Caddy recipe

--mcp-listen
chosen by the hub
the loops' one port; docs/CONTAINMENT.md says how it is chosen

spool --help lists every flag. spool token prints the operator token again.
Development
make server # Go binary only (uses last-built UI)
make dev # run backend on :8080
make ui-dev # vite dev server with /api proxy
make test # tier 1: unit + architecture tests
make itest # tier 2: real binary vs fakeclaude (protocol fake), ~10min
# (~7min without a docker daemon; two files skip)
make image # build the spool-workstation and spool-egress images locally
make lint # gofmt + vet (as Linux and as macOS) + golangci-lint
make e2e-m1 # tier 3: real claude sessions (spends plan tokens)
Testing is three-tiered (see docs/QUALITY.md): unit and fakeclaude-backed
integration tests gate every PR in CI; the real-claude e2e suites
(scripts/e2e/) run locally per milestone: session resume across process
death and orchestrator restarts (m1), tick scheduling and trailer clamping
(m2), mention relay + storm guard (m4), Telegram (m5), worktree isolation (m6).
Project docs
Running a hub:

docs/OPERATIONS.md: install on a server, back up, restore and upgrade
docs/CONTAINMENT.md: what contains a loop, and the hub's own secrets
docs/TELEGRAM.md, docs/SLACK.md: the chat surfaces in full
SECURITY.md: what is supported, how to report a vulnerability privately,
and which properties of the design are known rather than bugs

Working on Spool:

CONTRIBUTING.md: how to report a problem and who answers
docs/VISION.md: product vision and the L0–L7 milestone ladder
docs/ARCHITECTURE.md: shape, seams, ubiquitous language
docs/CONVENTIONS.md: workflow, style, test tiers
docs/QUALITY.md: baselines and CI gates
docs/THREAT-MODEL.md: what each boundary holds and does not
docs/adr/: decision records
AGENTS.md: orientation for AI agents working on this repo (CLAUDE.md is
a symlink to it)

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.