marcelpetrick

AgentWhileTrue — Development skill for Claude Code

Development community

Watches Claude Code and Codex CLI quota in KDE Konsole and resumes a rate-limited session — only when terminal, process identity, prompt, quota and policy all agree.

How to install AgentWhileTrue

This entry records only its repository, not the path inside it, so there is no exact command to give. Open marcelpetrick/AgentWhileTrue and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What AgentWhileTrue does

Watches Claude Code and Codex CLI quota in KDE Konsole and resumes a rate-limited session — only when terminal, process identity, prompt, quota and policy all agree. Python 3.12+, zero runtime dependencies.

Alternatives in Development

  • Claude Auto Resume — A shell script utility that automatically resumes Claude CLI tasks when usage limits are lifted 732 ★
  • Overnight PRs — Autonomous overnight loop — verify issues against the codebase, close stale ones, ship PRs through /ship (bug 324 ★
  • Homunculus — A Claude Code plugin that watches how you work, learns your patterns, and evolves itself to help you better 315 ★

README

Agent While True

[![Quality](https://github.com/marcelpetrick/AgentWhileTrue/actions/workflows/quality.yml/badge.svg?branch=master)](https://github.com/marcelpetrick/AgentWhileTrue/actions/workflows/quality.yml) [![Release](https://github.com/marcelpetrick/AgentWhileTrue/actions/workflows/release.yml/badge.svg)](https://github.com/marcelpetrick/AgentWhileTrue/actions/workflows/release.yml) [![Python 3.12+](https://img.shields.io/badge/Python-3.12%2B-3776AB.svg)](https://www.python.org/) [![License: GPL v3](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)

**Agent While True** is an agent budget watch and babysitter for Codex CLI and Claude Code sessions in KDE Konsole. It reports provider quota health and can resume a blocked session after usage becomes available again—only when the terminal, process identity, prompt, quota source, and policy all agree.

The primary command is `agent-while-true`. The shorter `agent-watch` command is kept as a compatible alias, so existing scripts and the examples below continue to work.

The current target is Manjaro/Arch Linux, KDE Plasma, Konsole, Wayland or X11, and Python 3.12 or newer. Runtime code uses only the Python standard library.

![Claude Code session-limit menu](media/claude_out_of_quota.png)

This real prompt is handled narrowly. With fresh quota confirming the session is exhausted, auto mode may move from the visibly selected first item to the exact “continue automatically” item and confirm it. It never selects “upgrade your plan.” Any different menu, cursor position, or unknown quota fails closed.

Install

Install the current release from GitHub with `pipx` so the CLI is isolated while remaining available at `~/.local/bin/agent-while-true`:

pipx install 'git+https://github.com/marcelpetrick/AgentWhileTrue.git@agentwhiletrue-v0.27.4'
agent-while-true --version
agent-while-true doctor

For development, clone the standalone repository:

git clone https://github.com/marcelpetric