[Feature]: Add loop / repetition detection to stop runaway model output (e.g., endless emoji stream)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 2.2k
- Forks
- 281
- Merge médio
- 14h 26min
- PRs com merge (30d)
- 38
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de MiniMax-AI/minimax-code
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
MiniMax-AI/minimax-code#556 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
MiniMax-AI/minimax-code#507 ·
Mantenedores costumam responder em até 1 dia
-
bug needs-triage tui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
MiniMax-AI/minimax-code#481 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug cli documentation needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
MiniMax-AI/minimax-code#299 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
MiniMax-AI/minimax-code#588 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de MiniMax-AI/minimax-code
Issues semelhantes
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingAbertae2e-failure ready-to-code
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
devswha/herdr-web-ui#2884 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
b:minor bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
software-mansion/argent#1771 ·
Mantenedores costumam responder em até 1 dia
-
Resources: New palettes of XiamenTalvez já em andamento @rmt-svc assumiu hoje. Abertaresources
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 74/100
railmapgen/rmg-palette#2491 ·
Mantenedores costumam responder em até 4 dias