[limits]
Resource limits for the agent session.
Command-execution knobs such as timeouts, output bounds, spill controls, and environment loading live under [command_run]; this section is for general numeric caps that are not tied to a single command spawn.
file_read_dedup_entries
Section titled “file_read_dedup_entries”LRU entry count for the file_read dedup cache. 0 disables dedup.
file_read_dedup_total_mb
Section titled “file_read_dedup_total_mb”Total MB of cached file contents before oldest entries evict.
file_read_max_bytes
Section titled “file_read_max_bytes”Pre-read byte cap for file_read. Reads that would exceed this throw with a “use offset/limit or grep” message rather than silently truncating. Only applied when no explicit line range was requested — an explicit range means the caller has already accepted responsibility for output size. 0 = unbounded (not recommended).
file_read_max_tokens
Section titled “file_read_max_tokens”Post-read token cap for file_read. Same throw policy as file_read_max_bytes. Uses a per-extension bytes-per-token ratio (JSON-family: 2, everything else: 4) to estimate tokens without round-tripping a real tokenizer call. 0 = unbounded.
grep_max_context_lines
Section titled “grep_max_context_lines”Maximum context lines allowed around each grep match.
grep_max_results
Section titled “grep_max_results”Maximum number of grep matches returned to the agent.
max_list_results
Section titled “max_list_results”Maximum number of paths returned by file-listing tools.
max_turns
Section titled “max_turns”Maximum assistant turns allowed in a session. 0 means unlimited.