fix: classifier feeds prompt on stdin (0.26.4)#52
Merged
Conversation
The claude -p classifier passed the prompt as a positional arg right after
--disallowed-tools; the current claude CLI parses that flag greedily and
swallowed the prompt words as bogus deny-rules ("Permission deny rule \"You\"
matches no known tool"), failing every classification and piling chunks into
the pending queue. Switch the classifier to ClaudeBinaryStdinRunner (already
used by the complete/enrich and dream backends) so the prompt goes on stdin
with no positional collision; also dodges E2BIG. Extracted default_runner()
+ a feeds_prompt_on_stdin trait flag and a regression test that locks the
choice without spawning claude. Bump 0.26.4.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
The
claude -pauto-classifier was failing every chunk, silently pilingthem into the pending queue (139 stuck locally; 91 with the same error).
Root cause:
ClaudeBinaryRunnerappended the prompt as a positional argright after
--disallowed-tools "Bash Read …". The currentclaudeCLI parses--disallowed-toolsgreedily and swallowed the prompt tokens as deny-rules —Permission deny rule "You" matches no known tool(words from the prompt).Exit 1, chunk dead-letters.
Fix: switch the classifier to
ClaudeBinaryStdinRunner— prompt on stdin,no positional after
--disallowed-tools. Already the production path for thecomplete/enrich and dream backends (which is why those worked whileauto-capture didn't); also dodges
E2BIG.Extracted
default_runner()+ afeeds_prompt_on_stdintrait flag so a unittest locks the choice without spawning
claude.Type of change
Test plan
production_runner_feeds_prompt_on_stdinregression testcargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --all-targets(all green)RUSTDOCFLAGS=-D warnings cargo doc --workspace --no-depsCHANGELOG
## [0.26.4](Fixed). Operators runtask-journal pending retry.