Skip to content

[Bug]: Mcode ends up using 100% of available RAM on every turn i use #508

Open

Description

@paramcodes

Product or interface

CLI - interactive TUI

Version

0.6.11

Platform

Linux

OS version and architecture

Arch Linux x64

Issue area

Agent stuck / slow / repeated loop

Desktop log upload ID (optional)

No response

Steps to reproduce

  • at every prompt or loop i use it gets stuck and ends up using whole available RAM in my system

Expected and actual behavior

  • should work normally

Redacted error summary

Screenshots

I just said 'hi' and it got frozen and you can see it's eating 3 gigs of RAM already

Before submitting

  • I have searched existing issues.
  • I have included my version and removed sensitive information.

Activity

  1. hetaoBackend commented on Oct 20, 2026

    @hetaoBackend
    Collaborator

    Hi @paramcodes, thanks for the report and the screenshot.

    We'd like to narrow this down. One area we're looking at is how 0.6.11 watches the workspace on Linux: for large directory trees, this can use a lot of memory. 0.6.12, already on npm, changes this code path on Linux. Could you help with the following?

    1. Try 0.6.12. Update with npm install -g @minimax-ai/code@latest --registry=https://registry.npmjs.org/ (or rerun the install script), then check whether the problem still happens.
    2. Working directory. Which directory do you start mcode from: a project, your home directory (~), or something else? Is it inside a Git repository (including a dotfiles repo in ~)?
    3. Size of that directory. Please share the output of:
      cd <the directory you start mcode in>
      find . -type d 2>/dev/null | wc -l
      git rev-parse --show-toplevel 2>/dev/null
      cat /proc/sys/fs/inotify/max_user_watches
    4. Empty-directory test. Does it still freeze and grow in memory if you start it in an empty directory?
      mkdir -p /tmp/mcode-test && cd /tmp/mcode-test && mcode
    5. When the memory grows. Does memory climb right after launch, before you send anything, or only after you send a prompt? Roughly how high does it get, and does the process exit or get OOM-killed?
    6. Environment. Your Node.js version (node -v) and how you installed MCode (install script or npm).

    If the TUI responds after a restart, you can also run /feedback <short description> in it. This submits a redacted diagnostic bundle. Please paste the Upload ID it shows here, so we can look at the logs on our side.

    Thanks!

  2. paramcodes commented on Oct 22, 2026

    @paramcodes
    Author

    Thanks @hetaoBackend. Diagnostics below.

    1. Version tested: updated to 0.6.12 (npm install -g @minimax-ai/code@latest --registry=https://registry.npmjs.org/). mcode --version → 0.6.12. The freeze/memory blowup still reproduces on the same workspace.

    2. Working directory: I start MCode from my home directory (~, /home/param). It is not inside a Git repository (git rev-parse --show-toplevel → "not a git repository"). I also have smaller project workspaces (~/Projects/noodle, ~/Work/maggi, ~/Work/poly-ai) which are git repos and behave fine.

    3. Size of that directory:

    cd /home/param
    find . -type d 2>/dev/null | wc -l   # 324193
    find . -type f 2>/dev/null | wc -l   # 2663015
    cat /proc/sys/fs/inotify/max_user_watches  # 524288
    

    4. Empty-directory test: mkdir -p /tmp/mcode-test && cd /tmp/mcode-test && mcode → TUI launches normally, no freeze, no memory growth. So the problem is tied to the size of the opened tree, not the empty case.

    5. When memory grows: It climbs right after launch in ~ (the TUI shows "Starting server…" for ~30s while indexing), and the process gets sluggish/OOM-prone on every turn; in an empty dir it stays flat. In ~ the TUI takes ~30s to settle before I can even send a prompt.

    6. Environment: Node.js v26.8.2 (mise). MCode installed via npm (0.6.12). I also use the MiniMax Code desktop app (3.1.4 unofficial Linux build), which has ~ configured as a workspace too, so the same watcher path likely applies there.

    Conclusion / ask: The watcher appears to recursively index the whole home tree (324k dirs). Could the Linux watcher (a) skip ignored/hidden dirs by default, (b) respect .gitignore/ignore files even outside a git repo, or (c) not watch ~ unless explicitly opted in? Happy to provide an Upload ID via /feedback if useful — just let me know if you'd like one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageAwaiting maintainer assessmenttuiInteractive terminal UI (TUI)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions