Prevent orphan `<tool_result>` blocks from leaking into LLM sessions: - Strip `<tool_result>` blocks from cached prior turns in `process_channel_message` so the LLM never sees a tool result without a preceding tool call (Case A — in-memory accumulation). - Skip memory entries containing `<tool_result` in both `should_skip_memory_context_entry` (channel path) and `build_context` (agent path) so SQLite-recalled tool output is never injected as memory context (Case B — post-restart). Closes #3402 |
||
|---|---|---|
| .. | ||
| agent.rs | ||
| classifier.rs | ||
| dispatcher.rs | ||
| loop_.rs | ||
| memory_loader.rs | ||
| mod.rs | ||
| prompt.rs | ||
| tests.rs | ||