v1.2.0: SQLite Database Refactoring
Release Date: February 14, 2026
One-Sentence Summary
This update migrates OpenCode's data storage from scattered files to a unified SQLite database, delivering better stability and faster queries. It also adds --dir and --timeout command-line arguments.
Important Notice: Data Migration on First Launch
What is this?
OpenCode 1.2.0 migrates all session data from multiple small files into a single SQLite database file.
How does it affect you?
Migration runs automatically on first launch. Depending on your data size, it may take a few seconds to a few minutes.
What if migration fails?
- Original data is not deleted, so you can safely downgrade
- To re-run migration, delete the database files:
- macOS/Linux:
~/.local/share/opencode/opencode.db* - Windows:
%APPDATA%\opencode\opencode.db*
- macOS/Linux:
- If you encounter issues, please submit a GitHub Issue with "sqlite" in the title
New Features: Enhanced Command-Line Arguments
--dir Argument: Specify Working Directory
You can now specify the working directory when running an Agent:
# Run in a specific directory
opencode run --dir /path/to/project "Fix the login page bug"--timeout Argument: Set Timeout Duration
Timeout configuration moved from API to CLI, making it easier to control:
# Set a 5-minute timeout
opencode --timeout 300SDK Update: PartDelta Event
If you use OpenCode SDK to develop applications, there's a new PartDelta event that sends only incremental changes of text, rather than sending the full content each time:
PartDelta: BusEvent.define(
"message.part.delta",
z.object({
sessionID: z.string(),
messageID: z.string(),
partID: z.string(),
field: z.string(),
delta: z.string(),
}),
)Benefits: Reduced data transfer and better real-time performance.
Desktop Improvements
- Terminal window resizing no longer causes issues
- Performance optimization for large file diff display
- Use
prompt_asyncfor VPN/tunnel connections to avoid timeouts - Auto-reconnect when server address changes
Bug Fixes
TUI No Longer Crashes on Tool Parameter Errors
Previously, if tool input format was incorrect, opencode run would crash directly. Now it handles errors gracefully.
Should You Upgrade?
| Situation | Recommendation |
|---|---|
| Large data volume, want better performance | ✅ Upgrade |
| Desktop user with large file diff needs | ✅ Upgrade |
| Everything works fine | You can wait a few days |
Upgrade command:
opencode upgradeTechnical Details (Optional)
Click to expand full changelog
Core
- Reverted to SQLite database implementation
- Moved timeout configuration from API to CLI arguments
- Updated AI SDK packages to support Claude Opus 4.6 adaptive reasoning
TUI (Terminal Interface)
- Fixed crash caused by tool input format errors
- Added
--dirargument to run command
Desktop
- Fixed Rust compilation issues
- Removed OPENCODE_SQLITE environment variable
- Fixed terminal resizing
- Use prompt_async for VPN connections to avoid timeouts
- Remount SDK when server address changes
- Performance optimization for large file diff display
Community Contributors (12)
- @BlankParticle: Added --dir argument
- @neriousy: Large file diff performance optimization
- @Seungjun0906: Documentation sync, Korean translation
- @ysm-dev: Server address change reconnection
- @Annopick: Chinese documentation fixes
- @eytans: VPN timeout fix
- @G36maid: Arch Linux pacman installation documentation
- @yanhao98: Timeout configuration migration
- @niushuai1991: Chinese documentation standardization
- @kitlangton: Inline code link support
- @0xK3vin: Tool input error handling
- @Brendonovich: Desktop Rust fix

