From 5c9997cdac857bfc88fc5d29975204213583d9d9 Mon Sep 17 00:00:00 2001 From: Dominic Robinson Date: Mon, 9 Mar 2026 07:38:11 +0000 Subject: [PATCH] fix: Preserve system prompt when sent as a string instead of content block array --- internal/runtime/executor/claude_executor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/runtime/executor/claude_executor.go b/internal/runtime/executor/claude_executor.go index 3dd4ca5e..82b12a2f 100644 --- a/internal/runtime/executor/claude_executor.go +++ b/internal/runtime/executor/claude_executor.go @@ -1266,6 +1266,10 @@ func checkSystemInstructionsWithMode(payload []byte, strictMode bool) []byte { } return true }) + } else if system.Type == gjson.String && system.String() != "" { + partJSON := `{"type":"text","cache_control":{"type":"ephemeral"}}` + partJSON, _ = sjson.Set(partJSON, "text", system.String()) + result += "," + partJSON } result += "]"