Skip to content

skill-creator: redirect nested claude -p stdin to DEVNULL in run_eval.py#1426

Open
viditchess64 wants to merge 1 commit into
anthropics:mainfrom
viditchess64:fix-run-eval-stdin-stall
Open

skill-creator: redirect nested claude -p stdin to DEVNULL in run_eval.py#1426
viditchess64 wants to merge 1 commit into
anthropics:mainfrom
viditchess64:fix-run-eval-stdin-stall

Conversation

@viditchess64

Copy link
Copy Markdown

run_single_query() spawns the nested eval claude -p without 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 strips CLAUDECODE from env for exactly this), the child stalls ~3s waiting on the inherited stdin, multiplied across --num-workers.

One-line fix: pass stdin=subprocess.DEVNULL to 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.

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
@Fiskers

Fiskers commented Jul 11, 2026

Copy link
Copy Markdown

Hello

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.

skill-creator: run_eval.py's nested claude -p subprocess inherits parent stdin, causing an intermittent stall

2 participants