opencode creates identical temp files everytime it runs #4032

Open
opened 2026-02-16 17:42:21 -05:00 by yindo · 2 comments
Owner

Originally created by @khwong-c on GitHub (Dec 31, 2025).

Originally assigned to: @kommander on GitHub.

Description

I run opencode stats periodically to monitor my token and tool usage.

However, I found a new Library file .*-00000000.so is created under /tmp directory whenever I run opencode. The file is not removed after opencode is terminated.

Each file is sized ~4.1MB. These behaviours consumed 60+ GB just over a night.

OpenCode version

1.0.218

Steps to reproduce

  1. Run watch opencode stats
  2. Wait for a while
  3. run ls -lah /tmp

Screenshot and/or share link

Image

Operating System

Ubuntu 24.04

Terminal

Bash

Originally created by @khwong-c on GitHub (Dec 31, 2025). Originally assigned to: @kommander on GitHub. ### Description I run `opencode stats` periodically to monitor my token and tool usage. However, I found a new Library file `.*-00000000.so` is created under `/tmp` directory whenever I run `opencode`. The file is not removed after `opencode` is terminated. Each file is sized ~4.1MB. These behaviours consumed 60+ GB just over a night. ### OpenCode version 1.0.218 ### Steps to reproduce 1. Run `watch opencode stats` 2. Wait for a while 3. run `ls -lah /tmp` ### Screenshot and/or share link <img width="518" height="1730" alt="Image" src="https://github.com/user-attachments/assets/4ec0978e-e14f-43ea-8d8f-75a33490e468" /> ### Operating System Ubuntu 24.04 ### Terminal Bash
yindo added the opentuibug labels 2026-02-16 17:42:21 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 31, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #5617: [BUG] Ubuntu 22.04 Temp_Pack Files Using All of the Storage - Similar issue with temporary files consuming excessive disk space
  • #5792: Security Issue: Suspicious Temporary Libraries Loaded by OpenCode Process - Related issue about suspicious temporary files (.dylib/.node) being created in temp directories

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 31, 2025): This issue might be a duplicate of existing issues. Please check: - #5617: [BUG] Ubuntu 22.04 Temp_Pack Files Using All of the Storage - Similar issue with temporary files consuming excessive disk space - #5792: Security Issue: Suspicious Temporary Libraries Loaded by OpenCode Process - Related issue about suspicious temporary files (.dylib/.node) being created in temp directories Feel free to ignore if none of these address your specific case.
Author
Owner

@khwong-c commented on GitHub (Dec 31, 2025):

The situation is closer to what has been mentioned in #5792 . I don't consider this as a security issue at the moment.

However, not cleaning up files after exit and consumes more than 60+ GB is the issue here.

@khwong-c commented on GitHub (Dec 31, 2025): The situation is closer to what has been mentioned in #5792 . I don't consider this as a security issue at the moment. However, not cleaning up files after exit and consumes more than 60+ GB is the issue here.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4032