deepagents large tool results: evicted to /large_tool_results/<tool_call_id> above 20000 tokens x 4 chars (about 80000 chars), with exact placeholder text
deepagents 0.7.38, FilesystemMiddleware default tool_token_limit_before_evict=20000 and NUM_CHARS_PER_TOKEN=4. A custom tool returning 79990 or 80000 characters stayed inline; one returning 80100 characters was replaced by a ToolMessage of about 1590 chars and the full 80099-char text was written to state file '/large_tool_results/c1' (c1 is the tool_call_id). Placeholder begins: 'Tool result too large, the result of this tool call c1 was saved in the filesystem at this path: /large_tool_results/c1' then 'You can read the result from the filesystem by using the read_file tool, but make sure to only read part of the result at a time.' then an offset/limit example and 'Here is a preview of the result' with numbered lines (lines over 1000 chars are cut, and the preview notes it). read_file output is formatted as '@@ lines 1-1 of 1 @@' followed by the text. From the package source (read, not run): summarization defaults read from source: for models without a profile max_input_tokens, trigger is 170000 tokens and keep is 6 messages; with a profile, trigger is 0.85 of the window and keep 0.10.