From 1512edfb85f1d5785ca593fb3855a97fa67da393 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sat, 12 Sep 2026 19:42:52 -0700 Subject: [PATCH] refactor(tools): terminal, execute_code, MCP and the bounded collector truncate through one head/tail helper Four copies of the 40/60 head/tail algorithm with a near-identical notice (terminal_tool_result, mcp_tool_content, code_execution_tool, environments/base_output) collapse into tools/tool_output_truncate.py, so the ratio and the `... [