Skip to content

fix: mark discarded-no-reasoning prompts as completed to prevent infinite retry (#9950)#9968

Closed
Magicray1217 wants to merge 1 commit into
NousResearch:mainfrom
Magicray1217:fix/batch-runner-discarded-resume
Closed

fix: mark discarded-no-reasoning prompts as completed to prevent infinite retry (#9950)#9968
Magicray1217 wants to merge 1 commit into
NousResearch:mainfrom
Magicray1217:fix/batch-runner-discarded-resume

Conversation

@Magicray1217

Copy link
Copy Markdown

Summary

Fixes #9950. Prompts discarded for having no reasoning (has_any_reasoning == False) were not added to completed_in_batch, causing --resume to retry them indefinitely.

Root Cause

In _process_batch_worker(), when a prompt is discarded (line 444-447), the code increments discarded_no_reasoning and continues — skipping the completed_in_batch.append() that happens later. On resume, these prompts appear unfinished and get re-processed forever.

Fix

Add completed_in_batch.append(prompt_index) before the continue in the discard branch. Discard is a terminal disposition, not a retryable failure.

1 file changed, 1 insertion.

…nite retry (NousResearch#9950)

Prompts explicitly discarded for having no reasoning were not added to
completed_in_batch, causing --resume to retry them indefinitely.

Add the prompt index to completed_in_batch before continuing, since
discard is a terminal disposition (not a failure that should be retried).
@teknium1

Copy link
Copy Markdown
Contributor

Closed in favor of PR #12997 #12997 which fixes the same issue with identical logic plus a regression test. Thanks @Magicray1217!

@teknium1 teknium1 closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

batch_runner retries intentionally discarded no-reasoning prompts on every --resume

2 participants