Sleepless Agent is a 24/7 AI automation system that uses your Claude Code Pro subscription to process tasks autonomously. It runs as a daemon, accepts tasks via Slack, and manages isolated workspaces for parallel execution.
Most Claude Code Pro subscriptions are underutilized, especially during night hours. Sleepless Agent maximizes your subscription value by processing tasks 24/7, turning idle compute time into productive work.
- 24/7 Operation: Runs continuously as a daemon
- Slack-Native: Direct integration with your team's workflow
- Workspace Isolation: Each task runs in its own environment
- Usage Optimization: Intelligent Pro plan management
- Git Integration: Automated commits and PRs
- Python 3.11 or higher
- Node.js 16+ (for Claude Code CLI)
- 2GB RAM minimum
- 1GB free disk space
- Linux, macOS, or Windows with WSL2
No! Sleepless Agent uses Claude Code CLI, which handles authentication through your Claude Code Pro subscription. You just need to run claude login once.
Yes! The CLI interface (sle) provides full functionality without Slack. Slack integration is optional but recommended for team collaboration.
# From PyPI
pip install --upgrade sleepless-agent
# From source
cd sleepless-agent
git pull
pip install -e . --upgrade- Random Thoughts (
/think): Auto-committed tothought-ideasbranch, no review needed - Serious Tasks (
/think -p project): Creates feature branches and PRs, requires review
Each task runs in its own directory (workspace/tasks/task_<id>/), preventing conflicts and allowing true parallel execution. Tasks can only access their workspace and shared resources.
Yes! Tasks execute in parallel within isolated workspaces. The scheduler manages concurrency based on system resources and Claude usage limits.
Tasks are scheduled based on:
- Priority level (serious > random)
- Project association
- Creation time (FIFO within priority)
- Available Claude usage quota
The agent monitors usage via claude /usage and automatically pauses at configurable thresholds:
- Daytime (8 AM - 8 PM): Pauses at 20% to preserve manual usage
- Nighttime (8 PM - 8 AM): Pauses at 80% for maximum automation
- New task generation pauses
- Running tasks complete normally
- Pending tasks wait in queue
- Agent resumes after 5-hour window reset
Yes, in config.yaml:
claude_code:
threshold_day: 20.0 # Daytime limit
threshold_night: 80.0 # Nighttime limit- Via CLI:
sle check - Via Slack:
/check - In logs: Look for "Pro Usage" entries
Minimum required scopes:
chat:write- Send messagescommands- Receive slash commandsapp_mentions:read- Respond to mentions
Yes! You can add custom commands in your Slack app configuration and handle them in the bot code.
Check:
- Socket Mode is enabled in Slack app settings
- Both tokens (
xoxb-andxapp-) are correct in.env - Bot is invited to the channel
- Agent daemon is running (
sle daemon)
Invite the bot to the private channel using /invite @sleepless-agent
# CLI
sle cancel <task_id>
# Slack
/cancel <task_id>Yes, cancelled tasks go to trash and can be restored:
# CLI
sle trash restore <task_id>
# Slack
/trash restore <task_id>Task results are stored indefinitely in workspace/data/results/. You can manually clean old results if needed.
# Today's tasks
sle report
# Specific task
sle report <task_id>
# All reports
sle report --listNo, Git integration is optional. Without it, tasks still execute but won't create commits or PRs.
# Install GitHub CLI
brew install gh # or appropriate for your OS
# Authenticate
gh auth loginYes, the system works with any Git provider. Configure the remote URL in config.yaml.
- Random thoughts: Committed to
thought-ideasbranch - Serious tasks: Create feature branches like
feature/task-description - Commit messages include task metadata
- Check Claude Code CLI:
claude --version - Verify login:
claude /usage - Check usage limits:
sle check - Review logs:
tail -f workspace/data/agent.log
# Stop the daemon
pkill -f "sle daemon"
# Reset database
rm workspace/data/tasks.db
sle init- Reduce concurrent tasks in config
- Clear old task workspaces
- Check for memory leaks in custom executors
- Check system resources
- Review error logs
- Increase task timeout
- Disable problematic features
Yes! Extend the BaseExecutor class and register it in the configuration.
- Use the Python API for programmatic access
- Create custom Slack commands
- Extend the task processor
- Add webhook notifications
Yes, with separate:
- Workspace directories
- Database files
- Slack apps
- Configuration files
Yes, the Python package exposes a full API. See API Reference.
- Tasks run in isolated workspaces
- No external data transmission (except Git if configured)
- All processing happens locally
- Slack tokens are never logged
Yes, with precautions:
- Run on secure infrastructure
- Use private Git repositories
- Configure strict access controls
- Review generated code before deployment
None. Sleepless Agent:
- Runs entirely locally
- No telemetry or analytics
- No external API calls (except Claude Code and Slack)
- All data stays in your workspace
Open an issue on GitHub with:
- System information
- Error messages
- Steps to reproduce
- Log excerpts
Yes! We welcome contributions. See Contributing Guide.
Yes, Sleepless Agent is MIT licensed. See LICENSE for details.