From 3fdebf6a6cd8364d0656f0415239c4b98e084af6 Mon Sep 17 00:00:00 2001 From: Zizouk22 Date: Mon, 6 Jul 2026 12:34:54 +0000 Subject: [PATCH] fix(logging): keep verbose openai.agents DEBUG off sandbox stdout The openai-agents SDK logs one DEBUG record per span/function-call/reasoning item. It was routed to both the per-scan file and stdout; Docker captures the sandbox stdout with the json-file driver (no rotation), so on long runs the container log grew to 80GB+ and filled the host disk. Route openai.agents DEBUG to strix.log only; stdout stays on the strix logger. --- strix/telemetry/logging.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/strix/telemetry/logging.py b/strix/telemetry/logging.py index d58d45f98..f3b614eea 100644 --- a/strix/telemetry/logging.py +++ b/strix/telemetry/logging.py @@ -122,10 +122,17 @@ def setup_scan_logging(run_dir: Path, *, debug: bool | None = None) -> Callable[ setattr(stream_handler, _HANDLER_TAG, True) tracked_loggers = [logging.getLogger(name) for name in _TRACKED_ROOTS] - for tracked in tracked_loggers: + for name, tracked in zip(_TRACKED_ROOTS, tracked_loggers): tracked.setLevel(logging.DEBUG) tracked.addHandler(file_handler) - tracked.addHandler(stream_handler) + # The openai-agents SDK emits one DEBUG record per span / function-call + # / reasoning-item. Routing that to stdout -- which Docker's json-file + # driver captures without rotation -- can grow the sandbox container log + # to tens of GB and exhaust the host disk on long runs. Keep its verbose + # DEBUG in the per-scan strix.log file only; stdout stays on Strix's own + # logger. + if name != "openai.agents": + tracked.addHandler(stream_handler) tracked.propagate = False for name in _NOISY_LIBS: