Austin Pickett
b4410b4bad
fix(tools): spill MCP result envelopes as pageable text
...
An MCP tool result reaches the model as the handler envelope
`{"result": <text>, ...}` (tools/mcp_tool_handlers.py::_render_call_tool_result) so
structured metadata survives inline delivery. When that string crossed the persistence
threshold it was written to $HERMES_HOME/cache/spillover verbatim, so a ~200 KB document
landed on ONE line with every newline escaped (`\n`), making the read_file offset/limit
pagination the <persisted-output> block recommends unusable.
maybe_persist_tool_result now unwraps that envelope before persisting: the spill file and
the preview carry the model-facing text with real newlines. The envelope is recognized by
SHAPE (a JSON object whose keys are a subset of {"result", "structuredContent", "_meta"}
with a non-empty string "result") rather than by tool name, so opaque JSON from any other
tool is still persisted verbatim -- and the aggregate path is covered too, since
enforce_turn_budget persists under __budget_enforcement__ where a `mcp__` prefix test would
miss exactly the results it has to fix. Sibling members (structuredContent/_meta) are
appended after the text in a delimited metadata block instead of being dropped: they are
the payloads _render_call_tool_result keeps for the model on purpose (#115430 ), and the
spill file is the only copy left once the envelope is replaced by the preview.
Fixes #90426
2026-09-27 01:29:25 -04:00
..
2026-09-24 11:50:30 -04:00
2026-09-23 20:04:27 -04:00
2026-09-23 06:46:02 -07:00
2026-09-26 18:27:10 -05:00
2026-09-21 15:02:49 -07:00
2026-09-20 15:32:00 -07:00
2026-09-20 15:32:42 -07:00
2026-09-25 16:24:21 -05:00
2026-09-20 18:50:37 -07:00
2026-09-26 20:40:40 -05:00
2026-09-20 10:16:51 -07:00
2026-09-21 00:58:39 -04:00
2026-09-24 06:55:33 -04:00
2026-09-24 06:30:41 -04:00
2026-09-21 00:58:39 -04:00
2026-09-23 20:04:27 -04:00
2026-09-24 11:50:30 -04:00
2026-09-23 10:13:26 -04:00
2026-09-23 07:36:31 -04:00
2026-09-23 07:36:31 -04:00
2026-09-24 11:50:30 -04:00
2026-09-23 07:36:31 -04:00
2026-09-23 07:36:31 -04:00
2026-09-18 14:06:15 -07:00
2026-09-24 01:55:51 -04:00
2026-09-24 03:42:38 -04:00
2026-09-24 01:55:51 -04:00
2026-09-19 01:03:23 -04:00
2026-09-19 10:44:26 -07:00
2026-09-27 00:56:31 +05:30
2026-09-27 00:56:31 +05:30
2026-09-27 00:56:31 +05:30
2026-09-20 15:49:52 -07:00
2026-09-26 18:00:17 -05:00
2026-09-20 15:54:45 -07:00
2026-09-21 06:09:56 -04:00
2026-09-20 15:50:20 -07:00
2026-09-23 10:42:18 -04:00
2026-09-20 09:52:22 -07:00
2026-09-19 23:57:59 -07:00
2026-09-22 13:57:51 +05:30
2026-09-25 17:33:06 -05:00
2026-09-20 12:53:47 -07:00
2026-09-21 14:01:47 -04:00
2026-09-25 14:58:09 -04:00
2026-09-25 14:58:09 -04:00
2026-09-21 00:58:39 -04:00
2026-09-26 18:27:10 -05:00
2026-09-27 01:10:56 +05:30
2026-09-21 18:39:24 -07:00
2026-09-26 22:26:05 +05:30
2026-09-26 17:34:46 -05:00
2026-09-24 15:58:26 +05:30
2026-09-21 10:40:03 -07:00
2026-09-26 18:27:10 -05:00
2026-09-19 10:44:26 -07:00
2026-09-26 11:16:45 -07:00
2026-09-23 10:07:51 -07:00
2026-09-23 06:46:02 -07:00
2026-09-21 10:04:32 +05:30
2026-09-22 17:54:42 +05:30
2026-09-20 18:22:18 -07:00
2026-09-25 14:27:51 +05:30
2026-09-23 11:41:01 -04:00
2026-09-21 19:08:19 -04:00
2026-09-23 15:43:51 -07:00
2026-09-27 01:05:37 -04:00
2026-09-25 18:31:02 -05:00
2026-09-26 17:04:25 -05:00
2026-09-20 10:07:26 -07:00
2026-09-22 17:54:42 +05:30
2026-09-26 20:58:16 -04:00
2026-09-26 22:40:54 +05:30
2026-09-18 19:31:50 -04:00
2026-09-21 13:14:22 -07:00
2026-09-26 22:40:54 +05:30
2026-09-26 20:58:16 -04:00
2026-09-26 22:40:54 +05:30
2026-09-24 15:38:22 +05:30
2026-09-24 15:38:22 +05:30
2026-09-26 16:51:19 -05:00
2026-09-23 06:46:02 -07:00
2026-09-25 14:58:09 -04:00
2026-09-20 10:57:35 -07:00
2026-09-20 11:49:00 -07:00
2026-09-21 00:58:39 -04:00
2026-09-26 17:19:34 -05:00
2026-09-26 22:19:53 -05:00
2026-09-26 22:19:53 -05:00
2026-09-24 03:52:03 -05:00
2026-09-19 22:57:07 -04:00
2026-09-25 12:10:14 -05:00
2026-09-23 15:26:34 -04:00
2026-09-19 10:16:59 -07:00
2026-09-23 18:52:49 -05:00
2026-09-21 19:08:19 -04:00
2026-09-20 11:12:48 -07:00
2026-09-23 18:29:35 -05:00
2026-09-22 07:05:11 -04:00
2026-09-22 05:16:50 -04:00
2026-09-24 16:49:18 +05:30
2026-09-24 07:39:33 -04:00
2026-09-27 02:33:57 +05:30
2026-09-21 00:58:39 -04:00
2026-09-22 15:59:17 +05:30
2026-09-22 07:05:11 -04:00
2026-09-20 16:00:26 -07:00
2026-09-22 07:05:11 -04:00
2026-09-22 15:59:17 +05:30
2026-09-20 12:58:32 -07:00
2026-09-22 09:28:52 -04:00
2026-09-25 14:24:56 -05:00
2026-09-22 09:55:47 -04:00
2026-09-19 01:29:03 -07:00
2026-09-22 16:15:34 +05:30
2026-09-18 17:26:10 -04:00
2026-09-26 18:27:10 -05:00
2026-09-26 18:27:10 -05:00
2026-09-26 18:27:10 -05:00
2026-09-23 17:09:54 -07:00
2026-09-26 23:44:55 +05:30
2026-09-26 22:19:53 -05:00
2026-09-20 11:30:03 -07:00
2026-09-24 14:23:47 -04:00
2026-09-20 10:17:04 -07:00
2026-09-22 13:57:51 +05:30
2026-09-27 01:29:25 -04:00
2026-09-22 17:54:42 +05:30
2026-09-19 10:03:11 -07:00
2026-09-23 11:54:30 +05:30
2026-09-22 05:16:50 -04:00
2026-09-19 22:57:07 -04:00
2026-09-19 22:57:07 -04:00
2026-09-22 05:16:50 -04:00
2026-09-26 06:19:34 +05:30
2026-09-23 18:30:12 -05:00
2026-09-24 03:48:31 -04:00
2026-09-19 10:10:29 -07:00
2026-09-26 06:19:34 +05:30
2026-09-20 10:25:30 -07:00
2026-09-21 19:08:19 -04:00
2026-09-20 15:28:59 -07:00
2026-09-19 12:22:44 -07:00
2026-09-19 09:52:18 -07:00
2026-09-19 22:57:07 -04:00
2026-09-21 00:58:39 -04:00
2026-09-19 10:54:38 -07:00
2026-09-26 06:19:34 +05:30
2026-09-21 19:08:19 -04:00
2026-09-24 16:17:16 -04:00
2026-09-19 03:07:47 -07:00
2026-09-24 16:17:16 -04:00
2026-09-18 17:26:10 -04:00
2026-09-23 11:41:01 -04:00
2026-09-19 12:22:44 -07:00