# agent: Use compaction boundaries when generating summaries and titles \(\#60141\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6a1ced4a8ed8ed3e58d4125531c83affa84995d0

Requested commit: 6a1ced4a8ed8ed3e58d4125531c83affa84995d0

Commit: 6a1ced4a8ed8ed3e58d4125531c83affa84995d0

Tree: b2e061d6fb95d250deb819c07270af9018b8d11d

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
agent: Use compaction boundaries when generating summaries and titles (#60141)

Summary:

- Use the compaction-aware request history when generating thread
summaries.
- Reuse the same compaction boundary logic for thread title generation,
including saved-thread title regeneration.
- Add regression tests for summary and title request construction with
compacted history.

Tests:

- `cargo test -p agent uses_compacted_history`

Release Notes:

- Improved agent thread summary and title generation to respect
compaction boundaries.

Co-authored-by: gaauwe <gaauwe@users.noreply.github.com>
```

## Parents

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

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