Skip to content

cirosantilli/codex-continue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codex-continue

Expect-style wrapper that automatically sends a "Continue" message to Codex CLI after your usage limit resets.

Quickstart:

pipx install codex-continue
codex-continue -- "/goal finish this task"

Background: you have a long task for codex, and a cheap Pro plan. Your task if for fun and you don't want to spend more money on it. But you also don't want to waste your unused plan quotas or your time waiting to click "Enter" when the limit refreshes. This script is for you.

This script waits for a message with the following format to show up:

You've hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at 11:42 AM.

When that happens, it parses out the time displayed, sleeps until it is reached and then wakes up and then automatically sends a message which defaults to:

Continue

which should be enough to send Codex on its merry way once again until the next quota is hit and the cycle continues.

Tested on Ubuntu 25.10, Python Python 3.13.7, codex-cli 0.133.0.

Installation

From PyPI:

pipx install codex-continue

Use latest master executable from a clone:

git clone https://github.com/cirosantilli/codex-continue
cd codex-continue
pipx install -e codex-continue

Usage

Run Codex through the wrapper:

codex-continue

Pass an initial prompt to Codex. /goal is recommended, Codex seems to work for much longer with it now:

codex-continue -- "/goal finish this task"

Customize the continuation text:

codex-continue --continue-prompt "Continue exactly where you left off"

When Codex prints a usage-limit message with either an absolute reset time or a relative duration, codex-continue keeps the same Codex process alive, waits until the reset time plus a grace period, then injects the continuation prompt and presses Enter.

Publishing

Build and upload:

python -m pip install build twine
python -m build
python -m twine upload dist/*

About

Expect-style wrapper that automatically sends a "Continue" message to Codex CLI after your usage limit resets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages