Relationships
#1402 --quiet mode does not suppress in-process extension logger output
Opened by webframp · 7/25/2026· Shipped 7/27/2026
Problem
The --quiet flag (PR #1963) buffers method_output events and discards them on success. This works for command/shell models where subprocess stdout/stderr produces method_output events. However, bundled TypeScript extensions (which run via InProcessExecutor) use context.logger.info() — a LogTape Logger — and their output bypasses the quiet-mode buffer entirely.
The root cause: the ["model", "method", "run"] LogTape category is configured with parentSinks: "inherit", inheriting the root console/pretty sink. The --quiet flag only affects the renderer's handling of method_output events; it does not modify the LogTape sink configuration. So in-process extension loggers still write directly to the terminal regardless of --quiet.
Reproduction
# Any in-process extension model (not command/shell):
swamp model run github list_prs --quiet --input repo=some/repo --input state=open
# Expected: no output until completion (or failure replay)
# Actual: "Found {count} pull requests" still prints to terminalProposed Solution
When --quiet is active, suppress the inherited console sink for the ["model", "method", "run"] category. Two approaches:
Option A: Sink-level suppression
Reconfigure LogTape at quiet-mode initialization to override parent sinks for the run category:
{
category: ["model", "method", "run"],
lowestLevel: logLevel,
sinks: ["runFile"], // only file sink
parentSinks: "override", // suppress inherited console sink
}This is clean but means logger output is only in the log file — no replay on failure.
Option B: Intercept into the renderer buffer (preferred)
Route context.logger output through the same buffer that method_output uses. This could work by:
- Creating a custom LogTape sink that emits
method_outputevents (or writes to the renderer's buffer) instead of directly to console. - Registering this sink for the
["model", "method", "run"]category when quiet mode is active.
This preserves the replay-on-failure behavior — logger messages would appear alongside subprocess output in the failure replay block.
Option C: Hybrid
Suppress console output in quiet mode (Option A), but on failure, dump the log file tail as part of the failure replay. The log file path is already shown in the Failed gutter line.
Impact
Across the @webframp extension set alone, 124 model files make ~2000 context.logger.info() calls. All are progress/diagnostic messages ("Found {count} zones", "Fetched settings", "Checking health of {url}"). None carry post-success information beyond what data artifacts store. Users passing --quiet expect silence on success — these messages break that contract.
Related
- PR #1963 (output overhaul) introduces quiet mode
- Lab #1400, #1401 (report context enhancements) — sibling requests from the same review
Shipped
Click a lifecycle step above to view its details.