Skip to content

The agent that grows with you

test(agent): pin that a legacy "...[truncated]" tail is not a pruned-arg artifact

kshitijk4poor2d9178ff98d9
diff --git a/tests/agent/test_tool_call_guardrail_runtime.py b/tests/agent/test_tool_call_guardrail_runtime.py
index 7748d1d100f..f0186d4f3a4 100644
--- a/tests/agent/test_tool_call_guardrail_runtime.py
+++ b/tests/agent/test_tool_call_guardrail_runtime.py
@@ -399,6 +399,10 @@ def test_context_pruned_effectful_call_blocks_before_dispatch():
assert payload["error"] == "suspected_pruned_tool_arguments"
assert payload["argument_paths"] == ["$.body"]
assert "Recover the exact content from its durable source" in payload["message"]
+ # Only the compressor's current marker is an artifact; a legacy "...[truncated]" tail is ordinary content.
+ from agent.tool_dispatch_helpers import _context_pruned_argument_paths
+
+ assert _context_pruned_argument_paths("write_file", {"content": "x" * 201 + "...[truncated]"}) == []
def test_read_only_tool_may_quote_current_context_prune_marker():