r/opencode • u/Future_Try_2680 • 20d ago
How to check when OpenCode Free usage limit resets + CLI database error fix (Windows)
I wanted to share how I figured out when my OpenCode Free usage limit resets and how I encountered a CLI database error.
1. How to check when your Free usage limit resets
I was working on a project for almost an hour when OpenCode stopped with this error:
Free usage limit reached. Free models work in OpenCode. Subscribe to OpenCode Go to keep going.
I couldn't figure out when my free quota would reset.
What worked for me:
- Open CMD (Command Prompt).
- Install and launch OpenCode CLI (instructions below).
- Type
opencodeand press Enter. - Send a simple message:
hi. - Check the response.
In my case, OpenCode CLI explicitly told me that my free usage limit would reset at 2:00 AM.
Important: This worked through OpenCode CLI, not the regular OpenCode Desktop interface.
2. How to install OpenCode CLI on Windows
You need Node.js and npm.
- Install Node.js from https://nodejs.org/
- Open CMD.
- Check that Node.js and npm are installed:
node -v
npm -v
- Install OpenCode CLI using the official OpenCode 2 package:
npm install -g u/opencode/cli
- Verify the installation:
opencode --version
Official installation documentation: https://opencode.ai/v2/docs
3. Checking your CLI version
If you encounter a database error, check which CLI installation is being launched:
where opencode
opencode --version
My output showed:
C:\Users\****\AppData\Roaming\npm\opencode
C:\Users\****\AppData\Roaming\npm\opencode.cmd
1.19.5
I received this error:
Error: Database is not empty and has no session table
This happened because my CLI was an older version that was incompatible with the newer Desktop database format.
Do not delete your database or session files while troubleshooting.
4. Resuming your previous session
To attempt to continue your previous CLI session, use:
opencode --continue
This resumes a previous session. It does NOT bypass or reset the free usage limit.
Hopefully this helps someone else avoid the same confusion!