From 01a0ce9fbbbde5b854be9e374b4e48d0a4ae45ea Mon Sep 17 00:00:00 2001 From: simple-minded <191973953+hakarrr@users.noreply.github.com> Date: Wed, 2 Dec 2026 18:26:27 +0530 Subject: [PATCH] fix(agent): keep the no-MCP system prompt cacheable Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com> --- agent/skill_index_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/agent/skill_index_test.go b/agent/skill_index_test.go index f6b6bf2c..1aa0c0d6 100644 --- a/agent/skill_index_test.go +++ b/agent/skill_index_test.go @@ -26,10 +26,11 @@ func TestSkillIndexBlock_Empty(t *testing.T) { if got := SkillIndexBlock(nil); got != "" { t.Fatalf("no skills must render nothing, got %q", got) } - // An agent without skills keeps its previous prompt byte-for-byte. + // An agent without skills keeps its previous prompt byte-for-byte, and the + // unchanged prompt is exactly what the cache breakpoint covers (#809). sys, boundary := deferredSystem("SYS", DeferredInfo{}) - if len(sys) != 1 || sys[0] != "SYS" || boundary != 0 { - t.Fatalf("expected [SYS],0 — got %v,%d", sys, boundary) + if len(sys) != 1 || sys[0] != "SYS" || boundary != 1 { + t.Fatalf("expected [SYS],1 — got %v,%d", sys, boundary) } }