Skip to content

Huge number of mystery files in a system folder? #5807

Closed

Description

@ariane-emory

Description

I just noticed that on my system, this folder: /private/var/folders/21/jfcl6xvd31547_0brmr5hgx80000gn/T/ contains 52,000+ subdirectories with names similar to opencode-test-22nlhdyc9rj.

It seems like opencode is generating several thousand of these directories every day.

What are these directories? Why is opencode generating so many of them, and why aren't they collecting instead of being cleaned up?

OpenCode version

1.0.168

Steps to reproduce

  1. Look in directories following a similar naming scheme to the one described to find these opencode-test-* directories.
  2. Observe that there are thousands of them.

Screenshot and/or share link

Image

Operating System

MacOS Sequoia latest

Terminal

No response

Activity

  1. added
    perfIndicates a performance issue or need for optimization
    on Dec 19, 2025
  2. github-actions commented on Dec 19, 2025

    @github-actions
    Contributor

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

    The core issue appears to be that OpenCode generates temporary directories and files that are not properly cleaned up, accumulating over time and consuming significant disk space. Your observation about 52,000+ opencode-test-* directories aligns with the broader pattern of temp file accumulation reported in these other issues.

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

  3. rekram1-node commented on Dec 19, 2025

    @rekram1-node
    Contributor

    isnt this just the tests in opencode repo? arent u running tests or somethjng

  4. ariane-emory commented on Dec 19, 2025

    @ariane-emory
    ContributorAuthor

    @rekram1-node That could definitely be where they're coming from, but why are there so many and why isn't something cleaning them up? Generating 52,000+ files in a handful of days and just leaving them laying around seems like it's a bit much.

  5. rekram1-node commented on Dec 19, 2025

    @rekram1-node
    Contributor

    idk ill aee if i have the problem cant speak to ur dev environment or what u do but im fairly confient this isnt an issue w opencode maybe its a local dev issue but shouldnt be a prod one

  6. rekram1-node commented on Dec 19, 2025

    @rekram1-node
    Contributor

    Yeah it's just opencode tests, ig somehting is't being cleaned up

  7. rekram1-node commented on Dec 19, 2025

    @rekram1-node
    Contributor

    think this is fix:

    dae0168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingperfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions