Skip to content

ai_assistant_context_compaction_trigger_tokens

github-actions[bot] edited this page Nov 14, 2026 · 6 revisions

Filters the maximum number of consecutive failed tool rounds before the assistant stops retrying.

Auto-generated Example

add_filter(
   'ai_assistant_context_compaction_trigger_tokens',
    function( int $rounds ) {
        // Your code here.
        return $rounds;
    }
);

Parameters

  • int $rounds Maximum consecutive failed tool rounds. Default 3.

Files

apply_filters('ai_assistant_context_compaction_trigger_tokens', 24000)

← All Hooks

Clone this wiki locally