← Back to Leaderboard
Scontext-machine-lab

context-machine-lab/sleepless-agent

A self-hosted daemon that queues Claude Code tasks and hands off changes in Git.

Engineering Health (Methodology)
B · 53/100
Maintenance Activity
● Updated 8mo ago
Latest Release
v0.1.2
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance6/35
Fork Adoption16/25
Release Cadence11/20
License Clarity20/20
Self-HostedCLI
Total Stars
★ 843
24h Growth
+0
7d Growth
+3
Forks
111

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

context-machine-lab/sleepless-agent Star History (2025-10-20 - 2026-12-04) ALL-TIME STAR HISTORY (2025-10 – 2026-12) +842 in 410d · avg +2/day 890 445 0 2025-10-20: ★ 12025-11-15: ★ 3442025-12-13: ★ 4322026-01-10: ★ 7532026-02-07: ★ 7792026-03-07: ★ 7912026-04-04: ★ 7992026-05-02: ★ 8082026-05-30: ★ 8122026-06-27: ★ 8162026-07-25: ★ 8172026-08-22: ★ 8202026-09-19: ★ 8242026-10-17: ★ 8292026-11-11: ★ 8362026-12-04: ★ 843 ★ 843 2025-10 2026-05 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Sleepless Agent is a self-hosted Python daemon with two front ends: the sle CLI and an optional Slack app using Socket Mode. Task submissions go into a persistent SQLite queue. The daemon event loop schedules work, the Python Agent SDK drives the Claude Code CLI in per-task workspaces, and the result manager saves outputs and metadata. Git automation handles commits and, when configured, pull requests. Threaded Slack chat is a separate interactive path that can read and edit files in a project workspace.

The package requires Python 3.11+ and lists anthropic, slack-sdk, sqlalchemy, aiosqlite, python-dotenv, PyYAML, and gitpython among its dependencies. Persistent state includes tasks.db, results, reports, logs, and metrics under workspace/data/; task and project workspaces live separately. The integrations are Slack Socket Mode and the Claude Code SDK/CLI path. This is not a documented MCP server, plugin interface, or provider-neutral model router.

Key Capabilities & Differentiators

The dividing line between lightweight and reviewable work is explicit: sle think captures an idea, while -p assigns a task to a project. Ideas are auto-committed to thought-ideas; project work uses feature branches and can be handed off as a PR. The Planner, Worker, and Evaluator stages can be enabled independently and each defaults to a maximum of three turns. The supported execution backend is Claude Code; there is no documented model matrix or alternate backend.

The scheduler checks usage through claude /usage. Defaults are a 96% night threshold from 01:00 to 09:00 and a 95% daytime threshold. At the threshold, automatic task generation pauses, pending work waits, and active work finishes; execution resumes after the usage reset. These thresholds govern scheduling, not hard spending or usage caps. sle check, sle usage, and sle report expose operating state and results. Slack chat retains conversation history within a dedicated thread and times out after 30 minutes of inactivity.

Trade-offs & Limitations

Compared with opening Claude Code directly, this wrapper adds unattended scheduling, durable task state, and a Git-based handoff, at the cost of another long-running process and more credentials to manage. Compared with a conventional CI workflow, it is better suited to open-ended work submitted in natural language. CI is the better fit for repeatable checks with explicit steps and pass/fail criteria; keep those checks on the PRs the agent produces.

SQLite simplifies deployment, but the documented design is a local daemon, not a demonstrated multi-node worker service. Separate workspaces reduce file collisions but are not evidence of a security sandbox. At this alpha stage, start with trusted users and a narrowly scoped repository, restrict Slack access and Git write permissions, and enforce review on protected branches. The Evaluator stage does not replace those controls, and the scheduler's reliance on Claude Code usage reporting makes that integration an operational dependency.

Hardware & Deployment Guide

Install sleepless-agent in a Python 3.11+ environment, install the Claude Code CLI via npm with Node.js, authenticate with claude login, and start sle daemon. Git supports automatic commits; gh is optional for PR automation. A CLI-only setup needs no Slack credentials. To add Slack, enable Socket Mode, configure commands and any chat events you need, and provide the bot and app tokens through .env or the process environment. Configure the remote repository before enabling remote Git automation.

Self-hosting covers the daemon and its local state, not model inference. This path still needs access to Claude, but it does not require a separate Claude API key. Run it on a host that can stay up and preserve its workspace and database across restarts; size CPU, memory, and disk for concurrent sessions and any builds or tests they invoke. Release v0.1.0 published the package on PyPI, v0.1.1 was an architectural and documentation overhaul, and v0.1.2 added requests as a dependency.

Execution flow: Slack and sle feed a persistent SQLite queue; a Python daemon runs Claude Code tasks and stores results.
Usage scheduling: Configurable day and night thresholds default to 95% and 96%; pending work waits at the threshold while running tasks finish.
Task separation: Parallel tasks get separate workspaces; ideas are committed to thought-ideas, while project tasks use feature branches and can open PRs.
Workflow control: Planner, Worker, and Evaluator can each be disabled or assigned a turn limit; the defaults are three turns per stage.
Slack integration: Socket Mode supports slash commands and threaded chat with workspace file edits and a 30-minute idle timeout.
Operations: sle check, sle usage, and sle report expose queue health, plan usage, and task results; database and results paths can be overridden.
Best For

Individual developers and small teams already using Claude Code who want to queue trusted, non-urgent work and review the results in Git later.

Skip If

You require offline inference, interchangeable model backends, a shared multi-node worker service, or sandboxed execution of tasks from untrusted users.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Self-HostedCLI
pip install sleepless-agent

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
sleepless-agent ★843+3PythonMITA self-hosted daemon that queues Claude Code tasks and hands off changes in Git.
oh-my-pi40.5k+483TypeScriptMITA Bun/Rust terminal agent for model-flexible coding with LSP and editor integrat
gemini-cli109.6k+376TypeScriptApache-2.0A Node.js terminal agent for enterprise Gemini coding workflows and MCP tools
goose57.3k+219RustApache-2.0Rust coding agent with MCP tools and local or hosted models, embeddable via ACP

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/context-machine-lab/sleepless-agent.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

context-machine-lab/sleepless-agent Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about sleepless-agent

How do the CLI, Slack, and Claude Code fit together?

Use sle to submit and inspect queued work without Slack. If you want Slack commands or threaded chat, configure a Slack app in Socket Mode and supply SLACK_BOT_TOKEN and SLACK_APP_TOKEN. Task execution goes through the Python Agent SDK and an authenticated Claude Code CLI; this setup does not require a separate Claude API key.

Does it need a GPU, and what drives host resource usage?

No local GPU or VRAM requirement is specified for this Claude Code orchestration path. Size the host for the number of concurrent Claude Code sessions and the commands they invoke: builds and tests can drive CPU and RAM usage, while workspaces, results, and logs consume disk. Start with a small workload and measure it on your own repositories.

Can a company self-host it for commercial use?

The MIT license permits commercial use and self-hosting; retain the copyright and license notices when redistributing the software. That license does not govern Claude or Slack. Separately verify service terms, what code and prompts may leave the host, which Slack channels are in scope, and what repositories the agent's credentials can write to.

When is this preferable to using Claude Code directly?

Use Claude Code directly when a developer is present to steer the session and review changes as they happen. Add Sleepless Agent when tasks arrive asynchronously and you need a persistent queue, usage-aware scheduling, stored results, and a PR handoff. Keep deterministic checks in CI; an agent evaluator is not a substitute for tests or required reviews.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining context-machine-lab/sleepless-agent? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature context-machine-lab/sleepless-agent on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare