MiniMax Code uses OpenCode's database path instead of its own, causing data conflict
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
Research direction
Start with dist/main/modules/daemon/spawn-prod.js and inspect the env block passed to child_process.spawn() for the backend server. Set the bundled server's database path to the MiniMax-specific location described in the issue, then launch MiniMax Code alongside a separately installed OpenCode and confirm their database files are isolated and agent messages no longer fail.
Written by the indexing model from the issue text.
Description
Description
MiniMax Code desktop app (v3.0.46) runs an older version of OpenCode (v1.14.28) as a backend server. The problem is that this server stores its sessions and data at the same path (~/.local/share/opencode/opencode.db) that is already used by a separately installed OpenCode — an independent, unrelated program.
Two different applications are trying to write their session data into the same database file. When the separately installed OpenCode initializes first, MiniMax Code then attempts to use the same file with a different internal schema expectation, resulting in:
[stream.message] Failed to create session: 500
DrizzleError: Failed to run the query 'CREATE TABLE `project` (...)'
The core issue is that MiniMax Code has no database path of its own. Each program should own its data directory. MiniMax Code should create and manage its database under a minimax namespace (e.g. ~/.local/share/minimax-code/), not under opencode which belongs to a separate piece of software.
Steps to reproduce
- Install OpenCode CLI separately from MiniMax Code
- Run it at least once so its database is initialized at
~/.local/share/opencode/ - Install and launch MiniMax Code
- Send a message to any agent — request fails because both programs conflict over the same database file
Expected behavior
MiniMax Code should create and use its own dedicated database path, isolated from OpenCode or any other software. The database path should reflect the MiniMax brand, not OpenCode's.
Suggested fix
Set OPENCODE_DB environment variable for the backend server process to a MiniMax-specific path:
OPENCODE_DB=~/.local/share/minimax-code/minimax-code.db
This can be done in dist/main/modules/daemon/spawn-prod.js by adding the variable to the env block passed to child_process.spawn(). The bundled OpenCode binary natively supports the OPENCODE_DB env var for exactly this purpose — overriding the default database location.
Environment
- macOS 15 (Apple Silicon)
- MiniMax Code v3.0.46
- Separately installed OpenCode v1.17.9
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 141
- Avg merge
- 2h 26m
- Merged PRs (30d)
- 65
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MiniMax-AI/minimax-code
-
bug cli needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MiniMax-AI/minimax-code#128 · 2 comments ·
-
bug desktop needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MiniMax-AI/minimax-code#80 ·
-
bug desktop needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MiniMax-AI/minimax-code#66 ·
-
desktop enhancement needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 58/100
MiniMax-AI/minimax-code#292 ·
-
tui
Difficulty 5/5 Over a week Newbie friendliness 48/100
MiniMax-AI/minimax-code#289 ·
All issues in MiniMax-AI/minimax-code
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100