Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

ACP mode: agent keeps emitting updates for terminals the client no longer has after session resume (Zed drops them, replies/plan updates lost)

Abierto
#3,959 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Área
api, backend

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

  1. In Zed, run an ACP thread with Kimi; have the agent execute shell commands / spawn background tasks (agent-side terminals get created).
  2. Restart Zed while the Kimi session persists under ~/.kimi-code/sessions/.
  3. Resume the same thread from history.
  4. 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 ACP fs/read_text_file bridge even when they don't exist, producing Resource not found warnings 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MoonshotAI/kimi-code

Todos los issues de MoonshotAI/kimi-code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.