[Bug] kimi -p /goal exits 0 while the goal is still active
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- cli
Línea de trabajo
Empieza con goalExitCode en apps/kimi-code/src/cli/goal-prompt.ts y sus pruebas en apps/kimi-code/test/cli/goal-prompt.test.ts. Comprueba cómo debe corresponder active a los códigos de salida documentados en docs/en/guides/interaction.md y luego ejecuta pnpm -C apps/kimi-code exec vitest run test/cli/goal-prompt.test.ts. La tarea estará completa cuando un objetivo activo termine con un estado distinto de cero y el comportamiento esté cubierto por una prueba que pase.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What version of Kimi Code is running?
2.6.3 (source main snapshot, 2026-11-18). Confirmed with a unit test.
Which open platform/subscription were you using?
None involved.
Which model were you using?
None involved.
What platform is your computer?
Windows 11 x64.
What issue are you seeing?
kimi -p "/goal ..." can exit with status 0 while the goal is still active.
When the goal does not reach a terminal state before print_wait_ceiling_s, applyPrintBackgroundPolicy warns print goal wait ceiling reached and returns. runNativeGoalTurn then calls goalExitCode('active'), which falls through to the default and returns 0. CI therefore sees success for an incomplete goal.
What steps can reproduce the bug?
-
Run a goal that will not finish quickly:
kimi -p "/goal <long-running objective>" -
Set a small
print_wait_ceiling_s, or let the default ceiling expire. -
Observe the
print goal wait ceiling reachedwarning. -
The process exits
0, and the goal summary still hasstatus: active.
A unit-level reproduction is:
expect(goalExitCode('active')).toBe(GOAL_EXIT_CODES.complete); // currently passes, but is wrong
Running:
pnpm -C apps/kimi-code exec vitest run test/cli/goal-prompt.test.ts
with:
it('does not report success for an active goal', () => {
expect(goalExitCode('active')).not.toBe(GOAL_EXIT_CODES.complete);
});
fails with expected +0 not to be +0.
What is the expected behavior?
A non-terminal goal should not exit with the success code. The docs currently define 0 for complete, 3 for blocked, and 6 for paused. active should either map to a non-zero code (for example paused, or a new incomplete code) or the process should keep waiting until the goal reaches a terminal state.
Additional information
Relevant code:
apps/kimi-code/src/cli/goal-prompt.ts—GOAL_EXIT_CODES/goalExitCodeapps/kimi-code/src/cli/v2/run-v2-print.ts— goal wait ceiling and exit-code assignmentpackages/agent-core-v2/src/features/goal/goalOps.ts—activeis a valid non-terminal status
The documented exit-code contract is in docs/en/guides/interaction.md (0 complete, 3 blocked, 6 paused), and the changelog for #1704 says kimi -p "/goal ..." stays alive until the goal reaches a terminal state.
Contribution
- I am willing to submit a PR for this bug fix myself. I will wait for a maintainer's
/approvein this issue before opening the PR.
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.3k
- Forks
- 1.4k
- Merge medio
- 12 h 6 min
- PR fusionados (30 d)
- 596
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MoonshotAI/kimi-code
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
MoonshotAI/kimi-code#5539 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Kimi RC workspace folder picker does not display symbolic link directoriesPosiblemente ocupada @markankamaransheogarat-sys la tomó hace 2 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
MoonshotAI/kimi-code#5296 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MoonshotAI/kimi-code#5256 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
MoonshotAI/kimi-code#5057 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
MoonshotAI/kimi-code#5025 ·
Los mantenedores suelen responder en 1 día
Todos los issues de MoonshotAI/kimi-code
Issues similares
-
area/ci bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
melgarafael/DeskcommCRM#5290 ·
Los mantenedores suelen responder en 1 día
-
Add Alice&BotAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
easy enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día