From 0ad3e8457f9d3121b0fa24b95c96b4d6d3030ca3 Mon Sep 17 00:00:00 2001 From: edlsh Date: Sat, 28 Feb 2026 22:34:14 -0500 Subject: [PATCH] Clarify cloaking system block cache-control comments --- internal/runtime/executor/claude_executor.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/runtime/executor/claude_executor.go b/internal/runtime/executor/claude_executor.go index 8826b061..ddbe9297 100644 --- a/internal/runtime/executor/claude_executor.go +++ b/internal/runtime/executor/claude_executor.go @@ -1113,11 +1113,10 @@ func generateBillingHeader(payload []byte) string { return fmt.Sprintf("x-anthropic-billing-header: cc_version=2.1.63.%s; cc_entrypoint=cli; cch=%s;", buildHash, cch) } -// checkSystemInstructionsWithMode injects Claude Code system prompt to match -// the real Claude Code request format: +// checkSystemInstructionsWithMode injects Claude Code-style system blocks: // system[0]: billing header (no cache_control) -// system[1]: "You are a Claude agent, built on Anthropic's Claude Agent SDK." (with cache_control) -// system[2..]: user's system messages (with cache_control on last) +// system[1]: agent identifier (no cache_control) +// system[2..]: user system messages (cache_control added when missing) func checkSystemInstructionsWithMode(payload []byte, strictMode bool) []byte { system := gjson.GetBytes(payload, "system")