anomalyco / anomalyco/opencode

Bug: opencode killing SSD by generating .so Files in /tmp

Open
#42,880 3 comments 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Aug 16, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

opencode is generating .so Files in a tremendous velocity, while working.

the Bug is old so I just submit my workaround:

Create a Ram Disk for Folder /tmp:

sudo nano /etc/fstab
tmpfs /tmp tmpfs rw,nosuid,nodev,size=4G,mode=1777 0 0
sudo mount -a

Then add a timerjob that removes the generated .so files:

~/.local/bin/tmp-opencode-cleanup.sh

#!/usr/bin/env bash
find /tmp -maxdepth 1 -regextype posix-extended
-regex '/tmp/.?[0-9a-f]+-[0-9]{8}.so'
-mmin +1 -delete

~/.config/systemd/user/tmp-opencode-cleanup.timer

[Timer]
OnBootSec=1min
OnUnitActiveSec=1min
Persistent=true

sudo systemctl --user enable --now tmp-opencode-cleanup.timer

rate approx: ~100 - 700 MB/Minute when working / depends on answer rate

Would be really helpful, when this bug could be corrected :)

Thank you,
Oliver

Plugins

GSD-core

OpenCode version

1.18.18

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Ubuntu 22.04 / WSL2

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.