An iTerm2 daemon that monitors Claude Code sessions and automatically handles prompts, permissions, and continuations using smart regex patterns.
When you run Claude Code in iTerm2, this daemon:
- Auto-approves permission prompts - When Claude asks "Do you want to allow this operation?", automatically approves safe operations
- Sends continuation commands - When Claude stops and asks "Continue?", automatically sends
continue - Answers questions intelligently - Uses smart regex patterns to handle common prompts
- Fast & Offline - No API calls, instant local responses
- Lightweight - Only requires iTerm2 Python API + aiohttp for web GUI
- Smart Patterns - Handles common Claude Code prompts intelligently
- Safe Defaults - Blocks dangerous operations (rm -rf, etc.)
- Web Control Panel - Monitor and control sessions via browser
┌─────────────────────────────────────────────────────┐
│ iTerm2 │
│ ┌─────────────────────────────────────────────┐ │
│ │ Tab 1: Claude Code Tab 2: Claude Code │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
│
│ Screen Streaming (iTerm2 Python API)
▼
┌─────────────────────────────────────────────────────┐
│ SessionManager │
│ ┌─────────────────────────────────────────────┐ │
│ │ SessionMonitor 1 SessionMonitor 2 ... │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ PatternDetector │
│ ┌─────────────────────────────────────────────┐ │
│ │ PERMISSION │ CONTINUATION │ QUESTION │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
│
┌──────────────┼──────────────┐
▼ ▼ ▼
Auto "1" Auto "continue" Smart Regex
(approve) Response
- macOS
- iTerm2 (with Python API enabled)
- Python 3.12
claudeContinue.shrequires a Python 3.12 venv namedvenvin the repo root
git clone https://github.com/jens-krypto/claude-continue.git
cd claude-continue
python3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python src/daemon.py --setupThe interactive wizard will guide you through:
- Behavior Mode - Full Auto, Semi Auto, Cautious, or Monitor Only
- Timing Settings - Response speed configuration
- Logging - Debug mode toggle
- iTerm2 Installation - Optional AutoLaunch setup
./scripts/install.sh- Install dependencies:
pip install -r requirements.txt-
Enable iTerm2 Python API:
- Open iTerm2 Preferences (Cmd+,)
- Go to "General" > "Magic"
- Enable "Enable Python API"
-
Create AutoLaunch symlink:
mkdir -p ~/Library/Application\ Support/iTerm2/Scripts/AutoLaunch
ln -s $(pwd) ~/Library/Application\ Support/iTerm2/Scripts/AutoLaunch/claude-continue- Restart iTerm2
After installation, the daemon starts automatically when iTerm2 launches. It monitors all terminal sessions for Claude Code activity.
# Run with iTerm2 integration
./scripts/run.sh
# Test without iTerm2 (pattern detection only)
./scripts/run.sh --test
# Debug mode
./scripts/run.sh --debug
# Re-run setup wizard
./scripts/run.sh --setup
# Reset config and re-run wizard
./scripts/run.sh --reset
# Run without web GUI
./scripts/run.sh --no-webThe daemon includes a web GUI for controlling sessions:
- Session Overview - See all active Claude sessions in iTerm2
- Toggle Automation - Enable/disable automation per session
- Live Settings - Change auto-approve, auto-continue, answer questions on the fly
- Action Tracking - See how many prompts have been handled per session
python src/daemon.py --no-webEdit config/config.py or set environment variables:
export CLAUDE_CONTINUE_AUTO_APPROVE="true" # Auto-approve all permissions
export CLAUDE_CONTINUE_AUTO_CONTINUE="true" # Auto-send continue
export CLAUDE_CONTINUE_ANSWER_QUESTIONS="true" # Auto-answer questions
export CLAUDE_CONTINUE_COOLDOWN="1.0" # Seconds between actionsexport CLAUDE_CONTINUE_LOG_LEVEL="INFO" # DEBUG, INFO, WARNING, ERROR
export CLAUDE_CONTINUE_LOG_FILE="~/Library/Logs/claude-continue.log"
export CLAUDE_CONTINUE_DEBUG="false" # Extra verbose loggingThe daemon requires iTerm2's Python API to be enabled:
- Open iTerm2 Preferences (Cmd+,)
- Go to General → Magic
- Check Enable Python API
- Restart iTerm2
When the daemon starts, it opens the web GUI in your browser. To reuse an existing tab instead of opening a new one:
- Open System Settings (or System Preferences on older macOS)
- Go to Privacy & Security → Automation
- Find iTerm in the list
- Enable Google Chrome ✅
Without this permission, a new browser tab will open each time.
If you encounter issues with the daemon detecting or sending keystrokes:
- Open System Settings → Privacy & Security → Accessibility
- Add iTerm to the list and enable it
claude-continue/
├── README.md # This file
├── LICENSE # GPL v3
├── requirements.txt # Python dependencies
├── config/
│ ├── __init__.py
│ └── config.py # Configuration settings
├── src/
│ ├── __init__.py
│ ├── daemon.py # Main entry point
│ ├── session_monitor.py # iTerm2 session monitoring
│ ├── pattern_detector.py # Prompt pattern detection
│ ├── smart_responder.py # Regex-based response logic
│ └── wizard.py # Setup wizard
├── web/
│ ├── __init__.py
│ └── server.py # Web GUI server (port 7777)
├── scripts/
│ ├── install.sh # Install to iTerm2
│ ├── uninstall.sh # Remove from iTerm2
│ └── run.sh # Run manually
└── tests/
├── test_pattern_detector.py
└── test_smart_responder.py
╔═══════════════════════════════════════════════════════════════════════════╗
║ ⚠️ WARNING: This software automates command execution. ║
║ You run this service entirely at your own risk. ║
╚═══════════════════════════════════════════════════════════════════════════╝
Before enabling any automation level, please understand the implications:
┌─────────────────────┬────────────────┬──────────────────────────────────────┐
│ Setting │ Risk Level │ What Could Go Wrong │
├─────────────────────┼────────────────┼──────────────────────────────────────┤
│ Auto-Approve │ HIGH │ Unintended file changes/deletions │
│ Auto-Continue │ MEDIUM │ Operations continue without review │
│ Answer Questions │ HIGH │ Wrong answers to important decisions │
│ Auto Follow-up │ MEDIUM-HIGH │ Unwanted actions in idle sessions │
└─────────────────────┴────────────────┴──────────────────────────────────────┘
What it does: Automatically presses "1" (Yes) when Claude asks for permission to run commands.
Real risks:
- Claude might delete files you didn't want deleted
- Could modify code in unexpected ways
- May execute shell commands with unintended side effects
- Git operations (commits, pushes) happen without review
When to enable: Only when working on non-critical code where you're comfortable with Claude having full autonomy. Never use on production systems.
Recommendation: Start with this OFF. Review the patterns in smart_responder.py and the dangerous command blocklist before enabling.
What it does: Sends "continue" when Claude pauses or asks if you want it to proceed.
Real risks:
- Long refactoring operations continue without checkpoints
- May continue down a wrong path without your course correction
- Resource-intensive operations run to completion
When to enable: When you trust Claude's current direction and want uninterrupted work sessions.
Recommendation: Generally safer than Auto-Approve, but review Claude's plan before enabling.
What it does: Uses regex patterns to automatically answer Claude's questions (like "Which option?" → "1").
Real risks:
- May choose wrong options for important decisions
- Could provide incorrect file names or paths
- Answers are based on simple pattern matching, not understanding
When to enable: Only for very routine tasks where the questions are predictable.
Recommendation: Keep OFF. This is disabled by default for good reason.
What it does: Sends prompts to Claude when it appears idle (e.g., "What's next?").
Real risks:
- May trigger unwanted actions when you stepped away
- Could start new tasks you didn't intend
- May confuse Claude's context
When to enable: Only during active pair-programming sessions where you're monitoring.
Recommendation: Keep OFF unless actively working.
- Start conservative - Begin with all settings OFF, enable one at a time
- Monitor the logs - Check
~/Library/Logs/claude-continue.logregularly - Use per-session controls - Disable automation for sensitive sessions via the web GUI
- Review the blocklist - Check
src/smart_responder.pyfor blocked dangerous commands - Keep backups - Use git and don't auto-approve in repos without commits
- Test first - Run with
--testflag to see pattern matching without actions
The daemon attempts to block obviously dangerous commands like:
rm -rf /and similar destructive operationscurl ... | bash(remote code execution)- SQL DROP/DELETE statements
- Fork bombs and reverse shells
- Git force pushes
However, no blocklist is perfect. Novel dangerous commands may slip through.
- Read operations:
read file.py - Edit code files:
edit main.py,edit component.tsx - Git status/diff/log
- Running tests:
pytest,npm test
rm -rf /orrm -rf ~curl ... | bash- Editing
.envfiles - SQL DROP/DELETE statements
- "Would you like me to continue?" →
continue - "Do you want to create the file?" →
yes - "Which option?" →
1
- Check if Python API is enabled in iTerm2 preferences
- Check logs:
tail -f ~/Library/Logs/claude-continue.log - Run manually:
./scripts/run.sh --debug
- Run test mode:
./scripts/run.sh --test - Check pattern detector output
- Adjust patterns in
src/pattern_detector.py
./scripts/uninstall.shThis project is brought to you by Anomaly Alpha, an AI-focused crypto project building tools and infrastructure for the intersection of artificial intelligence and blockchain technology.
We've open-sourced Claude Continue to share it with the developer community. If you find it useful, feel free to check out what else we're building.
- Website: addicted.bot
- X: @AddictedAnomaly
- Telegram: t.me/AnomalyAlpha
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GPL v3 License - see the LICENSE file for details.