Model or dataset
context-machine-lab/sleepless-agent avatar
context-machine-lab/sleepless-agent

Sleepless Agent's test target is one import, and its documented log variable is not the one it ships

🤖 24/7 AI agent that maximizes Claude Code Pro usage via Slack. Auto-processes tasks, manages isolated workspaces, creates Git commits/PRs, and optimizes day/night usage thresholds.

833 stars111 forksPythonMIT

At a glance

What is it?
A Python daemon that turns the Claude Code CLI into an always-on task runner with per-task workspaces, a SQLite queue, generated commits and pull requests, driven from Slack or a single console command. It has been quiet since March 2026, and several of its documented commands disagree with its own packaging.
Who is it for?
The architecture is the interesting part and it is competently laid out: one console entry point, one SQLite-backed queue, a workspace per task so parallel runs do not collide, and a Socket Mode Slack app that needs no inbound webhook. Two things decide whether you should run it.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 6 months ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 4, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Three releases in one week of October 2025, and a last push dated 2026-03-29

The release history is three tags and nothing since. v0.1.0 is dated 2025-10-21, v0.1.1 on 2025-10-26 with a title about an architecture overhaul and documentation, and v0.1.2 on 2025-10-27 with a title about a dependency update. The last push on the repository is dated 2026-03-29, five months after the final tag and more than six months before the current date. The package manifest still carries version 0.1.2 and still classifies the project as an alpha release, intended for developers, OS independent, on Python 3.11. Nothing in the project claims recent activity, and the gap is the honest fact to plan around if you are deciding whether to depend on it.

The news log dates its own initial release five days after the tag it names

The news section runs backwards from 2025-10-26 and reads like a build log: Claude Code Python Agent SDK integration on the 22nd, isolated workspaces on the 23rd, Git management with automatic PR creation on the 24th, task auto-generation with configurable strategies on the 25th, and on the 26th the entry announcing the initial release v0.1.0 with multi-agent workflow support. The tag named in that entry is dated 2025-10-21. v0.1.1, titled for the architecture overhaul, is itself dated 2025-10-26. So the announcement of a first release and the second release share a day, while the release it claims to announce predates the announcement by five days. The changelog and the tag history were written separately and never reconciled.

make test is a single import statement, and pytest is not a dependency

The Makefile advertises a test target and describes it as running basic tests. What it runs is one line that imports the agent class and prints a success marker. There is no tests directory at the repository root either; the top level holds the environment example, the licence, the Makefile, assets, docs, a MkDocs configuration, the Python manifest and src. The picture gets stranger in the clean target, which deletes a pytest cache directory even though pytest appears nowhere in the thirteen declared dependencies. The database target is likewise hardcoded, querying ten rows from a tasks table on a fixed path. Two more Makefile details are worth knowing before you lean on it: setup hardcodes the POSIX interpreter path ./venv/bin/pip, so it does not work on Windows, and install-service and install-launchd are advertised in the help text but absent from the .PHONY declaration.

The log level variable in the documentation is not the one in the example file

The run section tells you to raise verbosity with a variable called SLEEPLESS_LOG_LEVEL set to DEBUG, and states that logs are rendered with Rich. The shipped environment example defines something else: LOG_LEVEL set to INFO and a separate DEBUG flag set to false, with no SLEEPLESS_ prefix anywhere in the file. Set the documented variable and you may get nothing, since it is not the name the example teaches you to edit. The same file shows the pattern that works elsewhere, since the workspace and database paths are all AGENT_ prefixed: AGENT_WORKSPACE_ROOT, AGENT_DB_PATH and AGENT_RESULTS_PATH. The log settings are the only block that breaks it. Meanwhile the Makefile's logs target tails workspace/data/agent.log, a path hardcoded in the Makefile and not expressed in the environment file at all.

The troubleshooting fallback calls a module the entry point does not register

The package registers exactly one console script, named sle, pointing at sleepless_agent.__main__:main. The Windows and WSL troubleshooting section, which exists because pip may put the script directory somewhere not on PATH, offers a fallback of python -m sleepless_agent.interfaces.cli --help. That is a different module path from the one the entry point declares, so the escape hatch is written against a different layout than the one the manifest ships. The section also gives a PowerShell snippet that resolves the user scripts directory and appends it to the user PATH, and a WSL snippet that appends an export line for the local bin directory to .bashrc. Both are standard practice. The development install above them is not, because the clone step is a literal placeholder rather than a URL:

bash
git clone <repo>
cd sleepless-agent
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install -e .

The activation line carries its own Windows variant as a trailing comment, which is also only valid in a POSIX shell.

One shared git identity for every commit the daemon makes

The example environment file sets GIT_USER_NAME to Sleepless Agent and GIT_USER_EMAIL to [email protected]. Every commit the daemon produces carries that author unless you change those two lines, and Git is a stated prerequisite because of the auto-commit feature, with the gh CLI listed as optional for pull request automation. This is the practical answer to who made a given change, and the default answer is a shared agent identity rather than a person. Combine it with the autonomy model and the picture is complete: random thoughts are auto-applied without review, while serious tasks are the ones a submitter marks with a project name flag so they wait. Nobody is required to hold an account on the machine the daemon runs on for a change to land on a branch.

Socket Mode means no inbound URL, and /trash reaches the destructive path from a chat box

The Slack setup uses Socket Mode with an app token, so the daemon dials out and no public endpoint has to be exposed, which is a good choice for something that runs on a laptop overnight. The command surface is seven slash commands: think, chat, check, usage, cancel, report and trash, with trash offering list, restore and empty. Scopes requested include chat:write, commands, app_mentions:read, channel and group history for chat mode, and reactions:write for chat indicators, with message events subscribed for the same feature. usage exists to show Claude Code Pro plan usage, and the project's stated purpose is maximising that plan's consumption by spreading work across day and night thresholds. The command line equivalent of the same three actions needs no Slack app at all:

bash
# Start the daemon (no Slack needed)
sle daemon

# Queue a task
sle think "Research async Python patterns"

# Check status
sle check

Three logging libraries, two SQLite drivers, and an API key the README calls unnecessary

The dependency list names thirteen packages, all of them unpinned, with no version floor on any of them. Three of them are logging libraries: loguru, rich and structlog, while the documentation also uses Rich for log rendering, so output formatting has more than one owner. Two drive SQLite, sqlalchemy and aiosqlite, matching the stated SQLite-backed queue. And the list includes the anthropic package alongside claude-agent-sdk, even though the configuration step states in parentheses that a Claude API key is no longer needed because the tool uses the Claude Code CLI. The binary install line is a plain pip install of the published package name, and the Claude Code side is installed and authenticated separately with npm and a browser login, which means two toolchains and two credential stores for one daemon. Documentation lives outside the repository as a MkDocs site on a github.io address, with a DeepWiki link and a Discord invite in the header, and the manifest classifies the project under both communications chat and office and business topics. Installing the package itself is one line, and it needs the Claude Code CLI beside it, installed with npm and authenticated once through a browser login:

bash
npm install -g @anthropic-ai/claude-code

# Log in once (opens a browser)
claude login

Editorial conclusion

The architecture is the interesting part and it is competently laid out: one console entry point, one SQLite-backed queue, a workspace per task so parallel runs do not collide, and a Socket Mode Slack app that needs no inbound webhook. Two things decide whether you should run it. First, the blast radius. Auto-applied thoughts become commits and pull requests authored by a single shared identity taken from your environment file, and the destructive half of the queue, trash with an empty option, is one Slack command away. Second, maturity. Three releases from one week in October 2025, an alpha classifier, no test suite beyond an import check, and a last push dated 2026-03-29. If you want the idea, rebuild the review gate before you let it write to a repository you care about, and change the commit identity from the example values.

Frequently asked questions

Does Sleepless Agent require Slack?

No. Every feature is available through the sle command line, and Slack is described as an optional real-time interface. Setting it up needs an app token for Socket Mode, a bot token, and seven slash commands.

What does Sleepless Agent install?

One console command named sle, registered as sleepless_agent.__main__:main, plus the Python package itself. There are dedicated notes for the case where the Python Scripts directory is not on PATH on Windows and WSL.

How does Sleepless Agent decide whether a task needs review?

By how it was submitted. Random thoughts are auto-applied, while serious tasks are marked with a project name flag in Slack so that they are held for review instead.

Where does Sleepless Agent keep its data?

Under a workspace path relative to wherever the daemon was started, set by AGENT_WORKSPACE_ROOT, with the task database at AGENT_DB_PATH and results at AGENT_RESULTS_PATH. The example values are ./workspace, ./workspace/data/tasks.db and ./workspace/data/results.

What identity does Sleepless Agent use for git commits?

The example environment sets GIT_USER_NAME to Sleepless Agent and GIT_USER_EMAIL to [email protected], so every commit it creates carries that same author unless you change those values.

How current is the Sleepless Agent release?

The last push is dated 2026-03-29, and the three tags are v0.1.0, v0.1.1 and v0.1.2, all from October 2025. The manifest still classifies the package as an alpha release at version 0.1.2.

Official sources

  1. context-machine-lab/sleepless-agent on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/context-machine-lab-sleepless-agent.svg)](https://hysenlabs.com/projects/context-machine-lab-sleepless-agent)