Skip to content

Respect --quiet flag for reduce progress table#198

Merged
alexkroman merged 1 commit into
mainfrom
claude/trusting-galileo-9rdkkt
Jun 16, 2026
Merged

Respect --quiet flag for reduce progress table#198
alexkroman merged 1 commit into
mainfrom
claude/trusting-galileo-9rdkkt

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Summary

When --llm-reduce is active, the batch progress table is routed to stderr to keep stdout clean for the reduce result. The --quiet flag now suppresses this progress table entirely, while preserving the actual reduce output that scripts depend on.

Key Changes

  • _progress_table() context manager: Added quiet parameter that skips table rendering when both quiet=True and reduce_active=True. Without --llm-reduce, the table is the run's actual output, so --quiet leaves it alone (only silences progress chrome, not the result).
  • run_batch() call site: Passes the quiet parameter through to _progress_table().
  • Test coverage: Added two new tests:
    • test_quiet_drops_the_reduce_progress_table_but_keeps_the_result: Verifies that with --quiet and --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.
  • Documentation: Updated REFERENCE.md to clarify that --quiet drops the progress table when using --llm-reduce.

Implementation Details

The logic distinguishes between two cases:

  1. With --llm-reduce: The table is progress chrome (stderr); --quiet suppresses it.
  2. Without --llm-reduce: The table is the run's output (stdout); --quiet has no effect on it.

This preserves the principle that --quiet silences progress indicators and formatting, not the actual data a script came for.

https://claude.ai/code/session_013sJ5Pcp1nMRjwY4RJLXPsj

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
@alexkroman alexkroman enabled auto-merge June 16, 2026 22:53
@alexkroman alexkroman added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit f9eec40 Jun 16, 2026
19 checks passed
@alexkroman alexkroman deleted the claude/trusting-galileo-9rdkkt branch June 16, 2026 23: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.

2 participants