Skip to content

Commit 677c9c4

Browse files
JAORMXclaude
andcommitted
Truncate VM log file per spawn instead of appending
Each VM spawn now starts with a fresh log file. The log always corresponds to the last session rather than growing indefinitely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6afbb3b commit 677c9c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runner/spawn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func SpawnProcess(ctx context.Context, cfg Config) (*Process, error) {
106106

107107
// Redirect stdout/stderr to log file if configured.
108108
if cfg.VMLogPath != "" {
109-
logFile, err := os.OpenFile(cfg.VMLogPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o600)
109+
logFile, err := os.OpenFile(cfg.VMLogPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o600)
110110
if err != nil {
111111
return nil, fmt.Errorf("open vm log file: %w", err)
112112
}

0 commit comments

Comments
 (0)