Skip to content

Conversation

@dannykopping
Copy link
Collaborator

@dannykopping dannykopping commented Oct 22, 2025

Injected tools are not being cached currently, leading to unnecessarily inflated costs.

This PR follows guidance from https://docs.claude.com/en/docs/build-with-claude/prompt-caching#prompt-caching-examples:

The cache_control parameter on the last tool definition caches all tool definitions.

Signed-off-by: Danny Kopping <danny@coder.com>
Copy link
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Signed-off-by: Danny Kopping <danny@coder.com>
@dannykopping dannykopping changed the base branch from req_logging to main October 23, 2025 16:09
@dannykopping dannykopping changed the base branch from main to req_logging October 23, 2025 16:10
Signed-off-by: Danny Kopping <danny@coder.com>
Copy link
Collaborator Author

Closing this out; trying to second-guess the client's caching decisions is a recipe for pain.
The original issue of inflated costs was thought to have been caused by lack of tool caching; this was actually incorrect. We were in fact adding coder's MCP tools twice (both via bridge's auto-injection and configuring Claude Code to do it client-side).

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.

2 participants