Skip to main content

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:

  1. "write helloworld.md and say hi and then stop"
  2. "How can you prove it?"
  3. "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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topdog_simple-0.3.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topdog_simple-0.3.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file topdog_simple-0.3.1.tar.gz.

File metadata

  • Download URL: topdog_simple-0.3.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for topdog_simple-0.3.1.tar.gz
Algorithm Hash digest
SHA256 7c0bb9b990f13b8a5dfde1faa20bff741339d70531402af110be59452abee25f
MD5 918ab79e4c1ab0b46ecb4a054d9c30da
BLAKE2b-256 dfdbed7237a12ac226b72cb50440e2d9c9da9b9e5209854b3f0c28ee616001b5

See more details on using hashes here.

File details

Details for the file topdog_simple-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: topdog_simple-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for topdog_simple-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a8a0d8ef35a23ab6cd7d0581f4f909dd60a93bb4ccc43d0720589b41323191e
MD5 2457cb7b1b3194fc65d915c33f1d7917
BLAKE2b-256 3ab37b09e7c23bd17cf1ea268c30950dbd0c9d6691bb16619af94bee292b0dae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page