Skip to content

fix: classifier feeds prompt on stdin (0.26.4)#52

Merged
Shahinyanm merged 1 commit into
mainfrom
fix/classifier-stdin-runner
Jun 17, 2026
Merged

fix: classifier feeds prompt on stdin (0.26.4)#52
Shahinyanm merged 1 commit into
mainfrom
fix/classifier-stdin-runner

Conversation

@Shahinyanm

Copy link
Copy Markdown
Member

Summary

The claude -p auto-classifier was failing every chunk, silently piling
them into the pending queue (139 stuck locally; 91 with the same error).

Root cause: ClaudeBinaryRunner appended the prompt as a positional arg
right after --disallowed-tools "Bash Read …". The current claude CLI parses
--disallowed-tools greedily 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 the
complete/enrich and dream backends (which is why those worked while
auto-capture didn't); also dodges E2BIG.

Extracted default_runner() + a feeds_prompt_on_stdin trait flag so a unit
test locks the choice without spawning claude.

Type of change

  • Bug fix (non-breaking)

Test plan

  • production_runner_feeds_prompt_on_stdin regression test
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace --all-targets (all green)
  • RUSTDOCFLAGS=-D warnings cargo doc --workspace --no-deps

CHANGELOG

  • Added ## [0.26.4] (Fixed). Operators run task-journal pending retry.

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>
@Shahinyanm Shahinyanm merged commit 193b30d into main Jun 17, 2026
7 checks passed
@Shahinyanm Shahinyanm deleted the fix/classifier-stdin-runner branch June 17, 2026 08:01
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.

1 participant