Expand description
Codex usage-limit detection.
Single file to update when the Codex CLI changes its limit output.
Codex emits this in its --json NDJSON stream as the message field of an
error or turn.failed event:
You've hit your usage limit. To get more access now, send a request to your admin
or try again at Mar 20th, 2027 3:36 PM.The reset timestamp is a local-timezone human date string — we parse it
through several format candidates via chrono and convert to UTC. If parsing
fails, reset_at is None and the scheduler falls back to
default_fallback_secs.
Constants§
- DEFAULT_
PATTERNS - Detection patterns — these answer “is there a usage limit here?”
Functions§
- detect_
json - Scan a Codex NDJSON event JSON value for a usage-limit signal.
- detect_
text - Scan a single line of text (or message) for a Codex usage-limit signal.