Previously, _drain() only captured the first MAX_STDOUT_BYTES (50KB) of stdout, silently dropping all tail output. Scripts that print() their final results at the end would have those results lost. Now uses a two-buffer approach: 40% head + 60% tail (rolling window). This matches the pattern already used in terminal_tool.py (line 1042-1051) but gives the tail more space since execute_code scripts typically print() their final results at the end. Inspired by openclaw's softTrim context-pruning (headChars/tailChars). |
||
|---|---|---|
| .. | ||
| environments | ||
| __init__.py | ||
| approval.py | ||
| browser_tool.py | ||
| clarify_tool.py | ||
| code_execution_tool.py | ||
| cronjob_tools.py | ||
| debug_helpers.py | ||
| delegate_tool.py | ||
| file_operations.py | ||
| file_tools.py | ||
| fuzzy_match.py | ||
| homeassistant_tool.py | ||
| honcho_tools.py | ||
| image_generation_tool.py | ||
| interrupt.py | ||
| mcp_tool.py | ||
| memory_tool.py | ||
| mixture_of_agents_tool.py | ||
| openrouter_client.py | ||
| patch_parser.py | ||
| process_registry.py | ||
| registry.py | ||
| rl_training_tool.py | ||
| send_message_tool.py | ||
| session_search_tool.py | ||
| skill_manager_tool.py | ||
| skills_guard.py | ||
| skills_hub.py | ||
| skills_sync.py | ||
| skills_tool.py | ||
| terminal_tool.py | ||
| todo_tool.py | ||
| transcription_tools.py | ||
| tts_tool.py | ||
| vision_tools.py | ||
| web_tools.py | ||