From 22d9eaa4e461fcf27f64f350b0f26e2dd863adee Mon Sep 17 00:00:00 2001 From: Ehab Younes Date: Tue, 30 Jun 2026 20:24:51 +0300 Subject: [PATCH] fix(cli): increase agent log backups (#26863) The agent log rotation kept only about 55 MiB on disk, which could fall short of the 24h support bundle lookback during high-volume debug logging. Increase the retained `coder-agent.log` rotations from 10 to 19 so the active log plus rotations align with the existing 100 MiB debug logs response cap. Closes #26737 --- cli/agent.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cli/agent.go b/cli/agent.go index 7e03f6fd6d..4a1084dc36 100644 --- a/cli/agent.go +++ b/cli/agent.go @@ -161,9 +161,8 @@ func workspaceAgent() *serpent.Command { logWriter := &clilog.LumberjackWriteCloseFixer{Writer: &lumberjack.Logger{ Filename: filepath.Join(logDir, "coder-agent.log"), MaxSize: 5, // MB - // Per customer incident on November 17th, 2023, its helpful - // to have the log of the last few restarts to debug a failing agent. - MaxBackups: 10, + // Keep up to the debug logs response cap across the active log and rotations. + MaxBackups: 19, }} defer logWriter.Close()