Skip to content

Add automatic log cleanup or archiving to prevent excessive disk usage #12934

@happysurfingeveryday-art

Description

Description

Image

During system maintenance, I found that log files generated by opencode are consuming a very large amount of disk space. For example, a single log file (2026-02-10T035006.log) takes up 74.8 GB, and the total size of logs under .local/share/opencode/log/ exceeds 100 GB. This can quickly fill up the disk and impact system performance, especially on systems with limited storage.

Environment:

OS: Windows 11

Project version: Latest opencode

Log path: AppData/Local/opencode/log/

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds:complianceThis means the issue will auto-close after 2 hours.perfIndicates a performance issue or need for optimizationwindows

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions