ACP mode: agent keeps emitting updates for terminals the client no longer has after session resume (Zed drops them, replies/plan updates lost)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Start at the kimi acp session/load handling and trace how terminal IDs are retained and emitted after a client reconnects. Reproduce by resuming a session under ~/.kimi-code/sessions/ in Zed, then verify that terminals are re-created or stale terminal updates are pruned so replies and plan updates continue reaching the client.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Repository to file at: https://github.com/MoonshotAI/kimi-code/issues/new
Summary
When Kimi Code runs as an ACP agent inside Zed (kimi acp), restarting the editor and resuming the previous thread leads to a persistent stream of failed session updates on the client side. Zed logs show, every ~20–60 seconds for the whole life of the resumed session:
ERROR [agent_servers::acp] Failed to handle session update for SessionId("session_f8adf072-..."):
Error { code: -32603, message: "Internal error",
data: "Terminal with id `7cf4c5dd-90ca-4408-a013-bc01993b1259` not found" }
Because Zed drops the failed update entirely, users lose live content: parts of agent/subagent replies never appear, tool-call statuses freeze, and the ACP Plan panel stops checking off completed entries (e.g. stuck at "4/8" while the agent has actually finished the tasks). The data itself is intact in Kimi's session store — reopening the thread after a restart displays the "missing" replies.
Environment
- Kimi Code CLI: 0.43.1 (latest per CDN as of 2026-09-16)
- Client: Zed v1.20.2 (Flathub flatpak), ACP custom agent server:
command = "kimi", args = ["acp"] - OS: Fedora Linux (KDE), x86_64
Steps to reproduce
- In Zed, run an ACP thread with Kimi; have the agent execute shell commands / spawn background tasks (agent-side terminals get created).
- Restart Zed while the Kimi session persists under
~/.kimi-code/sessions/. - Resume the same thread from history.
- Keep working: errors fire continuously and parts of the UI stream are lost.
Expected behavior
On session/load (or when a client reconnects), the agent should re-establish terminal state with the client — re-create terminals, or stop emitting terminal updates for IDs the client has never created in its current lifetime. Live updates should reach the client regardless of restarts.
Actual behavior
The agent keeps sending updates referencing terminal IDs from before the client restart. The client cannot resolve them and discards each such update, so replies and plan updates silently vanish until the user starts a brand-new thread.
Client log evidence (Zed side): 275 occurrences in the current log file, 494 in the rotated one, spanning multiple days (2026-09-19 → 2026-09-21), all against the same resumed SessionId.
Additional notes
- Minor: the agent probes
AGENTS.md/ temp output files through the ACPfs/read_text_filebridge even when they don't exist, producingResource not foundwarnings client-side. Not harmful, but could be checked locally first. - User-side workaround: always start a new thread after a Zed restart; never resume threads that had background tasks/terminals.
Possible fix direction
Track terminal IDs per client connection; on session/load either re-announce/re-create live terminals or prune terminal references that predate the connection.
- Lenguaje dominante
- TypeScript
- Estrellas
- 7.7k
- Forks
- 1.3k
- Merge medio
- 12 h 57 min
- PR fusionados (30 d)
- 308
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
-
手机竖屏显示状态下输入框的扩展按钮没有显示Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
MoonshotAI/kimi-code#4040 ·
Los mantenedores suelen responder en 1 día
-
顶栏字体不随字体大小缩放bugAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
MoonshotAI/kimi-code#4039 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
MoonshotAI/kimi-code#4010 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
MoonshotAI/kimi-code#4008 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
docs(zh): configuration/providers.md is missing the "OAuth and credential injection" sectionAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
MoonshotAI/kimi-code#3947 ·
Los mantenedores suelen responder en 1 día
Todos los issues de MoonshotAI/kimi-code
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
lichess-org/api#678 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
PostHog/posthog.com#20628 ·
Los mantenedores suelen responder en 1 día
-
bug status:Needs Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
jupyterlab/jupyterlab#19964 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
agentscope-ai/QwenPaw#8064 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area: notebooks-jupyter bug theme: new notebook frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
posit-dev/positron#16347 · 1 comentario ·
Los mantenedores suelen responder en 1 día