Skip to content

Conversation

@SteffenDE
Copy link
Contributor

Implements #316.

@SteffenDE SteffenDE requested a review from a team as a code owner January 27, 2026 14:51
benbrandt pushed a commit to zed-industries/claude-code-acp that referenced this pull request Jan 29, 2026
I experimented with https://agentclientprotocol.com/rfds/session-usage
(see
agentclientprotocol/agent-client-protocol#415),
but the Claude Agent SDK does not seem to return the information we need
for an accurate context indicator. For example, one request to explore a
project returned 500k+ cached read tokens in Claude's `result` message,
while the agent reported 64k tokens used. I can open a PR with those
changes for reference once the Typescript SDK is updated.

To allow users to still see the current context usage, allowing to run
`/context` seems to be the second best option. This PR changes the code
to handle the `<local-command-stdout>` message that the SDK generates
when sending `/context` and includes `/context` as allowed command.

Screenshot from Tidewave with this change:

<img width="460" height="1079" alt="image"
src="https://github.com/user-attachments/assets/a3796e46-4014-4988-a993-e13d38d38d96"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant