ACP agents can't be recovered after SSH disconnect
Author: treuherzCreated Jul 1, 2026Updated Sep 17, 2026
Labelsstate:needs triage
Reproduction steps
- Open a remote project in Zed
- Open an agent thread, start chatting (I've reproduced with Claude Code, OpenCode and Hermes)
- Force the SSH connection to fail (e.g.
pkill sshfrom the client machine) - Agent thread is gone, with a red error. "Failed to Launch"/"Server exited with status exit status: 255"
- Try to recover the agent!
- Go to the agent settings panel, see that Claude Code has a green dot against it despite the error
- Click the reconnect icon, wait for it to "succeed"
- Go back to the agent thread, still dead with new error: "Failed to Launch"/"Internal error: "send failed because receiver is gone""
- Try creating a new agent thread, nothing happens.
Doing pkill ssh is the easiest way to force this, but the same thing happens for me when I am disconnected for any other reason, like briefly locking my laptop or switching networks.
The only way I've found to recover is with the workspace: reload action, or sometimes, after reconnecting the agent as in step 5 above, selecting an older agent thread that Zed hasn't already classed as dead.
Current vs. Expected behavior
- The agent thread should reconnect itself after reconnecting to the remote. Zed should restart the ACP service and resume the session if necessary, rather than showing the user an error immediately.
- Reconnecting the ACP service from settings should not leave threads for that agent stuck in a dead state
- Creating a new agent thread after successfully reconnecting to the ACP service shouldn't fail.
Zed version and system specs
Zed: v1.8.2+stable.314.5e33fc855f6fe58dd82ed6acb1f58034c3fb6bac (Zed) OS: macOS 15.3.1 Memory: 24 GiB Architecture: aarch64
Attach Zed log file
Logs2026-07-01T17:01:15+01:00 WARN [remote::remote_client] remote heartbeat: connection activity channel has been dropped. stopping.
2026-07-01T17:01:15+01:00 ERROR [remote::remote_client] proxy process terminated unexpectedly: 255
2026-07-01T17:01:15+01:00 INFO [remote::remote_client] setting state to 'reconnecting'
2026-07-01T17:01:15+01:00 INFO [remote::remote_client] Trying to reconnect to remote server... Attempt 1
2026-07-01T17:01:17+01:00 INFO [remote::transport::ssh] Remote is windows: false
2026-07-01T17:01:17+01:00 INFO [remote::transport::ssh] Remote shell discovered: /bin/zsh
2026-07-01T17:01:17+01:00 INFO [remote::transport::ssh] Remote platform discovered: RemotePlatform { os: Linux, arch: X86_64 }
2026-07-01T17:01:18+01:00 WARN [remote_server] (remote server) stdin read failed: unexpected end of file
2026-07-01T17:01:18+01:00 WARN [remote_server] (remote server) error reading message on stdin, dropping connection.
2026-07-01T17:01:18+01:00 INFO [remote_server] (remote server) accepting new connections
2026-07-01T17:01:18+01:00 INFO [remote_server] (remote server) accepted new connections
2026-07-01T17:01:18+01:00 INFO [remote::remote_client] Successfully reconnected
2026-07-01T17:04:20+01:00 INFO [node_runtime] (remote server) using Node.js found on PATH: SystemNodeRuntime { node: "/home/linuxbrew/.linuxbrew/bin/node", npm: "/home/linuxbrew/.linuxbrew/bin/npm", scratch_dir: "/home/redacted/.local/share/zed/node" }
2026-07-01T17:04:20+01:00 INFO [agent_client_protocol::util] connection; name="zed"
2026-07-01T17:10:38+01:00 INFO [remote_server] (remote server) starting up with PID 122997:
pid_file: "/home/redacted/.local/share/zed/server_state/setup-1/server.pid", log_file: "/home/redacted/.local/share/zed/logs/server-setup-1.log", stdin_socket: "/home/redacted/.local/share/zed/server_state/setup-1/stdin.sock", stdout_socket: "/home/redacted/.local/share/zed/server_state/setup-1/stdout.sock", stderr_socket: "/home/redacted/.local/share/zed/server_state/setup-1/stderr.sock"
2026-07-01T17:10:38+01:00 INFO [remote_server] (remote server) gpui app started, initializing server
2026-07-01T17:10:38+01:00 INFO [remote_server] (remote server) accepting new connections
2026-07-01T17:10:38+01:00 INFO [remote_server] (remote server) accepted new connections
2026-07-01T17:10:38+01:00 ERROR [remote::remote_client] client:unhandled remote message name:ExternalAgentsUpdated
2026-07-01T17:10:38+01:00 INFO [crashes] (remote server) connected to crash handler process after 100ms
2026-07-01T17:10:38+01:00 INFO [crashes] (remote server) panic handler registered
2026-07-01T17:10:38+01:00 INFO [crashes] (remote server) crash signal handlers installed
2026-07-01T17:10:38+01:00 INFO [crashes] (remote server) crash handler registered
2026-07-01T17:10:38+01:00 ERROR [agent] Failed to authenticate provider: ChatGPT Subscription: Sign in with your ChatGPT Plus or Pro subscription to use this provider.
2026-07-01T17:10:38+01:00 INFO [remote_server] (remote server) Got new node settings: NodeBinarySettings { path: None, npm_path: None, ignore_system_version: false }
2026-07-01T17:10:39+01:00 INFO [util] (remote server) set environment variables from shell:/bin/zsh, path:/home/redacted/code/monorepo/output/linux-amd64/bin:/home/redacted/.krew/bin:/Users/et/Library/pnpm:/home/redacted/go/bin:/home/redacted/.local/bin:/usr/local/sbin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/redacted/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/redacted/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/redacted/.kubectl-plugin-completion
2026-07-01T17:10:39+01:00 INFO [git::repository] (remote server) opening git repository at "/home/redacted/code/metal-config/.git" using git binary "/home/linuxbrew/.linuxbrew/bin/git"
2026-07-01T17:10:39+01:00 INFO [node_runtime] (remote server) using Node.js found on PATH: SystemNodeRuntime { node: "/home/linuxbrew/.linuxbrew/bin/node", npm: "/home/linuxbrew/.linuxbrew/bin/npm", scratch_dir: "/home/redacted/.local/share/zed/node" }
2026-07-01T17:10:39+01:00 INFO [agent_client_protocol::util] connection; name="zed"
2026-07-01T17:10:40+01:00 INFO [lsp] (remote server) starting language server process. binary path: "/home/linuxbrew/.linuxbrew/bin/node", working directory: "/home/redacted/code/metal-config", args: ["/home/redacted/.local/share/zed/languages/yaml-language-server/node_modules/yaml-language-server/bin/yaml-language-server", "--stdio"]
2026-07-01T17:10:40+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:40 [INFO] acp_adapter.entry: Loaded env from /home/redacted/.hermes/.env
2026-07-01T17:10:40+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:40 [INFO] acp_adapter.entry: Starting hermes-agent ACP adapter
2026-07-01T17:10:40+01:00 INFO [remote_server] (remote server) starting up with PID 123395:
pid_file: "/home/redacted/.local/share/zed/server_state/setup-2/server.pid", log_file: "/home/redacted/.local/share/zed/logs/server-setup-2.log", stdin_socket: "/home/redacted/.local/share/zed/server_state/setup-2/stdin.sock", stdout_socket: "/home/redacted/.local/share/zed/server_state/setup-2/stdout.sock", stderr_socket: "/home/redacted/.local/share/zed/server_state/setup-2/stderr.sock"
2026-07-01T17:10:40+01:00 INFO [remote_server] (remote server) gpui app started, initializing server
2026-07-01T17:10:40+01:00 INFO [remote_server] (remote server) accepting new connections
2026-07-01T17:10:40+01:00 INFO [remote_server] (remote server) accepted new connections
2026-07-01T17:10:40+01:00 ERROR [remote::remote_client] client:unhandled remote message name:ExternalAgentsUpdated
2026-07-01T17:10:40+01:00 INFO [crashes] (remote server) connected to crash handler process after 100ms
2026-07-01T17:10:40+01:00 INFO [crashes] (remote server) panic handler registered
2026-07-01T17:10:40+01:00 INFO [crashes] (remote server) crash signal handlers installed
2026-07-01T17:10:40+01:00 INFO [crashes] (remote server) crash handler registered
2026-07-01T17:10:40+01:00 ERROR [agent] Failed to authenticate provider: ChatGPT Subscription: Sign in with your ChatGPT Plus or Pro subscription to use this provider.
2026-07-01T17:10:41+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:41 [INFO] acp_adapter.server: ACP client connected
2026-07-01T17:10:41+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:41 [INFO] acp_adapter.server: Initialize from zed (protocol v1)
2026-07-01T17:10:41+01:00 INFO [remote_server] (remote server) Got new node settings: NodeBinarySettings { path: None, npm_path: None, ignore_system_version: false }
2026-07-01T17:10:41+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:41 [INFO] run_agent: Loaded environment variables from /home/redacted/.hermes/.env
2026-07-01T17:10:42+01:00 INFO [util] (remote server) set environment variables from shell:/bin/zsh, path:/home/redacted/code/monorepo/output/linux-amd64/bin:/home/redacted/.krew/bin:/Users/et/Library/pnpm:/home/redacted/go/bin:/home/redacted/.local/bin:/usr/local/sbin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/redacted/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/redacted/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/redacted/.kubectl-plugin-completion
2026-07-01T17:10:42+01:00 INFO [git::repository] (remote server) opening git repository at "/home/redacted/code/cloud-config/.git" using git binary "/home/linuxbrew/.linuxbrew/bin/git"
2026-07-01T17:10:42+01:00 INFO [node_runtime] (remote server) using Node.js found on PATH: SystemNodeRuntime { node: "/home/linuxbrew/.linuxbrew/bin/node", npm: "/home/linuxbrew/.linuxbrew/bin/npm", scratch_dir: "/home/redacted/.local/share/zed/node" }
2026-07-01T17:10:42+01:00 INFO [agent_client_protocol::util] connection; name="zed"
2026-07-01T17:10:42+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:42 [INFO] run_agent: OpenAI client created (agent_init, shared=True) thread=MainThread:139857798842176 provider=custom base_url=https://models.think.cloud.evroc.com/v1 model=zai-org/GLM-5.2
2026-07-01T17:10:42+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:42 [WARNING] tools.registry: check_fn _browser_cdp_check returned False; dependent tools will be unavailable this turn
2026-07-01T17:10:42+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:42 [WARNING] tools.registry: check_fn _browser_dialog_check returned False; dependent tools will be unavailable this turn
2026-07-01T17:10:42+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:42 [INFO] agent.auxiliary_client: Vision auto-detect: using main provider custom:evroc (zai-org/GLM-5.2)
2026-07-01T17:10:43+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:43 [INFO] agent.auxiliary_client: Vision auto-detect: using main provider custom:evroc (zai-org/GLM-5.2)
2026-07-01T17:10:43+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:43 [WARNING] tools.registry: check_fn check_web_api_key returned False; dependent tools will be unavailable this turn
2026-07-01T17:10:43+01:00 INFO [lsp] (remote server) starting language server process. binary path: "/home/redacted/.local/share/zed/languages/package-version-server/package-version-server-v0.0.10", working directory: "/home/redacted/code/cloud-config", args: []
2026-07-01T17:10:43+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:43 [INFO] agent.model_metadata: Could not detect context length for model 'zai-org/GLM-5.2' at https://models.think.cloud.evroc.com/v1 — defaulting to 256,000 tokens (probe-down). Set model.context_length in config.yaml to override.
2026-07-01T17:10:43+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:43 [INFO] agent.model_metadata: Using hardcoded context length 1,048,576 for model 'zai-org/GLM-5.2' (custom endpoint, catalog match on 'glm-5.2')
2026-07-01T17:10:43+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:43 [INFO] acp_adapter.session: Restored ACP session ae9a9556-9c68-4931-ac13-1f64e950bc2c from DB (8 messages)
2026-07-01T17:10:43+01:00 WARN [agent_servers::acp] agent stderr: 2026-07-01 16:10:43 [INFO] acp_adapter.server: Loaded session ae9a9556-9c68-4931-ac13-1f64e950bc2c
2026-07-01T17:10:43+01:00 INFO [lsp] (remote server) starting language server process. binary path: "/home/linuxbrew/.linuxbrew/bin/node", working directory: "/home/redacted/code/cloud-config", args: ["/home/redacted/.local/share/zed/languages/bash-language-server/node_modules/bash-language-server/out/cli.js", "start"]
2026-07-01T17:10:43+01:00 INFO [lsp] (remote server) starting language server process. binary path: "/home/linuxbrew/.linuxbrew/bin/node", working directory: "/home/redacted/code/cloud-config", args: ["/home/redacted/.local/share/zed/languages/yaml-language-server/node_modules/yaml-language-server/bin/yaml-language-server", "--stdio"]
2026-07-01T17:10:43+01:00 INFO [lsp] (remote server) starting language server process. binary path: "/home/linuxbrew/.linuxbrew/bin/node", working directory: "/home/redacted/code/cloud-config", args: ["/home/redacted/.local/share/zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2026-07-01T17:10:44+01:00 INFO [auto_update] Auto Update: checking for updates
2026-07-01T17:10:47+01:00 ERROR [agent_servers::acp] ACP connection error: Internal error: {
"spawned_at": "/Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/agent-client-protocol-0.14.0/src/jsonrpc.rs:1245:39",
"data": "Broken pipe (os error 32)"
}
2026-07-01T17:10:51+01:00 INFO [agent_client_protocol::util] connection; name="zed"
2026-07-01T17:11:24+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:25+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:25+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:25+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:26+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:26+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:27+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:27+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:27+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:28+01:00 WARN [editor] timed out waiting for formatting
2026-07-01T17:11:28+01:00 INFO [client] cloud websocket disconnected, will reconnect
2026-07-01T17:11:30+01:00 INFO [remote::remote_client] shutting down remote processes
2026-07-01T17:11:30+01:00 INFO [remote::remote_client] shutting down remote processes
2026-07-01T17:11:30+01:00 INFO [remote::remote_client] shutting down remote processes
2026-07-01T17:11:30+01:00 WARN [lsp::input_handler] failed to deserialize LSP message:
{"jsonrpc":"2.0","result":{}}
2026-07-01T17:11:30+01:00 ERROR [lsp] Shutdown request failure, server prettier (id 4): Error: Unknown method: shutdown
While handling prettier request: {"jsonrpc":"2.0","id":6,"method":"shutdown"}
2026-07-01T17:11:30+01:00 INFO [zed] ========== starting zed version 1.8.2+stable.314.5e33fc855f6fe58dd82ed6acb1f58034c3fb6bac, sha 5e33fc8 ==========
2026-07-01T17:11:30+01:00 INFO [crashes] spawning crash handler process
2026-07-01T17:11:30+01:00 INFO [zed] Using git binary path: "/Applications/Zed.app/Contents/MacOS/git"
2026-07-01T17:11:31+01:00 INFO [extension_host] extensions updated. loading 11, reloading 0, unloading 0
2026-07-01T17:11:31+01:00 INFO [prompt_store::rules_to_skills_migration] Rules-to-skills migration already marked done; skipping startup migration
2026-07-01T17:11:31+01:00 INFO [auto_update] Auto Update: checking for updates
2026-07-01T17:11:31+01:00 INFO [workspace] Rendered first frame
2026-07-01T17:11:31+01:00 INFO [client] set status on client 0: Authenticating
2026-07-01T17:11:31+01:00 INFO [crashes] connected to crash handler process after 400ms
2026-07-01T17:11:31+01:00 INFO [crashes] panic handler registered
2026-07-01T17:11:31+01:00 INFO [crashes] crash signal handlers installed
2026-07-01T17:11:31+01:00 INFO [crashes] crash handler registered
2026-07-01T17:11:33+01:00 INFO [util] set environment variables from shell:/bin/zsh, path:/Users/et/.venv-vllm-metal/bin:/Users/et/go/bin:/Users/et/.local/bin:/usr/local/sbin:/Users/et/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/et/go/bin:/Users/et/.local/bin:/usr/local/sbin:/Users/et/Library/pnpm:/Users/et/.venv-vllm-metal/bin
2026-07-01T17:11:33+01:00 INFO [node_runtime] using Node.js found on PATH: SystemNodeRuntime { node: "/Users/et/.local/bin/node", npm: "/Users/et/.local/bin/npm", scratch_dir: "/Users/et/Library/Application Support/Zed/node" }
2026-07-01T17:11:38+01:00 INFO [lsp] starting language server process. binary path: "/Users/et/.local/bin/node", working directory: "/Users/et/.config/zed", args: ["/Users/et/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2026-07-01T17:11:39+01:00 INFO [client] set status on client 204109: Authenticated
2026-07-01T17:11:42+01:00 INFO [remote::transport::ssh] Remote is windows: false
2026-07-01T17:11:42+01:00 INFO [remote::transport::ssh] Remote shell discovered: /bin/zsh
2026-07-01T17:11:42+01:00 INFO [remote::transport::ssh] Remote platform discovered: RemotePlatform { os: Linux, arch: X86_64 }
2026-07-01T17:11:53+01:00 INFO [remote::transport::ssh] Remote is windows: false
2026-07-01T17:11:54+01:00 INFO [remote::transport::ssh] Remote shell discovered: /bin/zsh
2026-07-01T17:11:54+01:00 INFO [remote::transport::ssh] Remote platform discovered: RemotePlatform { os: Linux, arch: X86_64 }
2026-07-01T17:11:54+01:00 INFO [remote_server] (remote server) starting up with PID 126068:
pid_file: "/home/redacted/.local/share/zed/server_state/setup-1/server.pid", log_file: "/home/redacted/.local/share/zed/logs/server-setup-1.log", stdin_socket: "/home/redacted/.local/share/zed/server_state/setup-1/stdin.sock", stdout_socket: "/home/redacted/.local/share/zed/server_state/setup-1/stdout.sock", stderr_socket: "/home/redacted/.local/share/zed/server_state/setup-1/stderr.sock"
2026-07-01T17:11:54+01:00 INFO [remote_server] (remote server) gpui app started, initializing server
2026-07-01T17:11:54+01:00 INFO [remote_server] (remote server) accepting new connections
2026-07-01T17:11:54+01:00 INFO [remote_server] (remote server) accepted new connections
2026-07-01T17:11:54+01:00 ERROR [remote::remote_client] client:unhandled remote message name:ExternalAgentsUpdated
2026-07-01T17:11:54+01:00 INFO [crashes] (remote server) connected to crash handler process after 100ms
2026-07-01T17:11:54+01:00 INFO [crashes] (remote server) panic handler registered
2026-07-01T17:11:54+01:00 INFO [crashes] (remote server) crash signal handlers installed
2026-07-01T17:11:54+01:00 INFO [crashes] (remote server) crash handler registered
2026-07-01T17:11:55+01:00 ERROR [agent] Failed to authenticate provider: ChatGPT Subscription: Sign in with your ChatGPT Plus or Pro subscription to use this provider.
2026-07-01T17:11:55+01:00 INFO [remote_server] (remote server) Got new node settings: NodeBinarySettings { path: None, npm_path: None, ignore_system_version: false }
2026-07-01T17:11:56+01:00 INFO [util] (remote server) set environment variables from shell:/bin/zsh, path:/home/redacted/code/monorepo/output/linux-amd64/bin:/home/redacted/.krew/bin:/Users/et/Library/pnpm:/home/redacted/go/bin:/home/redacted/.local/bin:/usr/local/sbin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/redacted
Source: zed-industries/zed