skill-creator: redirect nested claude -p stdin to DEVNULL in run_eval.py#1426
Open
viditchess64 wants to merge 1 commit into
Open
skill-creator: redirect nested claude -p stdin to DEVNULL in run_eval.py#1426viditchess64 wants to merge 1 commit into
viditchess64 wants to merge 1 commit into
Conversation
run_single_query() spawns the eval subprocess without redirecting stdin, so the child inherits the parent's stdin. When run_eval.py itself runs nested inside a claude session (a supported use — CLAUDECODE is already stripped from env for exactly this), the child stalls ~3s waiting on the inherited stdin before proceeding, multiplied across --num-workers. Fixes anthropics#1414
|
Hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
run_single_query()spawns the nested evalclaude -pwithout redirecting stdin, so the child inherits the parent's stdin. When the eval runs nested inside a Claude session (a supported use — the code already stripsCLAUDECODEfrom env for exactly this), the child stalls ~3s waiting on the inherited stdin, multiplied across--num-workers.One-line fix: pass
stdin=subprocess.DEVNULLto the Popen call.Fixes #1414
Note: open PRs #1323 and #1298 rework this same function but don't touch the Popen call — this change is orthogonal and can be folded into either if they land first.