Skip to content

ACP Session Usage#345

Merged
benbrandt merged 7 commits intozed-industries:mainfrom
SteffenDE:sd-session-usage
Feb 26, 2026
Merged

ACP Session Usage#345
benbrandt merged 7 commits intozed-industries:mainfrom
SteffenDE:sd-session-usage

Conversation

@SteffenDE
Copy link
Contributor

The AI in #344 had one good idea: only use the usage from the last assistant message for context size. Of course, usage on the AssistantMessage is not documented in the Agent SDK (we need to do an ugly cast), but this seems to work alright.

We don't get the exact new usage after compaction, so I set it to zero.

@cla-bot cla-bot bot added the cla-signed label Feb 24, 2026
@SteffenDE SteffenDE marked this pull request as ready for review February 25, 2026 20:48
@benbrandt benbrandt merged commit 218661f into zed-industries:main Feb 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants