Skip to content

feat(tools): configurable tool response offload (#791)#815

Merged
bug-ops merged 1 commit intomainfrom
feat/791-m29-tool-response-offload
Feb 24, 2026
Merged

feat(tools): configurable tool response offload (#791)#815
bug-ops merged 1 commit intomainfrom
feat/791-m29-tool-response-offload

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 24, 2026

Summary

  • Add OverflowConfig to ToolsConfig with configurable threshold (default 50k chars), retention (7 days), and optional custom directory
  • Refactor save_overflow and cleanup_overflow_files in overflow.rs to accept &OverflowConfig instead of hardcoded values
  • Security hardening: path canonicalization, symlink-safe cleanup (symlink_metadata), 0o600 file permissions on Unix, filename-only pointers in LLM context

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace -- -D warnings passes
  • cargo nextest run --workspace --lib --bins — 2565/2565 pass
  • New tests: custom threshold, custom dir, retention days, symlink skip, TOML deserialization, notice format
  • Security review: path traversal, symlink attack, file permissions, path leak — all addressed
  • Performance review: SystemTime snapshot before cleanup loop

Closes #791

@github-actions github-actions bot added enhancement New feature or request documentation Improvements or additions to documentation rust core config size/L and removed enhancement New feature or request labels Feb 24, 2026
@bug-ops bug-ops force-pushed the feat/791-m29-tool-response-offload branch from 27a52c7 to 93310a1 Compare February 24, 2026 15:00
@github-actions github-actions bot added the enhancement New feature or request label Feb 24, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 24, 2026 15:02
Replace hardcoded overflow thresholds with OverflowConfig (threshold,
retention_days, optional custom dir). Default threshold raised from 30k
to 50k chars, retention from 1 to 7 days. Harden overflow: canonicalize
custom dirs, symlink-safe cleanup via symlink_metadata, 0o600 file
permissions on Unix, filename-only pointers to prevent home path leak.
@bug-ops bug-ops force-pushed the feat/791-m29-tool-response-offload branch from 93310a1 to 0e8527f Compare February 24, 2026 15:05
@bug-ops bug-ops merged commit 711e37a into main Feb 24, 2026
23 checks passed
@bug-ops bug-ops deleted the feat/791-m29-tool-response-offload branch February 24, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config core documentation Improvements or additions to documentation enhancement New feature or request rust size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M29: large tool response offload to filesystem

1 participant