Skip to main content

Module sticky_tools

Module sticky_tools 

Source
Expand description

Sticky CCR tool injection for provider prefix-cache stability.

Once a conversation has seen at least one CCR handle, the ctx_expand tool definition stays in tools[] for the remainder of the session, even on turns with no active markers. This prevents the tool-list change from busting the provider prompt-cache prefix.

Functionsยง

ensure_tool_present
Ensure ctx_expand is present in the tools array when CCR is active. Returns true if the tool was injected.
is_ccr_active
Returns true if this conversation has ever used CCR.
mark_ccr_active
Mark a conversation as having used CCR.