strix icon indicating copy to clipboard operation
strix copied to clipboard

Handle large exec_command output and surface scan errors as TUI toasts

Open mhspektr opened this issue 5 months ago • 4 comments

NB: this builds on https://github.com/usestrix/strix/pull/577 and should be merged after

  • Large output handling — exec_command results are now capped at STRIX_MAX_TOOL_OUTPUT_CHARS (default 65 536 chars). JSON arrays are trimmed to the first 50 records (valid JSON preserved); plain text keeps the first 300 lines. Both truncation paths include a header with total size and count so the agent retains full context awareness. Set STRIX_MAX_TOOL_OUTPUT_CHARS=0 to disable.
  • MapReduce LLM compression — when a single chunk still overflows after truncation, a MapReduce pipeline compresses it via the LLM before it reaches the context window, preventing hard overflows.
  • Scan error toasts — scan thread failures now post a persistent Textual toast immediately rather than surfacing as a post-exit traceback. A timeout=0 bug that caused the toast to expire on mount was also fixed (Textual's default ~5 sis now used).

Closes https://github.com/usestrix/strix/issues/579

mhspektr avatar Jun 22 '26 05:06 mhspektr