# acp_thread: Fix missing and stale agent tool output \(\#64708\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 557f85d25eb9f8f17c389c38c8168b53bf50aea4

Requested commit: 557f85d25eb9f8f17c389c38c8168b53bf50aea4

Commit: 557f85d25eb9f8f17c389c38c8168b53bf50aea4

Tree: fe269f9b731a7581509dd747580382519c1b192f

Author: Ben Brandt

Committer: GitHub

## Message

```
acp_thread: Fix missing and stale agent tool output (#64708)

- Fix raw-only tool creation displaying no output and successive
raw-output updates leaving stale text visible.
- Keep structured content separate from the cached raw-output fallback,
with one `content()` accessor shared by rendering, search, visibility
checks, and Markdown export.
- Reuse the fallback's Markdown entity across raw snapshots while
preserving existing formatting, permission handling, and native replay
sequencing.

## Display rule

Nonempty structured content takes precedence. When structured content is
empty, display the latest retained raw output. Clearing structured
content restores that fallback without requiring the agent to resend its
raw output.

Release Notes:

- Fixed missing or outdated output in agent tool results.
```

## Parents

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

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