Infinite loop driver for Claude Code with persistent context
Project description
Topdog Simple
Intelligent infinite loop driver for Claude Code with proper completion detection, configurable timeouts, and multiple execution modes.
Installation
pip install topdog-simple
Usage
topdogsimple
The tool will continuously cycle through three prompts:
- "write helloworld.md and say hi and then stop"
- "How can you prove it?"
- "Please run tests and fix"
Configuration
Set environment variables to customize behavior:
export CLAUDE_TIMEOUT=600 # 10 minutes (default: 300s)
export CLAUDE_HEARTBEAT_TIMEOUT=120 # 2 minutes (default: 60s)
export CLAUDE_USE_SDK=true # Use Python SDK (default: false)
Features
- Intelligent Completion Detection: JSON streaming analysis + process monitoring
- Configurable Timeouts: Environment variable control for long-running tasks
- SDK Support: Optional claude-code-sdk integration for better control
- Heartbeat Monitoring: Detects hung vs. working processes
- Manual Override: Ctrl+C to skip hung processes without stopping the loop
- Automatic Configuration: Creates
.claude/files with full permissions - Persistent Context: Maintains session state across prompts
Manual Controls
- Ctrl+C once: Skip current prompt and continue to next
- Ctrl+C twice: Exit the entire loop
SDK Mode
Install the SDK for enhanced reliability:
pip install claude-code-sdk
export CLAUDE_USE_SDK=true
topdogsimple
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topdog_simple-0.2.3.tar.gz.
File metadata
- Download URL: topdog_simple-0.2.3.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6aaeb922a6a11c9ed45b3d3d56b8cfba21d586f1498e0bcfcdc34208908a2436
|
|
| MD5 |
2816bcef2e2adad964eb4c8a18d27edd
|
|
| BLAKE2b-256 |
46b1a3373289fa3db6768015de6966ada6ea595fda01d1993103be82da30900b
|
File details
Details for the file topdog_simple-0.2.3-py3-none-any.whl.
File metadata
- Download URL: topdog_simple-0.2.3-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41262396b30c6ac654eef8e4d44ce869632bf5e605edb29dc202b2f628986be4
|
|
| MD5 |
fcf153de066323d9b7355d2dc224259c
|
|
| BLAKE2b-256 |
55f624a635061348a29c9be8451e4fd4d0a8962d299059b4810ef795f29f5a4c
|