Respect --quiet flag for reduce progress table#198
Merged
Conversation
The global -q/--quiet already silences spinners, warnings, hints, and the banner, but the batch progress table ignored it. With --llm-reduce that table is routed to stderr as pure progress chrome (the reduce result goes to stdout), yet --quiet still rendered it — so a script asking to silence stderr chrome didn't get a clean stderr. Thread quiet into _progress_table and skip the live table when it's the stderr-bound reduce chrome. A non-reduce table is the run's stdout result, so --quiet leaves it alone — quiet silences chrome, not the output a script came for. Document the behavior in REFERENCE.md's reduce note. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013sJ5Pcp1nMRjwY4RJLXPsj
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
When
--llm-reduceis active, the batch progress table is routed to stderr to keep stdout clean for the reduce result. The--quietflag now suppresses this progress table entirely, while preserving the actual reduce output that scripts depend on.Key Changes
_progress_table()context manager: Addedquietparameter that skips table rendering when bothquiet=Trueandreduce_active=True. Without--llm-reduce, the table is the run's actual output, so--quietleaves it alone (only silences progress chrome, not the result).run_batch()call site: Passes thequietparameter through to_progress_table().test_quiet_drops_the_reduce_progress_table_but_keeps_the_result: Verifies that with--quietand--llm-reduce, the progress table is suppressed but the reduce output still appears on stdout.test_quiet_keeps_the_non_reduce_table_since_it_is_the_result: Verifies that without--llm-reduce, the table (which is the actual result) is preserved even with--quiet.REFERENCE.mdto clarify that--quietdrops the progress table when using--llm-reduce.Implementation Details
The logic distinguishes between two cases:
--llm-reduce: The table is progress chrome (stderr);--quietsuppresses it.--llm-reduce: The table is the run's output (stdout);--quiethas no effect on it.This preserves the principle that
--quietsilences progress indicators and formatting, not the actual data a script came for.https://claude.ai/code/session_013sJ5Pcp1nMRjwY4RJLXPsj