Summary
Zed spawns external agent server processes (codex-acp, codex app-server, code-mode-host, claude-agent-acp) for Agent Panel threads, but never terminates them when a thread is closed or reset. Over a day of heavy agent usage, these accumulate as orphans.
Observed impact
After one day of use I found 55 live agent processes totaling 3.1 GB resident RSS (with virtual/compressed memory reported far higher by Activity Monitor). The oldest orphans were 2h+ old, belonging to threads long closed. Killing them manually (pkill -f codex-acp etc.) recovered ~2.6 GB immediately; Zed relaunches a clean process on the next thread with no ill effect.
Each codex app-server also loads the full skills/marketplace index into memory, so the per-process footprint multiplies quickly.
Steps to reproduce
- Open the Agent Panel with an external ACP agent (e.g. Codex).
- Start a thread, then close it (or start a new thread / reset).
- Repeat several times.
ps aux | grep -E "codex-acp|codex app-server" — one process pair per thread remains, indefinitely.
Expected
Closing a thread (or at least quitting Zed) should terminate the associated agent server processes, or idle processes should be reaped after a timeout.
Environment
- Zed 1.11.3 (stable)
- macOS 26.5.2 (Darwin 25.5.0), Apple Silicon
- Agents: Codex ACP (
codex-acp / codex app-server), Claude Code ACP
Summary
Zed spawns external agent server processes (
codex-acp,codex app-server,code-mode-host,claude-agent-acp) for Agent Panel threads, but never terminates them when a thread is closed or reset. Over a day of heavy agent usage, these accumulate as orphans.Observed impact
After one day of use I found 55 live agent processes totaling 3.1 GB resident RSS (with virtual/compressed memory reported far higher by Activity Monitor). The oldest orphans were 2h+ old, belonging to threads long closed. Killing them manually (
pkill -f codex-acpetc.) recovered ~2.6 GB immediately; Zed relaunches a clean process on the next thread with no ill effect.Each
codex app-serveralso loads the full skills/marketplace index into memory, so the per-process footprint multiplies quickly.Steps to reproduce
ps aux | grep -E "codex-acp|codex app-server"— one process pair per thread remains, indefinitely.Expected
Closing a thread (or at least quitting Zed) should terminate the associated agent server processes, or idle processes should be reaped after a timeout.
Environment
codex-acp/codex app-server), Claude Code ACP