From a269a5b38c149e2fbc0b94773a1eb0cf06c0d1fc Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 22 Jul 2026 04:37:46 -0700 Subject: [PATCH] docs(compression): note acceptable false-positive path in zero-user provenance validator --- agent/context_compressor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/context_compressor.py b/agent/context_compressor.py index cb49a131818e..b20b313a1633 100644 --- a/agent/context_compressor.py +++ b/agent/context_compressor.py @@ -2796,6 +2796,12 @@ This compaction should PRIORITISE preserving all information related to the focu summary, ) task_snapshot = match.group(1).strip() if match else "" + # NOTE: the "User asked:" scan covers the WHOLE summary, so tool output + # quoted verbatim in e.g. Completed Actions can false-positive in a + # zero-user session. That is acceptable: the RuntimeError only rides + # the existing retry/deterministic-fallback path (which emits the + # no-user sentinel itself), so a rare false positive costs one retry + # rather than letting fabricated user attribution persist. if ( task_snapshot != _NO_USER_TASK_SENTINEL or re.search(r"\bUser\s+asked\s*:", summary, re.IGNORECASE)