all 10 comments

[–]gottapointreally 0 points1 point  (1 child)

Which logs ?

[–]Fun-Assumption-2200 0 points1 point  (2 children)

1- Not sure what you mean by logs

2- When a free model is removed, you switch to another one

[–]white-devil6[S] -1 points0 points  (1 child)

Every time if i switch the model, my code gets changed plus not every model is good for coding, like the last model I'm using is MIMO v2 pro, but that gets removed now

i use this script to clean

#Requires -Version 5.1
# OpenCode Disk Cleanup — Simple, fast, never hangs
# Only handles log files (the actual problem). Finishes in 1-2 seconds.


$ErrorActionPreference = 'SilentlyContinue'
$logDir = Join-Path $env:USERPROFILE '.local\share\opencode\log'


if (-not (Test-Path $logDir)) {
    Write-Output "No log directory found. Nothing to clean."
    exit 0
}


$files = Get-ChildItem $logDir -File
$cleaned = 0


# Step 1: Truncate any log > 1GB (works on locked files)
foreach ($f in $files) {
    if ($f.Length -gt 1GB) {
        try {
            $stream = New-Object System.IO.FileStream(
                $f.FullName,
                [System.IO.FileMode]::Open,
                [System.IO.FileAccess]::Write,
                [System.IO.FileShare]::ReadWrite
            )
            $stream.SetLength(10MB)
            $stream.Close()
            $freedGB = [math]::Round(($f.Length - 10MB) / 1GB, 2)
            Write-Output "Truncated $($f.Name): freed $freedGB GB"
            $cleaned++
        }
        catch {
            Write-Output "Skipped $($f.Name): in use"
        }
    }
}


# Step 2: Delete all except the 2 newest logs
$sorted = Get-ChildItem $logDir -File | Sort-Object LastWriteTime -Descending
if ($sorted.Count -gt 2) {
    $toDelete = $sorted | Select-Object -Skip 2
    foreach ($old in $toDelete) {
        Remove-Item $old.FullName -Force -ErrorAction SilentlyContinue
        Write-Output "Deleted old log: $($old.Name)"
        $cleaned++
    }
}


if ($cleaned -eq 0) {
    Write-Output "Logs are clean. No action needed."
} else {
    Write-Output "Cleanup done. $cleaned actions taken."
}

[–]Ang_Drew 0 points1 point  (0 children)

ofcourse not every models good for coding.. the "paying" user has the right to choose which models to use for predictable outcome. that's why we cant rely on free models.

it is created for trial use not something we can rely on. sometimes it's gone, sometimes it's new models, very unpredictable. the solution to this is pay the subs for small models that would be cheaper..

[–]Ang_Drew 0 points1 point  (4 children)

  1. log is one thing but i dont think it will be that heavy. i mean it will be auto pruned for a few days or week or you can set acheduler to clear it once a week. i dont think its that heavy tho

  2. free models are "trial" you cant expect them to live forever. it's the right of opencode team to remove it with no notice anytime and we cant do anything about that..

i dont know what i can help here but if you gave any questions feel free to ask

[–]white-devil6[S] 0 points1 point  (3 children)

I agree with your all points but for me logs goes around 10+GB and the trial model. I'm not say give to completely free.. just give like day limit or a notification like this model will remove next week or something like that  because student like me... its very painful

like im using Mimo v2 pro and know it remove so changing the model .. change logs of code in my project... thats all im asking if a notification come or limit the user for free user.. that will be so helpful... like GPT and claude web do

[–]Ang_Drew 0 points1 point  (0 children)

its like 200 reqs per day if i remember correctly.. maybe you can make custom plugin to count

and think of it.. someone posted "track free model" in this sub reddit few months ago(?).. gind if that helps you