Skip to content

Fix crash loop: only exit on CRITICAL, not ERROR#19

Open
hbd wants to merge 1 commit intomainfrom
fix/less-aggressive-error-exit
Open

Fix crash loop: only exit on CRITICAL, not ERROR#19
hbd wants to merge 1 commit intomainfrom
fix/less-aggressive-error-exit

Conversation

@hbd
Copy link

@hbd hbd commented Dec 29, 2025

Summary

  • Change sys.exit(1) trigger from ERROR level to CRITICAL level in DelayedRichHandler
  • Prevents crash loops when users provide incorrect configuration (e.g., wrong model name causing 404s)

Problem

Previously, any ERROR log would trigger sys.exit(1), causing:

  • Immediate crash on first 404 (wrong model name)
  • Crash loops when the benchmark runner retries
  • No useful output for debugging

Solution

Only exit on CRITICAL logs. Recoverable errors like HTTP 404s are logged but the benchmark continues, reporting 0 successful requests which correctly indicates the failure without crashing.

Test plan

  • Run benchmark with incorrect model name - should complete with 0 requests instead of crashing
  • Run benchmark with correct config - should work as before

🤖 Generated with Claude Code

@github-actions github-actions bot added the core label Dec 29, 2025
Previously, any ERROR log (including 404s from wrong model names)
would trigger sys.exit(1), causing crash loops when users provided
incorrect configuration.

Now only CRITICAL logs trigger exit. Recoverable errors like HTTP 404s
are logged but the benchmark continues, reporting 0 successful requests
which correctly indicates the failure without crashing.
@hbd hbd force-pushed the fix/less-aggressive-error-exit branch from 560b53c to 061ade0 Compare December 29, 2025 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant