# agent_ui: Add reload controls for failed agent connections \(\#62669\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/96382d8e7e3a63c373a248b4f2895440026ec9f3)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 96382d8e7e3a63c373a248b4f2895440026ec9f3

Requested commit: 96382d8e7e3a63c373a248b4f2895440026ec9f3

Commit: 96382d8e7e3a63c373a248b4f2895440026ec9f3

Tree: 809c2bd0ad8263eade3fe75e578d484db17112ce

Author: CodeNebula

Committer: GitHub

## Message

```
agent_ui: Add reload controls for failed agent connections (#62669)

## Summary

Follow-up to KevinLaveto's #58213 (closed due to no response). Adds two
ways to restart a broken external ACP agent connection from the Agent
Panel, without restarting Zed:

1. A retry button in the toolbar, shown when the active thread's agent
is in `LoadError` state.
2. A "Reload Agent" entry in the panel options menu, available whenever
an agent thread is active.

Both call `ConversationView::retry_connection`, which drops the cached
connection entry (via `AgentConnectionStore::restart_connection`) so the
next request spawns a fresh server process, then rebuilds the thread
state. This covers both launch failures and agents that died after
connecting.

Closes the scenarios in #52102, #55501, #60213, #61386 and
zed-industries/zed#62668.

## Showcase


https://github.com/user-attachments/assets/51b5b588-187d-45fb-a35c-b7d625644b30





Release Notes:

- Added the ability to reload a broken external agent connection from
the Agent Panel without restarting Zed.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
```

## Parents

- [693140abac79cdba54e2964bed057dd639889045](https://git.cafe/gitcafe/zed/commit/693140abac79cdba54e2964bed057dd639889045?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/96382d8e7e3a63c373a248b4f2895440026ec9f3?format=markdown)
