# acp_tools: Always capture ACP transport and stderr into the log ring \(\#54536\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 73127da4b7e427254ffb457f4e9a97a0b002deff

Requested commit: 73127da4b7e427254ffb457f4e9a97a0b002deff

Commit: 73127da4b7e427254ffb457f4e9a97a0b002deff

Tree: 4a9337507acd0c08f5ae87b17510354691a8d2dd

Author: Eric Holk

Committer: GitHub

## Message

```
acp_tools: Always capture ACP transport and stderr into the log ring (#54536)

Part of #54531.

Previously the log tap started disabled and only flipped on when someone
opened the ACP logs panel for the first time on a given connection. That
meant the common *'I noticed something is wrong with my agent, let me go
look at the logs'* workflow started with an empty pane \u2014 all the
traffic that led up to the problem was already gone.

This removes the `enabled` flag on `AcpLogTap` so capture is
unconditional. The backlog ring is still bounded at
`MAX_BACKLOG_MESSAGES` (2000), so memory is capped. The steady-state
cost is one channel send per transport/stderr line, which is negligible
compared to the JSON-RPC serialization that already happened to produce
the line.

Net diff is ~40 lines deleted from `acp_tools.rs` \u2014 the flag, its
accessors, the early-return in `emit`, and the `active_tap` bookkeeping
needed to enable it on first subscribe.

I confirmed with the author of the original opt-in design before making
this change.

Release Notes:

- N/A
```

## Parents

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

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