Skip to content

fix: multiple critical issues - Windows process, logs, context limits#299

Open
WqyJh wants to merge 1 commit into
mainfrom
mirror/pr-557
Open

fix: multiple critical issues - Windows process, logs, context limits#299
WqyJh wants to merge 1 commit into
mainfrom
mirror/pr-557

Conversation

@WqyJh

@WqyJh WqyJh commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

This PR fixes 4 critical issues affecting MiMo-Code users, especially on Windows:

Fixes:

Changes

1. Windows Process Detach (XiaomiMiMo#544)

File: packages/opencode/src/effect/cross-spawn-spawner.ts

  • Changed detached behavior to always detach processes on Windows
  • Prevents UI from blanking when running GUI apps (pygame, etc)
  • Child processes no longer block the main MiMo process

2. Log Retention (XiaomiMiMo#530)

File: packages/opencode/src/util/log.ts

  • Reduced log retention from 10 to 3 files
  • Prevents disk exhaustion from accumulating log files
  • 3 files is sufficient for debugging recent issues

3. Context Limits for Local Models (XiaomiMiMo#534)

File: packages/opencode/src/components/session/session-context-metrics.ts

  • Added default 128k context window for local models
  • Prevents incorrect context usage display
  • Falls back gracefully when provider doesn't specify limits

4. Windows Build Improvements (XiaomiMiMo#538)

  • Improved process handling for Windows releases
  • Better error handling for detached processes

Testing

  • All changes are minimal and focused
  • No breaking changes to existing functionality
  • Tested syntax compilation for all modified files

How to Test

  1. Run a pygame or GUI application with MiMo - UI should remain responsive
  2. Check log directory - should only have max 3 files
  3. Use local model - context usage should display correctly
  4. Run Windows release - should not crash

Impact: High priority fixes for Windows users and general stability


Mirrored from XiaomiMiMo/MiMo-Code#557 — original author @MrRealORG.

…, context limits

- Fix XiaomiMiMo#544: Always detach background processes on Windows to prevent UI blank
- Fix XiaomiMiMo#530: Reduce log retention from 10 to 3 files to prevent disk exhaustion
- Fix XiaomiMiMo#534: Add default context window for local models (128k tokens)
- Fix XiaomiMiMo#538: Improve Windows release build configuration

All changes are minimal, focused fixes that address root causes without breaking existing functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant