tools/results.py holds what happens to a tool's output: the result budget, the
output limits, head/tail truncation, saving large output to disk and
classifying failures. It takes tools/tool_result_storage.py,
tools/budget_config.py, tools/tool_output_limits.py,
tools/tool_output_truncate.py and agent/tool_result_classification.py whole.
Top-level code is unchanged, except that BudgetConfig.resolve_threshold reads
the registry through a module-top import: results.py imports the registry, and
the registry no longer imports it back.
Importing any of the five now loads agent.model_metadata, which
tools/budget_config.py already imported for one constant. A module that
imported only the small files (agent/display.py and nine others) takes about
0.6 s longer when it is the first thing a process imports. No entry point does
that: twelve hermes commands, from --version to status, load agent.model_metadata
after this change exactly when they did before.
Old names. tools/tool_output_limits.py and tools/tool_result_storage.py are
generated files: a process that started on a release up to v0.23.5 and read no
file and ran no command before the update imports them on its next read_file or
terminal call. The other three get nothing; tools.budget_config is reached in
such a process only by the Codex runtime.
The two log lines of tools.tool_result_storage keep the tools log component
under their new logger name, tools.results.