[Feature]: Add loop / repetition detection to stop runaway model output (e.g., endless emoji stream)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start by locating the interactive TUI's streaming generation path and how it cancels a run when the user presses Esc; the issue does not name specific files or tests. Check whether output limits or repetition checks already exist, then trace how a stop notice and retry or continue options reach the user. Done means repetitive streaming output can be detected, stopped, and covered by configurable safeguards.
索引モデルが issue の本文から書いたものです。
説明
Product or interface
CLI - interactive TUI
Use case and problem
I'm using Mcode with BYOK (Bring Your Own Key) and the MiMo-V2.6-Pro model. Partway through a task, the model appeared to hallucinate and started emitting the same emoji over and over. The output never stopped on its own: the session kept showing Running (2min14s and counting) while the terminal filled with hundreds of identical emoji.
Today the only way out is to notice it and press Esc manually. If I'm not watching the session, it keeps generating indefinitely, which wastes tokens/cost on my own API key and blocks the rest of the task.
Question: does Mcode currently have any built-in mechanism to detect and break infinite/degenerate generation loops? If not, I'd like to request one.
Desired behavior
Mcode should detect degenerate, repetitive output and stop it automatically, regardless of which provider/model is used (including BYOK models).
Acceptance criteria:
- Detect repetition in the streaming output (e.g., the same token, n-gram, or line repeated beyond a threshold) and abort the current generation.
- Enforce a sensible per-turn output cap (max output tokens and/or max wall-clock time) as a safety net.
- When a loop is detected, show a clear notice such as:
Generation stopped: repetitive output detected (model may be looping).and return control to the user, with options to retry or continue. - Make thresholds configurable (or allow disabling) in settings, since some legitimate outputs may be repetitive.
- Optionally pass
frequency_penalty/repetition_penalty/max_tokensto providers that support them, configurable per model.
Platform
macOS
Alternatives and additional context
- Workaround: manually pressing
Escto stop the run. This only works if I'm actively watching. - Model:
MiMo-V2.6-Provia BYOK. I understand the root cause is model behavior, but a client-side guard would protect users from any model that falls into a loop. - A screenshot of the runaway output is attached below.
- 主要言語
- TypeScript
- スター
- 2.2k
- フォーク
- 281
- 平均マージ
- 14時間 26分
- マージ済み PR(30日)
- 38
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MiniMax-AI/minimax-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MiniMax-AI/minimax-code#556 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#507 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage tui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MiniMax-AI/minimax-code#481 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug cli documentation needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
MiniMax-AI/minimax-code#299 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
MiniMax-AI/minimax-code#588 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
MiniMax-AI/minimax-code の issue をすべて見る
似ている issue
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
liberation-data/drivine#615 ·
メンテナーはふだん 1 日以内に返信
-
backend bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
geolens-io/geolens#3639 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
radius-project/ai-extensions#1196 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100