Fixed — bound MCP responses so heavy load can't crash the stdio pipe
Under heavy recall usage the MCP could disconnect mid-session (the whole Claude
Code session lost the tool). Root cause: search_messages returned each message's
full text verbatim via _row_to_hit; a single ~172k-char tool-result blob (times
limit rows) produced a JSON-RPC response large enough to break the stdio pipe.
_row_to_hitcaps bulky free-text fields (text/content/value/preview/
body/snippet) at 1500 chars with<key>_truncated+<key>_full_charsmarkers
— one chokepoint bounds every recall/message tool.search_messagesclampslimitto ≤50 and applies a 256 KB total-response
backstop that trims rows and appends a non-silent_meta.- Internal Python callers bypass
_row_to_hit, so they keep full text — no logic change. - New
tests/test_mcp_payload_bounds.pypins the bounds.