Skip to content

feat: add -s/--silent to suppress the runner's own output#429

Open
zmwangx wants to merge 1 commit into
voidzero-dev:mainfrom
zmwangx:feat/run-silent
Open

feat: add -s/--silent to suppress the runner's own output#429
zmwangx wants to merge 1 commit into
voidzero-dev:mainfrom
zmwangx:feat/run-silent

Conversation

@zmwangx
Copy link
Copy Markdown

@zmwangx zmwangx commented Jun 7, 2026

Summary

  • Add -s, --silent to run (mutually exclusive with --verbose), matching the --silent flag in npm/pnpm/yarn/bun.
  • Silent runs emit only the tasks' own stdout/stderr — the per-task command line, the inline cache-status indicator, inter-task spacing, the grouped-mode block header, and the run summary are all suppressed. Error banners and the process exit code are unaffected.
  • The summary is still computed and persisted, so --last-details keeps working after a silent run.

Useful in agentic verification gates, where the command line and cache/summary diagnostics are pure noise that waste tokens when replayed on every run.

Addresses voidzero-dev/vite-plus#1768.

## Summary

- Add `-s, --silent` to `run` (mutually exclusive with `--verbose`), matching
  the `--silent` flag in npm/pnpm/yarn/bun.
- Silent runs emit only the tasks' own stdout/stderr — the per-task command
  line, the inline cache-status indicator, inter-task spacing, the grouped-mode
  block header, and the run summary are all suppressed. Error banners and the
  process exit code are unaffected.
- The summary is still computed and persisted, so `--last-details` keeps
  working after a silent run.

Useful in agentic verification gates, where the command line and cache/summary
diagnostics are pure noise that waste tokens when replayed on every run.

Addresses voidzero-dev/vite-plus#1768.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Jun 7, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

stdout_writer: Box::new(LabeledWriter::new(
maybe_strip_writer(Box::new(std::io::stdout()), self.color_support.stdout),
prefix.as_bytes().to_vec(),
)),

P2 Badge Honor --silent for labeled output prefixes

When --silent is combined with --log labeled, stdout is still wrapped in LabeledWriter with the [pkg#task] prefix, so the command no longer leaves only the task's raw output. This breaks the main use case for silent mode when callers pipe stdout or have a default labeled log mode, because vp run --silent --log labeled build emits prefixed task lines even though the new flag suppresses the other runner chrome; use an unprefixed writer when self.silent is true.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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