Claude Autopilot
repository·main·Indexed 42 days ago
https://github.com/benbasha/claude-autopilotA VS Code and Cursor extension for automated Claude Code task management. Version 0.1.6 features queue processing, auto-resume functionality for usage limit pauses, and sleep prevention to enable autonomous execution of large batches of tasks.
What's inside Claude Autopilot
- Claude Autopilot uses an Auto-Resume mechanism. When the underlying Claude Code process hits usage limits, the extension detects this state and automatically schedules the queue to resume once the limits reset. This allows for long-running, multi-day batch processing without manual intervention. Each VS Code workspace maintains its own independent queue and history.
Understand the Claude Autopilot project structure
mainThe project is organized into several functional directories within
src/:src/core/: Core state management and configurationsrc/claude/: Claude CLI integrationsrc/queue/: Message queue processingsrc/services/: External service integrationssrc/ui/: User interface (webview)src/utils/: Shared utilitiessrc/webview/: HTML/CSS/JS for webview
Key Files
src/extension.ts: Main extension entry pointsrc/claude_pty_wrapper.py: Python PTY wrapperpackage.json: Extension manifest and dependenciesCLAUDE.md: Instructions for Claude Code assistance
Set up a development environment for Claude Autopilot
mainTo develop for Claude Autopilot, ensure you meet the prerequisites and follow these steps to build and run the extension in a development host.
Prerequisites
- Node.js 16+ and npm
- VS Code or Cursor IDE
- TypeScript knowledge
- Claude Code CLI installed
- Python 3.8+ (required for the PTY wrapper)
Development Setup
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Claude-Autopilot.git cd Claude-Autopilot- Install dependencies:
npm install- Build the extension:
npm run compile- Launch the Extension Development Host by pressing
F5in VS Code.
git clone https://github.com/YOUR_USERNAME/Claude-Autopilot.git cd Claude-Autopilot npm install npm run compileContribute code via the Pull Request process
mainClaude Autopilot uses a specific branching strategy and workflow for code contributions.
Branch Strategy
main: Stable releasesdevelop: Integration branch for new featuresfeature/feature-name: Individual feature branchesfix/issue-number: Bug fix branches
Pull Request Workflow
- Create a branch from
develop:
git checkout develop git pull origin develop git checkout -b feature/your-feature-name- Implement changes following the project's coding standards.
- Test your changes:
npm run compile npm run test # if tests exist- Commit with descriptive messages. It is recommended to use a multi-line commit format that includes a summary and a list of changes, as well as references to issue numbers (e.g.,
Fixes #123). - Push and create a PR:
git push origin feature/your-feature-name- Complete the PR template, including descriptions, testing details, and screenshots for UI changes.
git checkout develop git pull origin develop git checkout -b feature/your-feature-name npm run compile npm run test git commit -m "Add auto-retry mechanism...\n\n- Implement exponential backoff...\n\nFixes #123" git push origin feature/your-feature-nameBuild and package the Claude Autopilot extension
mainBefore deploying, you must install dependencies, compile the TypeScript source code, and package the extension into a
.vsixfile. Usevsce(Visual Studio Code Extension Manager) to create the package and verify its contents.Build Workflow:
- Install dependencies:
npm install - Compile TypeScript:
npm run compile - Package for marketplace:
vsce package - Verify package contents:
vsce ls --tree
# Install dependencies npm install # Compile TypeScript npm run compile # Package for marketplace vsce package # Verify package contents vsce ls --tree- Install dependencies:
Install Claude Autopilot
mainClaude Autopilot is a VS Code and Cursor extension. You can install it using one of the following methods:
- VS Code Marketplace: Search for "Claude Autopilot" in the Extensions view.
- Command Palette: Open the Command Palette (
Cmd/Ctrl+Shift+P) and runExtensions: Install Extensions. - VSIX File: Install manually via the CLI:
code --install-extension claude-autopilot-0.1.6.vsix
code --install-extension claude-autopilot-0.1.6.vsixBuild Claude Autopilot from source
mainTo develop on Claude Autopilot, follow these steps:
- Clone the repository:
git clone https://github.com/benbasha/Claude-Autopilot.git cd Claude-Autopilot - Install dependencies:
npm install - Compile TypeScript:
npm run compile - Run in watch mode:
npm run watch - Package for distribution:
vsce package
git clone https://github.com/benbasha/Claude-Autopilot.git cd Claude-Autopilot npm install npm run compile npm run watch vsce package- Clone the repository:
Deploy the extension to the VS Code Marketplace
mainTo publish the extension to the marketplace, follow these steps:
- Install the VS Code Extension Manager:
npm install -g @vscode/vsce - Prepare Azure DevOps: Create an account at Azure DevOps and generate a Personal Access Token (PAT).
- Create/Identify Publisher: Use
vsce create-publisher benbashaif you haven't created the publisher yet. - Login: Run
vsce login benbashaand provide your PAT when prompted. - Publish:
- To publish the current version:
vsce publish - To publish with a version bump:
- Patch (e.g., 2.0.1):
vsce publish patch - Minor (e.g., 2.1.0):
vsce publish minor - Major (e.g., 3.0.0):
vsce publish major
- Patch (e.g., 2.0.1):
- To publish the current version:
Alternative: Manual Upload If you prefer not to use the CLI, you can manually upload the generated
.vsixfile to the Visual Studio Marketplace management portal.# Install vsce npm install -g @vscode/vsce # Login vsce login benbasha # Publish with version bump vsce publish patch- Install the VS Code Extension Manager:
Prerequisites for Claude Autopilot
mainBefore using Claude Autopilot, ensure the following are installed and configured on your system:
- Claude Code: Must be installed from https://www.anthropic.com/claude-code.
- Python 3.8+: Required for process management.
- IDE: VS Code (version 1.74.0+) or Cursor.
Basic Usage: Automating Claude Code tasks
mainTo start automating tasks with Claude Autopilot, follow these steps:
- Start the session: Open the Command Palette (
Cmd/Ctrl+Shift+P) and selectClaude: Start Claude Autopilot. - Queue tasks: Use
Claude: Add Message to Queueto add one or many messages (tasks) to the processing queue. - Execute: Click "Start Processing" in the Claude Autopilot interface.
The extension will handle the queue automatically, including resuming work if Claude usage limits are reached.
1. Cmd/Ctrl+Shift+P -> Claude: Start Claude Autopilot 2. Claude: Add Message to Queue 3. Click 'Start Processing'- Start the session: Open the Command Palette (
Configure Claude Autopilot settings
mainSettings can be accessed via
File → Preferences → Settings → Extensions → Claude Autopilot.Queue Management
claudeAutopilot.queue.autoMaintenance: (boolean) Enables automatic queue maintenance.
Session Management
claudeAutopilot.session.autoStart: (boolean) Whether the session starts automatically.claudeAutopilot.session.skipPermissions: (boolean) If true, skips permission prompts (uses--dangerously-skip-permissions).claudeAutopilot.session.healthCheckInterval: (number) Interval in milliseconds for checking process health.
Sleep Prevention
claudeAutopilot.sleepPrevention.enabled: (boolean) Keeps the computer awake during processing.claudeAutopilot.sleepPrevention.method: (string) The method used for sleep prevention (e.g.,auto).
History & Logging
claudeAutopilot.history.maxRuns: (number) Maximum number of previous runs to keep in history.claudeAutopilot.history.autoSave: (boolean) Automatically saves history.claudeAutopilot.history.showInUI: (boolean) Whether to show history in the UI.
Web Interface
claudeAutopilot.webInterface.useExternalServer: (boolean) Use an external server for the web interface.claudeAutopilot.webInterface.password: (string) Password for the web interface.
Development
claudeAutopilot.developmentMode: (boolean) Enables debug logging, diagnostics, and advanced queue operations.
{ "claudeAutopilot.queue.autoMaintenance": true, "claudeAutopilot.session.autoStart": false, "claudeAutopilot.session.skipPermissions": true, "claudeAutopilot.session.healthCheckInterval": 30000, "claudeAutopilot.sleepPrevention.enabled": true, "claudeAutopilot.sleepPrevention.method": "auto", "claudeAutopilot.history.maxRuns": 20, "claudeAutopilot.history.autoSave": true, "claudeAutopilot.history.showInUI": false, "claudeAutopilot.webInterface.useExternalServer": false, "claudeAutopilot.webInterface.password": "", "claudeAutopilot.developmentMode": true }File Explorer ignore patterns and safety constraints
mainThe
FileExplorerservice implements several safety and filtering mechanisms to protect the workspace and optimize performance:Path Traversal Protection
All requested paths are validated using
validateAndResolvePath. If a requested path attempts to resolve outside the current VS Code workspace root, the request is rejected.Ignored Patterns
When building directory trees, the following patterns are automatically skipped to reduce noise and improve performance:
.git,.vscode,node_modules.DS_Store,Thumbs.db.gitignore,.vscodeignoreout,dist,build,.cache__pycache__,*.pyc.env,.env.local.next,coverage
File Size Limit
To prevent memory issues or slow responses, file content retrieval is limited to a maximum size defined by
MAX_FILE_SIZE(1MB).