MiniMax-AI / MiniMax-AI/minimax-code
[Bug] Runtime repair passes only transcript tail — full session history is dropped from new context
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 141
- Avg merge
- 2h 45m
- Merged PRs (30d)
- 46
Description
Summary
When MiniMax Code repairs a session (after daemon restart, idle timeout, OOM, or mode switch), the new runtime receives only the last ~4 messages in its <visible-transcript> block. The full conversation history exists on disk but is not loaded into the new context — the model loses awareness of the original task, scope, and prior decisions, and may believe it never received the task at all.
This is not an LLM-summarization failure. The summarization mechanism (session_context_epoch) exists but is never triggered, because the repair path bypasses it entirely.
Environment
- MiniMax Code (Electron) on macOS
- Observed session at time of repair: 513 messages, 2.2 MB on disk
- OpenCode DB:
~/.local/share/opencode/opencode.db - Mavis DB:
~/.mavis/sqlite.db
Reproduction
- Run an ongoing session with significant context.
- Trigger a runtime repair (daemon restart, OpenCode crash, long idle, etc.).
- Inspect the
<visible-transcript>block delivered to the new session.
Expected
The repaired session reconstructs full context — either by injecting the complete session_messages history, by running session_context_epoch summarization, or by restoring from $MAVIS_SCRATCHPAD.
Actual
Only the last ~4 messages are passed. No summary, no history injection, no scratchpad restore.
Findings
~/.mavis/sqlite.db.session_messagesretains the complete history (513 messages / 2.2 MB in the observed case). The data is on disk — it's just not loaded.~/.local/share/opencode/opencode.db.session_context_epochexists with a proper schema for LLM summarization (baseline,snapshot,baseline_seq,replacement_seq), but the table is empty — the mechanism never ran in observed sessions.- The session was far below the LLM-context limit, so summarization was never triggered organically either.
- Conclusion: "context loss after repair" is the repair path skipping both summary and history-injection. Not a token-limit issue, not an LLM-summary quality issue.
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.
Research direction
No repository files or tests are named. Start by locating the runtime repair path that constructs the block, then inspect how ~/.mavis/sqlite.db.session_messages and the session_context_epoch table are read. Done means a repaired session restores full history or an available summary, with the original task and prior decisions preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlite, typescript
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100