Commit Graph

3 Commits

Author SHA1 Message Date
dave 03a99b3cf1 huskies: merge 927 2026-05-12 17:55:12 +00:00
Timmy e65f6ace84 fix: get_agent_output no longer panics on tool_result content with multi-byte UTF-8 at byte 500
agent_log::format::format_log_entry_as_text was truncating long tool_result
strings via the naive byte slice `&content_str[..500]`. When byte 500 fell
inside a multi-byte UTF-8 codepoint (box-drawing chars like '─', smart
quotes, emoji), the slice panicked, propagating up through the MCP
get_agent_output dispatcher and surfacing as an internal-error response.
This blocked any diagnostic readout of a coder's session that had emitted
tool output containing those chars.

Walk back to the nearest char boundary with `is_char_boundary` before
slicing. Regression test asserts the formatter doesn't panic on a 599-byte
string with a 3-byte '─' straddling byte 500.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 17:01:24 +01:00
dave d1f58094f8 huskies: merge 839 2026-04-29 14:13:34 +00:00