# agent: Fix terminal command truncation in confirmation dialogs \(\#40570\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8150d59b27c973ef1df76fbb24fde7865695b88f

Requested commit: 8150d59b27c973ef1df76fbb24fde7865695b88f

Commit: 8150d59b27c973ef1df76fbb24fde7865695b88f

Tree: 6a100434e714eb538741ba06086ce4463a174d3c

Author: Miguel Cárdenas

Committer: GitHub

## Message

```
agent: Fix terminal command truncation in confirmation dialogs (#40570)

Closes #40322

When users run multi-line terminal commands, the confirmation dialog was
only showing the first line with '- N more lines' truncated. This meant
dangerous commands like 'rm -rf' or 'sudo' operations could be hidden
from view, creating a security risk.

Now terminal commands always display in full, with scroll support for
very long commands (20+ lines) to keep the confirmation buttons visible.

Other tools continue using truncation for better UI efficiency since
they don't pose the same security concerns.

Release Notes:

- Agent: Fixed terminal command truncation in the agent panel to better
expose long commands (e.g., potentially dangerous multi-line commands
are now fully visible before execution)

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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