---
id: TASK-22.3
title: Implement Runner output control by verbosity level
status: Done
assignee:
  - codex
created_date: '2026-02-27 19:05'
updated_date: '2026-02-28 08:27'
labels: []
dependencies: []
references:
  - src/core/exec.rs
  - src/core/cmd.rs
  - tests/
parent_task_id: TASK-22
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Adjust Runner to control command output: level 1 suppresses all command output; level 2 only prints command output on error; level 3+ always prints command output. Ensure error output is preserved when needed.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Level 1: no command output even on error
- [x] #2 Level 2: command output only on error
- [x] #3 Level 3+: command output always
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
- Update `Runner::run` to gate command output by `verbose`:
  - v1: never print command output
  - v2: only print command output when the command fails
  - v3+: always print command output
- Implement by conditionally inheriting stdio vs capturing and printing on error.
- Keep dry-run behavior consistent.
- Run `just check`.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Updated `Runner::run` to gate command output by verbosity: v1 uses null stdio, v2 captures output and prints only on failure, v3+ inherits stdio and prints command line. Dry-run prints only at v3+. Added `std::io::Write` usage for error output. `just check` passes.
<!-- SECTION:NOTES:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Updated `Runner::run` to gate command output by verbosity: v1 suppresses output, v2 prints captured output only on error, v3+ always inherits stdio and prints the command line. Dry-run prints only at v3+. Tests: `just check`.
<!-- SECTION:FINAL_SUMMARY:END -->
