Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::LoopConfig Struct Reference

Configuration for the agentic loop. More...

#include <entropic/core/engine_types.h>

Public Attributes

int max_iterations = 15
 Max loop iterations before forced stop.
 
int max_consecutive_errors = 3
 Errors before ERROR state.
 
int max_tool_calls_per_turn = 10
 Tool calls per iteration (v1.8.5)
 
int idle_timeout_seconds = 300
 Idle timeout (reserved)
 
int context_length = 16384
 Context budget for compaction (v2.0.4)
 
bool require_plan_for_complex = true
 Planning gate (reserved)
 
bool stream_output = true
 Stream vs batch generation.
 
bool auto_approve_tools = false
 Skip tool approval (v1.8.5)
 
int max_consecutive_same_tool = 5
 Anti-spiral SOFT threshold: after N consecutive calls of the SAME tool (regardless of arg similarity, since exact-arg duplicates are already handled by recent_tool_calls), the engine populates pending_anti_spiral_warning so the next turn's system reminder tells the model to pivot tools or complete.
 
int max_consecutive_same_tool_hard_block = -1
 Anti-spiral HARD threshold: when consecutive same-tool calls exceed this, the engine blocks the call BEFORE dispatch and returns a rejected_anti_spiral typed result.
 
int max_consecutive_failed_delegations = 2
 gh#64: cap on N consecutive failed delegations targeting the same tier.
 
int max_tool_result_bytes = 16384
 Maximum byte length for a single tool's result content before the engine truncates with a "[... truncated, N more bytes]" tail.
 
int message_queue_capacity = 8
 Capacity of the mid-generation user-message queue surfaced by entropic_queue_user_message.
 

Detailed Description

Configuration for the agentic loop.

Version
1.8.4

Definition at line 74 of file engine_types.h.

Member Data Documentation

◆ auto_approve_tools

bool entropic::LoopConfig::auto_approve_tools = false

Skip tool approval (v1.8.5)

Definition at line 82 of file engine_types.h.

◆ context_length

int entropic::LoopConfig::context_length = 16384

Context budget for compaction (v2.0.4)

Definition at line 79 of file engine_types.h.

◆ idle_timeout_seconds

int entropic::LoopConfig::idle_timeout_seconds = 300

Idle timeout (reserved)

Definition at line 78 of file engine_types.h.

◆ max_consecutive_errors

int entropic::LoopConfig::max_consecutive_errors = 3

Errors before ERROR state.

Definition at line 76 of file engine_types.h.

◆ max_consecutive_failed_delegations

int entropic::LoopConfig::max_consecutive_failed_delegations = 2

gh#64: cap on N consecutive failed delegations targeting the same tier.

When the lead re-delegates to a target that has just failed max_consecutive_failed_delegations times in a row, the engine blocks the call BEFORE dispatching the child loop and pushes a [DELEGATION REJECTED] ... stop retrying message to the lead's context so it pivots or completes. Defaults to 2 — any failure deserves a retry; chronic failures don't. Reset counter on (a) successful delegation, (b) delegation to a different target, or (c) any non-delegation tool call.

Definition at line 108 of file engine_types.h.

◆ max_consecutive_same_tool

int entropic::LoopConfig::max_consecutive_same_tool = 5

Anti-spiral SOFT threshold: after N consecutive calls of the SAME tool (regardless of arg similarity, since exact-arg duplicates are already handled by recent_tool_calls), the engine populates pending_anti_spiral_warning so the next turn's system reminder tells the model to pivot tools or complete.

Advisory only — the engine does NOT block the call. (Demo ask #5, v2.1.0)

Definition at line 90 of file engine_types.h.

◆ max_consecutive_same_tool_hard_block

int entropic::LoopConfig::max_consecutive_same_tool_hard_block = -1

Anti-spiral HARD threshold: when consecutive same-tool calls exceed this, the engine blocks the call BEFORE dispatch and returns a rejected_anti_spiral typed result.

Negative (default sentinel -1) means derive at config-load time as (max_consecutive_same_tool + 2). Set to a large value to effectively disable the hard block while keeping the soft advisory warning. (#14, v2.1.4)

Definition at line 98 of file engine_types.h.

◆ max_iterations

int entropic::LoopConfig::max_iterations = 15

Max loop iterations before forced stop.

Definition at line 75 of file engine_types.h.

◆ max_tool_calls_per_turn

int entropic::LoopConfig::max_tool_calls_per_turn = 10

Tool calls per iteration (v1.8.5)

Definition at line 77 of file engine_types.h.

◆ max_tool_result_bytes

int entropic::LoopConfig::max_tool_result_bytes = 16384

Maximum byte length for a single tool's result content before the engine truncates with a "[... truncated, N more bytes]" tail.

Single global cap; per-tool overrides not yet supported. 0 disables truncation. Default 16 KB — large enough for typical filesystem.read_file / git.diff returns, small enough that runaway tool output cannot exhaust the context budget alone. (Demo ask #6, v2.1.0)

Definition at line 116 of file engine_types.h.

◆ message_queue_capacity

int entropic::LoopConfig::message_queue_capacity = 8

Capacity of the mid-generation user-message queue surfaced by entropic_queue_user_message.

When the queue is at this depth, additional enqueues return ENTROPIC_ERROR_QUEUE_FULL. (gh#40, v2.1.10)

Definition at line 121 of file engine_types.h.

◆ require_plan_for_complex

bool entropic::LoopConfig::require_plan_for_complex = true

Planning gate (reserved)

Definition at line 80 of file engine_types.h.

◆ stream_output

bool entropic::LoopConfig::stream_output = true

Stream vs batch generation.

Definition at line 81 of file engine_types.h.


The documentation for this struct was generated from the following file: