Skip to main content

detect_rate_limit

Function detect_rate_limit 

Source
pub fn detect_rate_limit(stdout: &str) -> Option<String>
Expand description

Detect agent-specific rate-limit output and return the retry description.

Claude can emit a JSON result envelope when run with --output-format json; Codex commonly emits plain text such as “Try again at …”. This function is intentionally conservative so ordinary progress text does not become a false positive.