zeroclaw/src/agent
Argenis 6a4ccaeb73
fix: strip stale tool_result from conversation history and memory context (#3418)
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
2026-03-13 09:55:57 -04:00
..
agent.rs Summary 2026-02-24 16:03:00 +08:00
classifier.rs feat(agent): log query classification route decisions 2026-02-24 16:02:59 +08:00
dispatcher.rs style: fix cargo fmt violations blocking CI lint (#3244) 2026-03-11 21:53:25 -04:00
loop_.rs fix: strip stale tool_result from conversation history and memory context (#3418) 2026-03-13 09:55:57 -04:00
memory_loader.rs fix(memory): stop autosaving assistant summaries and filter legacy entries 2026-02-20 01:14:08 +08:00
mod.rs feat(agent): add rule-based query classification for automatic model routing 2026-02-18 14:41:58 +08:00
prompt.rs feat(skills): add configurable compact skills prompt injection 2026-02-21 00:00:51 +08:00
tests.rs fix(provider): preserve reasoning_content in tool-call conversation history 2026-02-22 17:40:48 +08:00